Commit aff0d31a 刘韬

1

2 个父辈 169b3ee9 823b9a39
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<startup> <startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup> </startup>
<appSettings> <appSettings>
<add key="EnableWindowsFormsHighDpiAutoResizing" value="true"/> <add key="EnableWindowsFormsHighDpiAutoResizing" value="true" />
</appSettings> </appSettings>
<system.serviceModel> <system.serviceModel>
<bindings> <bindings>
<webHttpBinding> <webHttpBinding>
<binding maxReceivedMessageSize="90000000" maxBufferPoolSize="90000000" maxBufferSize="90000000" closeTimeout="00:03:00" openTimeout="00:03:00" receiveTimeout="00:01:00" sendTimeout="00:01:00"> <binding maxReceivedMessageSize="90000000" maxBufferPoolSize="90000000" maxBufferSize="90000000" closeTimeout="00:03:00" openTimeout="00:03:00" receiveTimeout="00:01:00" sendTimeout="00:01:00">
<readerQuotas maxStringContentLength="90000000" maxArrayLength="90000000" maxBytesPerRead="90000000" /> <readerQuotas maxStringContentLength="90000000" maxArrayLength="90000000" maxBytesPerRead="90000000" />
<security mode="None"/> <security mode="None" />
</binding> </binding>
</webHttpBinding> </webHttpBinding>
</bindings> </bindings>
</system.serviceModel> </system.serviceModel>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="DocumentFormat.OpenXml" publicKeyToken="8fb06cb64d019a17" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.2.0" newVersion="3.0.2.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration> </configuration>
...@@ -9,6 +9,9 @@ using Asa.FaceControl; ...@@ -9,6 +9,9 @@ using Asa.FaceControl;
using System.Windows.Forms; using System.Windows.Forms;
using BLL; using BLL;
using DocumentFormat.OpenXml.Drawing; using DocumentFormat.OpenXml.Drawing;
using DocumentFormat.OpenXml.Office.CustomUI;
using System.Windows.Forms.Integration;
using SmartScan.SetControl.WPF;
namespace SmartScan namespace SmartScan
{ {
...@@ -28,7 +31,7 @@ namespace SmartScan ...@@ -28,7 +31,7 @@ namespace SmartScan
menu.Add(BtnLabel, new UsrPrintTemplate()); menu.Add(BtnLabel, new UsrPrintTemplate());
menu.Add(BtnDataSource, new UsrDataSource()); menu.Add(BtnDataSource, new UsrDataSource());
menu.Add(BtnGenneralSetting, new UsrWorkMode()); menu.Add(BtnGenneralSetting, new UsrWorkMode());
// menu.Add(BtnIdentify, new UsrCamera()); // menu.Add(AAA, new UsrWpfPanel(new NS_Keyword()));
...@@ -83,5 +86,7 @@ namespace SmartScan ...@@ -83,5 +86,7 @@ namespace SmartScan
new FaceMessageBox("", text, MessageBoxButtons.OK).ShowDialog(); new FaceMessageBox("", text, MessageBoxButtons.OK).ShowDialog();
BLLCommon.extension.Update(); BLLCommon.extension.Update();
} }
} }
} }
...@@ -304,3 +304,8 @@ FrmSetPlus_RdoNoImage 不保存 Arial,12,, ...@@ -304,3 +304,8 @@ FrmSetPlus_RdoNoImage 不保存 Arial,12,,
FrmSetPlus_RdoCondense 压缩图 Arial,12,, FrmSetPlus_RdoCondense 压缩图 Arial,12,,
FrmSetPlus_RdoOriginal 原始图 Arial,12,, FrmSetPlus_RdoOriginal 原始图 Arial,12,,
FrmSetPlus_LblHistoryImage 追溯图像保存 Arial,12,, FrmSetPlus_LblHistoryImage 追溯图像保存 Arial,12,,
BtnAddKey 添加 Add
BtnDelKey 删除 Delect
BtnUpdateKey 更新 Update
BtnAppendKey 添加到生成条件 Added to build condition
btn_setriid 切换自动RI Automatic switchingRI
\ No newline at end of file \ No newline at end of file
Dialog_LoginWrong 登录密码错误。 ログインパスワードが間違っています
Dialog_SaveSucceed 保存成功 保存が成功しました
Dialog_Error 错误 エラー
Dialog_CodeCount 条码数量为0 コードカウントが0です
Dialog_SelectPrintContent 识别完成,选择打印内容 認識完了、印刷内容を選択します
Dialog_PrintTemplateAdd 输入新的打印标签模板名称 新しい印刷ラベルテンプレート名を入力
Dialog_PrintTemplateDel 确定要删除打印标签模板 [name] 吗? [name] の印刷ラベルテンプレートを削除しますか
Dialog_PrintTemplateRename 把模板 [name] 重命名为 テンプレート [name] をリネームします
Dialog_MaterialTemplateAdd 输入新的物料模板名称 新しい材料テンプレート名を入力
Dialog_MaterialTemplateDel 确定要删除物料模板 [name] 吗? 材料テンプレート [name] を削除しますか
Dialog_MaterialTemplateRename 把模板 [name] 重命名为 テンプレート [name] をリネームします
Dialog_MaterialTemplateNoMatch 没有匹配到物料模板 マッチする材料テンプレートが見つかりませんでした
Dialog_ServerReturn 服务端返回数据错误 サーバからのデータ返却エラー
Dialog_ServerJson 服务端数据为空 サーバのデータが空です
Dialog_LabelEmpty 打印标签内容有空内容,是否继续打印? 印刷ラベル内容に空の内容があります。印刷を続けますか?
Dialog_KeyExists [name],关键字已存在 [name]、キーワードが既に存在します
Dialog_KeyRepeat 重复关键字 キーワードの重複
Dialog_KeyEmpty 关键字为空 キーワードが空です
Dialog_NoMatchSelect 必须选择一个匹配模式 マッチングモードを選択する必要があります
Dialog_UnlockWrong 解锁密码错误 アンロックパスワードが間違っています
Dialog_RepeatPrint 该料盘标签已打印 このリールのラベルは既に印刷されていました
Dialog_MaterialScanning 拍照识别... 撮影して認識中...
Dialog_MaterialTemplateMatching 模版匹配... テンプレートマッチング中…
Dialog_MaterialProcessing 计算结果... 結果計算中…
Dialog_PleaseWaiting 请稍后... しばらくお待ちください…
Dialog_MatchType_max 匹配数量至多 マッチング数量最大
Dialog_MatchType_equals 匹配数量等于 マッチング数量イコール
Dialog_MatchType_min 匹配数量至少 マッチング数量最小
Dialog_OcrNeedCodeSetKey Ocr的基准条码必须先匹配关键字 OCRの基準バーコードはまずキーワードとマッチングする必要があります
Dialog_ThisMatchHasOcrCantdelete 该匹配规则下有Ocr规则,不能删除全部关键字 本マッチングルールにはOCRルールがあるため、すべてのキーワードを削除できません
Dialog_selectdatasource 请选择数据文件 データファイルを選択してください
Dialog_filenotexists 文件状态:该文件不存在 ファイル状態:このファイルは存在しません
Dialog_filepatseerror
Dialog_fileformaterror 文件格式不正确 ファイル形式が正しくありません
Dialog_OcrNotSupport2DCode 二维码不能用于OCR定位基准 二维码はOCRの位置合わせに使用できません
Dialog_RemindClearTemplate 识别将重置模板。您确定要执行该操作吗? 認識がテンプレートをリセットします。操作を実行しますか?
Dialog_PrintLabel 打印标签 ラベルを印刷
Dialog_RemindSelectCode 请选择一个条码! バーコードを選択してください!
Dialog_TemplateMatchingConflict [name] 与以下的模板匹配冲突 [name] は以下のテンプレートとマッチングが衝突しています
Dialog_TemplateKeyMatchingDul [name] 以下关键字重复匹配 [name] 以下のキーワードが重複してマッチングされました
Dialog_TemplateKeyUnMatching [name] 以下关键字匹配失败 [name] 以下のキーワードのマッチングに失敗しました
Dialog_TemplateUnSetMatching [name] 模板不匹配,未设置匹配规则 [name] テンプレートがマッチングしておらず、マッチング規則が設定されていません
Dialog_Start 开始 開始
Dialog_Exit 退出 終了
Dialog_MatchEmpty 匹配条件为空 マッチング条件が空です
Dialog_ResetidByNone 序号不重置 番号をリセットしません
Dialog_ResetidByDay 序号每日重置 番号を毎日リセットします
Dialog_ResetidByMonth 序号每月重置 番号を毎月リセットします
FrmUsersLogin_FrmUsersLogin 登录 ログイン 微软雅黑,20,B,
FrmUsersLogin_LblUser 用户名: ユーザー名: 微软雅黑,11,,
FrmUsersLogin_TxtUser 微软雅黑,12,,
FrmUsersLogin_BtnCancel 取消 キャンセル 微软雅黑,12,,
FrmUsersLogin_BtnLogin 登录 ログイン" 微软雅黑,15,B,
FrmMain_FrmMain 物料注册系统 材料登録システム" 微软雅黑,20,B,
FrmMain_BtnRetrospect 追溯 トレーサビリティ 微软雅黑,14,B,
FrmMain_BtnSet 设置 設定 微软雅黑,14,B,
FrmMain_BtnAbout 关于 about 微软雅黑,14,B,
FrmMain_BtnTriggerIO 触发识别设备 認識デバイスをトリガー 微软雅黑,9,,
FrmMain_LblCameraExist 识别设备连接 認識デバイスの接続 微软雅黑,9,,
FrmMain_LblIOExist IO模块连接 IOモジュールの接続 微软雅黑,9,,
FrmMain_PnlExtension 元件信息 部品情報 微软雅黑,14,,
FrmMain_BtnPrint 打印标签 ラベル印刷 微软雅黑,12,,
FrmMain_DynamicButton 替换数据 データ交換 微软雅黑,12,,
FrmMain_BtnSkip 跳过 スキップ Arial,12,,
FrmMain_labresult 等待中 待ち状態 Arial,12,,
FrmSet_FrmSet 设置 設定 微软雅黑,12,B,
FrmSet_BtnGenneralSetting 通用设置 一般設定 微软雅黑,12,,
FrmSet_BtnIdentify 识别条码 バーコード識別 微软雅黑,12,B,
FrmSet_BtnLabel 打印模版 印刷テンプレート 微软雅黑,12,,
FrmSet_BtnMaterial 物料模版 素材テンプレート 微软雅黑,12,,
FrmSet_BtnKeyword 关键字 キーワード 微软雅黑,12,,
FrmSet_BtnOK 保存 保存 微软雅黑,12,,
FrmSet_BtnCancel 取消 キャンセル 微软雅黑,12,,
FrmSet_BtnApply 应用 データソース 微软雅黑,12,,
FrmSet_BtnDataSource 数据源 データソース 微软雅黑,12,,
FrmSetPlus_FrmSetPlus 条码规则设置 バーコードルール設定 微软雅黑,20,B,
FrmSetPlus_BtnWorkMode 工作模式 作業モード 微软雅黑,12,B,
FrmSetPlus_BtnIdentify 识别条码 バーコード識別 微软雅黑,12,B,
FrmSetPlus_BtnLabel 打印模版 印刷テンプレート 微软雅黑,14,B,
FrmSetPlus_BtnMaterial 物料模版 素材テンプレート 微软雅黑,12,,
FrmSetPlus_BtnKeyword 关键字 キーワード 微软雅黑,12,,
FrmSetPlus_BtnOK 保存 保存 微软雅黑,12,,
FrmSetPlus_BtnCancel 取消 キャンセル 微软雅黑,12,,
FrmSetPlus_BtnApply 应用 適用 微软雅黑,12,,
FrmSetPlus_BtnRetrospect 追溯历史 履歴トレーサビリティ 微软雅黑,12,B,
FrmSetPlus_but_Labeling 贴标参数 ラベルパラメータ 微软雅黑,12,B,
FrmSetPlus_Keywordlabeling 贴标 ラベル貼り 微软雅黑,12,B,
UsrWorkMode_LblPrint 打印机 プリンター 微软雅黑,12,B,
UsrWorkMode_LblDefaultLabel 默认打印标签 デフォルト印刷ラベル 微软雅黑,12,B,
UsrWorkMode_RdoLandscape 横向打印 横書き印刷 微软雅黑,12,,
UsrWorkMode_RdoVertical 纵向打印 縦書き印刷 微软雅黑,12,,
UsrWorkMode_LblHistoryImage 追溯图像保存 履歴イメージ保存 微软雅黑,12,B,
UsrWorkMode_ChkCheckFunction Check功能 チェック機能 微软雅黑,12,,
UsrWorkMode_RdoOriginal 原图 オリジナル画像 微软雅黑,12,,
UsrWorkMode_RdoCondense 压缩图像 圧縮画像 微软雅黑,12,,
UsrWorkMode_RdoNoImage 不保存 保存しない 微软雅黑,12,,
UsrWorkMode_ChkSelectPN 从服务器上查询PN サーバーからPNを查詢 微软雅黑,12,,
UsrWorkMode_ChkLabelEmptyCheck 打印标签空内容提醒 印刷ラベルの空内容アラート 微软雅黑,12,,
UsrWorkMode_ChkPrintCompletedClear 打印标签后清除内容 印刷ラベル後に内容をクリア 微软雅黑,12,,
UsrWorkMode_ChkOpenEnterWork 打开软件自动进入工作模式 ソフトウェアを開くと自動的に作業モードに入ります 微软雅黑,12,,
UsrWorkMode_ChkOpenMaximize 打开软件最大化窗口 ソフトウェアを開くとウィンドウを最大化します 微软雅黑,12,,
UsrWorkMode_ChkTriggerOpenLight 触发信号后在打开光源 トリガー信号後に光源を開きます 微软雅黑,12,,
UsrWorkMode_ChkPromptAfterPrinting 识别完成后提示 認識完了後のプロンプト 微软雅黑,12,,
UsrWorkMode_ChkAutoPrint 自动打印 自動印刷 微软雅黑,12,,
UsrWorkMode_LstPrinter 微软雅黑,12,,
UsrWorkMode_LstLabel 微软雅黑,12,,
UsrWorkMode_LblDefaultMate 优先匹配模板 テンプレート優先マッチ 微软雅黑,12,B,
UsrWorkMode_LstMate 微软雅黑,12,,
UsrWorkMode_ChkAllowModifyPrint 允许修改打印内容 印刷内容の変更を許可 微软雅黑,12,,
UsrWorkMode2_LblDefaultMate 优先匹配模板 テンプレート優先マッチ 微软雅黑,12,B,
UsrCamera_UsrCamera
UsrCamera_BtnOpenLight 打开光源 光源オン 微软雅黑,12,,
UsrCamera_BtnCloseLight 关闭光源 光源オフ 微软雅黑,12,,
UsrCamera_BtnCameraImage 获取设备图像 デバイスからイメージを取得 微软雅黑,12,,
UsrCamera_BtnLocalImage 打开本地图片 ローカルイメージを開く 微软雅黑,12,,
UsrCamera_BtnScanCode 识别条码 バーコード認識 微软雅黑,12,,
UsrCamera_BtnSaveImage 保存图像 イメージを保存 微软雅黑,12,,
UsrCamera_LstCode 微软雅黑,12,,
UsrPrintTemplate_UsrPrintTemplate
UsrPrintTemplate_BtnAddLabel 新建标签 新しいラベルを作成 微软雅黑,12,,
UsrPrintTemplate_BtnDelLabel 删除标签 ラベル削除 微软雅黑,12,,
UsrPrintTemplate_BtnCopyLabel 复制标签 ラベルコピー 微软雅黑,12,,
UsrPrintTemplate_BtnRenameLabel 重命名 リネーム 微软雅黑,12,,
UsrPrintTemplate_BtnPrintTest 打印测试 印刷テスト 微软雅黑,12,,
UsrPrintTemplate_BtnAddField 添加字段 フィールド追加 微软雅黑,12,,
UsrPrintTemplate_BtnDelField 删除字段 フィールド削除 微软雅黑,12,,
UsrPrintTemplate_BtnFieldFont 字段字体 フィールドフォント 微软雅黑,12,,
UsrPrintTemplate_BtnSetField 设置字段内容 フィールド内容設定 微软雅黑,12,,
UsrPrintTemplate_LblFieldType 条形码类型 バーコード種類 微软雅黑,12,B,
UsrPrintTemplate_ChkFieldShowKey 显示关键字 キーワード表示 微软雅黑,12,,
UsrPrintTemplate_LblFieldX X(mm) X(mm) 微软雅黑,12,B,
UsrPrintTemplate_LblFieldSize 纸张大小 用紙サイズ 微软雅黑,12,B,
UsrPrintTemplate_LblFieldY Y(mm) Y(mm) 微软雅黑,12,B,
UsrPrintTemplate_LblFieldW W(mm) W(mm) 微软雅黑,12,B,
UsrPrintTemplate_LblFieldH L(mm) L(mm) 微软雅黑,12,B,
UsrPrintTemplate_pnlPrintTmpLst 标签模板 ラベルテンプレート 微软雅黑,12,,
UsrPrintTemplate_pnlPrintTmpLstOp 标签模板操作 ラベルテンプレート操作 微软雅黑,12,,
UsrPrintTemplate_pnLabelStyle 标签样式 ラベルスタイル 微软雅黑,12,,
UsrPrintTemplate_pnAllFieldsOfLabel 标签的所有字段 ラベルのすべてのフィールド 微软雅黑,12,,
UsrPrintTemplate_facePanel7 字段操作 フィールド操作 微软雅黑,12,,
UsrPrintTemplate_pnLabelFieldPos 字段位置 フィールド位置 微软雅黑,12,,
UsrMaterialTemplate_UsrMaterialTemplate
UsrMaterialTemplate_BtnAddMate 新建模板 新しいテンプレートを作成 微软雅黑,12,,
UsrMaterialTemplate_BtnDelMate 删除模板 テンプレート削除 微软雅黑,12,,
UsrMaterialTemplate_BtnRenameMate 重命名 リネーム 微软雅黑,12,,
UsrMaterialTemplate_BtnOpenLight 打开光源 光源オン 微软雅黑,12,,
UsrMaterialTemplate_BtnCloseLight 关闭光源 光源オフ 微软雅黑,12,,
UsrMaterialTemplate_BtnCameraImage 获取设备图像 デバイスからイメージを取得 微软雅黑,12,,
UsrMaterialTemplate_BtnLocalImage 打开本地图片 ローカルイメージを開く 微软雅黑,12,,
UsrMaterialTemplate_BtnScanCode 识别 認識 微软雅黑,12,,
UsrMaterialTemplate_BtnExtractCode 提取 エクストラクト 微软雅黑,12,,
UsrMaterialTemplate_BtnOcrCode OCR OCR 微软雅黑,12,,
UsrMaterialTemplate_BtnPrimaryCode 特征码 特徴コー 微软雅黑,12,,
UsrMaterialTemplate_BtnSaveImage 图片另存 画像を別名で保存 微软雅黑,12,,
UsrMaterialTemplate_BtnTemplateValite 模板验证 テンプレート検証 微软雅黑,12,,
UsrMaterialTemplate_pnlMaterial 模板 テンプレート 微软雅黑,12,,
UsrMaterialTemplate_pnlMaterialOp 模板操作 テンプレート操作 微软雅黑,12,,
UsrMaterialTemplate_pnlCode 条码 バーコード 微软雅黑,12,,
UsrMaterialTemplate_pnlCodeOp 条码操作 バーコード操作 微软雅黑,12,,
UsrMaterialTemplate_pnlImg 图片 画像 微软雅黑,12,,
UsrMaterialTemplate_pnlImgOp 图片操作 画像操作 微软雅黑,12,,
UsrDataSource_UsrDataSource
UsrDataSource_ChkRecursive 遍历同目录 同じディレクトリを遍歴 微软雅黑,12,,
UsrDataSource_groupBox_lblkey 标签可用字段 ラベル可用フィールド 微软雅黑,12,,
UsrDataSource_BtnSelectFile 选择文件 ファイル選択 微软雅黑,12,,
UsrDataSource_faceLabel2 关键字匹配数据标题 キーワードマッチデータタイトル 微软雅黑,12,,
UsrDataSource_faceLabel1 识别关键词 キーワード認識 微软雅黑,12,,
UsrDataSource_LblFilestatus 文件状态: ファイル状態: 微软雅黑,12,,
UsrDataSource_LblContent 标签数据源 ラベルデータソース 微软雅黑,12,,
UsrMacro_UsrMacro
UsrMacro_BtnAddKey 添加 追加 微软雅黑,12,,
UsrMacro_BtnDelKey 删除 削除 微软雅黑,12,,
UsrMacro_BtnUpdateKey 更新 更新 微软雅黑,12,,
UsrMacro_BtnAppendKey 添加到生成条件 生成条件に追加 微软雅黑,12,,
UsrMacro_btn_setriid 切换自动RI 自動RI切り替え 微软雅黑,12,,
UsrMacro_PnlReelid Reel ID リールID 微软雅黑,12,,
UsrMacro_LblContent 生成条件 生成条件 微软雅黑,12,B,
UsrMacro_LblPrefix 开头字符串 先頭文字列 微软雅黑,10,,
UsrMacro_LblPostfix 结尾字符串 末尾文字列 微软雅黑,10,,
UsrMacro_LblPlaces 数字位数 数字桁数 微软雅黑,10,,
UsrMacro_ChkReelIDFillZero 位数不足前面补0 桁数不足の際、前に0で補完 微软雅黑,12,,
UsrMacro_btn_adddatetime 添加日期时间 日時追加 微软雅黑,12,,
UsrMacro_btn_1 < <
UsrMacro_btn_2 > >
UsrCodeExtractList_UsrCodeExtractList
UsrCodeExtractList_ChkMatchingStart 开头字符 先頭キャラクタ 微软雅黑,12,,
UsrCodeExtractList_ChkMatchingEnd 结尾字符 末尾キャラクタ 微软雅黑,12,,
UsrCodeExtractList_ChkMatchingMiddle 任意位置字符 任意位置のキャラクタ 微软雅黑,12,,
UsrCodeExtractList_ChkMatchisnumber 检测并转换为数字 数字の検出および変換 微软雅黑,12,,
UsrCodeExtractList_ChkMatchingSplit 条码分割字符 バーコードの分割キャラクタ 微软雅黑,12,,
UsrCodeExtractList_LblSplitPart 获取分割部分 分割部分の取得 微软雅黑,12,,
UsrCodeExtractList_ChkCaseSensitivity 区分大小写 大文字と小文字を区別 微软雅黑,12,,
UsrCodeExtractList_Characteristicbarcode 特征码 特徴コード微软雅黑,12,,
UsrCodeExtractList_ChkMinLength 最小长度 最小長さ 微软雅黑,12,,
UsrCodeExtractList_ChkMaxLength 最大长度 最大長さ 微软雅黑,12,,
UsrCodeExtractList_LblKeyword 选择关键字 キーワードを選択 微软雅黑,12,,
UsrCodeExtractList_LblStart 内容截取起始位 コンテンツ切り出し開始位置 微软雅黑,12,,
UsrCodeExtractList_LblLength 内容截取长度 コンテンツ切り出し長さ 微软雅黑,12,,
UsrCodeExtractList_ChkLengthEnd 截取至结尾 末尾まで切り出す 微软雅黑,12,,
UsrCodeExtractList_ChkCheckCodeType 条码类型 バーコード種類 微软雅黑,12,,
UsrCodeExtractList_BtnDel 删除 削除 微软雅黑,12,,
UsrCodeExtractList_BtnAdd 添加 追加 微软雅黑,12,,
UsrCodeExtractList_pnlExtractRule 提取 抽出 微软雅黑,12,,
UsrCodeExtractList_pnlParseResult 解析结果 解析結果 微软雅黑,12,,
FrmAbout_FrmAbout 关于 About 微软雅黑,24,B,
FrmAbout_LblName 物料注册系统 材料登録システム 微软雅黑,20,,
FrmFieldContent_FrmFieldContent 字段内容设置 フィールドコンテンツ設定 微软雅黑,24,B,
FrmFieldContent_LblContent 字段内容 フィールドコンテンツ 微软雅黑,12,,
FrmFieldContent_BtnInsert 插入 挿入 微软雅黑,12,,
FrmFieldContent_BtnOK 确定 確認 微软雅黑,12,,
FrmFieldContent_BtnCancel 取消 キャンセル 微软雅黑,12,,
FrmCodeExtract_FrmCodeExtract 提取条码 バーコードを抽出 微软雅黑,24,B,
FrmCodeExtract_BtnAddMatch + + 微软雅黑,12,,
FrmCodeExtract_BtnOK 确定 確認 微软雅黑,12,,
FrmCodeExtract_BtnCancel 取消 キャンセル 微软雅黑,12,,
FrmCodeExtract_ChkMatchingStart 开头字符 先頭キャラクタ 微软雅黑,12,,
FrmCodeExtract_ChkMatchingEnd 结尾字符 末尾キャラクタ 微软雅黑,12,,
FrmCodeExtract_ChkMatchingMiddle 任意位置字符 任意位置のキャラクタ 微软雅黑,12,,
FrmCodeExtract_ChkMatchisnumber 必须为数字 数字でなければならない 微软雅黑,12,,
FrmCodeExtract_ChkCaseSensitivity 区分大小写 大文字と小文字を区別 微软雅黑,12,,
FrmCodeExtract_Characteristicbarcode 特征码 特徴コード 微软雅黑,12,,
FrmCodeExtract_ChkCheckCodeType 条码类型 バーコード種類 微软雅黑,12,,
FrmCodeExtract_BtnDel 删除 削除 微软雅黑,12,,
FrmCodeExtract_BtnAdd 添加 追加 微软雅黑,12,,
FrmCodeExtract_LblStart 内容截取起始位 コンテンツ切り出し開始位置 微软雅黑,12,,
FrmCodeExtract_LblLength 内容截取长度 コンテンツ切り出し長さ 微软雅黑,12,,
FrmCodeExtract_pnlKeywords 关键字 キーワード 微软雅黑,12,,
FrmCodeExtract_pnlRawCode 原始条码信息 オリジナルバーコード情報 微软雅黑,12,,
FrmCodeExtract_pnlMatch 匹配 マッチ 微软雅黑,12,,
FrmCodeExtract_pnlExtractRule 提取 抽出 微软雅黑,12,,
FrmCodeExtract_pnlParseResult 解析结果 解析結果 微软雅黑,12,,
FrmCodeOCR_FrmCodeOCR OCR OCR 微软雅黑,24,B,
FrmCodeOCR_BtnSelect 矩形选择框 矩形選択枠 微软雅黑,12,,
FrmCodeOCR_BtnMove 移动图像 イメージを移動 微软雅黑,12,,
FrmCodeOCR_BtnDel 删除 削除 微软雅黑,12,,
FrmCodeOCR_BtnKey 设置关键字 キーワード設定 微软雅黑,12,,
FrmCodeOCR_BtnOK 确定 確認 微软雅黑,12,,
FrmCodeOCR_BtnCancel 取消 キャンセル 微软雅黑,12,,
FrmRetrospect_FrmRetrospect 追溯 トレーサビリティ 微软雅黑,24,B,
FrmRetrospect_LblDateRange 日期范围 日付範囲 微软雅黑,12,,
FrmRetrospect_LblCode 条码 バーコード 微软雅黑,12,,
FrmRetrospect_BtnSelect 查询 検索 微软雅黑,12,,
FrmRetrospect_BtnExport 导出 エクスポート 微软雅黑,12,,
FrmRetrospect_BtnExportAll 导出所有 すべてをエクスポート 微软雅黑,12,,
FrmRetrospect_butt_startserver 启动服务 サービス開始 微软雅黑,12,,
FrmRetrospect_LblAllCode 物料条码 素材バーコード 微软雅黑,12,,
FrmRetrospect_LblAllLabel 标签内容 ラベルコンテンツ 微软雅黑,12,,
FrmRetrospect_faceBut_prin 打印 印刷 微软雅黑,12,,
FrmRetrospect_faceLabel1 共查询到{0}条信息 {0} 件の情報が検索されました 微软雅黑,12,,
Dialog_information 共查询到{0}条信息 {0} 件の情報が検索されました 微软雅黑,12,,
UsrCustomlabeling_facePanel6 覆盖原标签 オリジナルラベルを上書き 微软雅黑,12,,
UsrCustomlabeling_IsOverlaylabel 覆盖原标签 オリジナルラベルを上書き 微软雅黑,12,,
UsrCustomlabeling_facePanel3 XY轴偏移量 XY 軸オフセット 微软雅黑,12,,
UsrCustomlabeling_becurrentX X轴 X 軸 微软雅黑,12,,
UsrCustomlabeling_becurrentY Y轴 Y 軸 微软雅黑,12,,
UsrCustomlabeling_facePanel4 旋转方向及角度 回転方向および角度 微软雅黑,12,,
UsrCustomlabeling_IscIockwise 顺时针 時計回り 微软雅黑,12,,
UsrCustomlabeling_faceRadioBox2 逆时针 反時計回り 微软雅黑,12,,
UsrCustomlabeling_facePanel5 标签旋转角度 ラベル回転角度 微软雅黑,12,,
UsrCustomlabeling_faceButton1 确认 確認 微软雅黑,12,,
Dialog_Res001 通用 通用 微软雅黑,12,,
Dialog_Res002 请选择关键字 キーワードを選択してください 微软雅黑,12,,
UsrKeywordlabeling_AddLabel 添加 追加 微软雅黑,12,,
UsrKeywordlabeling_RotateAngle 以特征码顺时针旋转角度 特徴コードの時計回り回転角度 微软雅黑,12,,
UsrKeywordlabeling_Xoffset X轴偏移量 X 軸オフセット 微软雅黑,12,,
UsrKeywordlabeling_Yoffset Y轴偏移量 Y 軸オフセット 微软雅黑,12,,
UsrKeywordlabeling_LabelRotation 标签旋转角度 ラベル回転角度 微软雅黑,12,,
UsrKeywordlabeling_UpdateLabel 修改关键字 キーワード更新 微软雅黑,12,,
UsrKeywordlabeling_SaveLabel 确认 確認 微软雅黑,12,,
FrmKeyCollection_FrmKeyCollection 选择关键字 キーワード選択 微软雅黑,12,,
FrmKeyCollection_faceButton1 确认 確認 微软雅黑,12,,
FrmDataFilePreview_BtnCancel 取消 キャンセル 微软雅黑,12,,
FrmDataFilePreview_BtnOK 确认 確認 微软雅黑,12,,
FrmDataFilePreview_LblEncoding 编码格式 エンコーディング形式 微软雅黑,12,,
FrmDataFilePreview_FrmDataFilePreview 文件预览 ファイルプレビュー 微软雅黑,12,,
UsrWorkMode2_ChkAutoPrint 自动打印 自動印刷 Arial,12,,
UsrWorkMode2_ChkPromptAfterPrinting 打印完成后提示 印刷終了後のプロンプト Arial,12,,
UsrWorkMode2_ChkTriggerOpenLight 触发信号亮灯 トリガーシグナルでライトオン Arial,12,,
UsrWorkMode2_ChkPrintCompletedClear 标签打印完成后清除数据 ラベル印刷後にデータをクリア Arial,12,,
UsrWorkMode2_ChkOpenMaximize 软件打开最大化 ソフトウェアを最大化して開く Arial,12,,
UsrWorkMode2_ChkOpenEnterWork 软件打开自动进入工作 ソフトウェアを開くと自動的に作業モードに入ります Arial,12,,
UsrWorkMode2_ChkLabelEmptyCheck 标签空内容校验 ラベルの空内容チェック Arial,12,,
UsrWorkMode2_ChkSelectPN 通过服务器查询PN サーバーを介してPNを查詢 Arial,12,,
UsrWorkMode2_LblDefaultLabel 默认打印标签 デフォルト印刷ラベル Arial,12,,
UsrWorkMode2_RdoVertical 纵向打印 縦書き印刷 Arial,12,,
UsrWorkMode2_RdoLandscape 横向打印 横書き印刷 Arial,12,,
UsrWorkMode2_LblPrint 打印机 プリンター Arial,12,,
UsrWorkMode2_RdoNoImage 不保存 保存しない Arial,12,,
UsrWorkMode2_RdoCondense 压缩图 圧縮図 Arial,12,,
UsrWorkMode2_RdoOriginal 原始图 オリジナル図 Arial,12,,
UsrWorkMode2_LblHistoryImage 追溯图像保存 履歴イメージ保存 Arial,12,,
FrmSetPlus_CboLanguage 简体中文 簡体中国語 Arial,12,,
FrmSetPlus_ChkAutoPrint 自动打印 自動印刷 Arial,12,,
FrmSetPlus_ChkPromptAfterPrinting 打印完成后提示 印刷終了後のプロンプト Arial,12,,
FrmSetPlus_ChkTriggerOpenLight 触发信号亮灯 トリガーシグナルでライトオン Arial,12,,
FrmSetPlus_ChkPrintCompletedClear 标签打印完成后清除数据 ラベル印刷後にデータをクリア Arial,12,,
FrmSetPlus_ChkOpenMaximize 软件打开最大化 ソフトウェアを最大化して開く Arial,12,,
FrmSetPlus_ChkOpenEnterWork 软件打开自动进入工作 ソフトウェアを開くと自動的に作業モードに入ります Arial,12,,
FrmSetPlus_ChkLabelEmptyCheck 标签空内容校验 ラベルの空内容チェック Arial,12,,
FrmSetPlus_ChkSelectPN 通过服务器查询PN サーバーを介してPNを查詢 Arial,12,,
FrmSetPlus_LblDefaultLabel 默认打印标签 デフォルト印刷ラベル Arial,12,,
FrmSetPlus_RdoVertical 纵向打印 縦書き印刷 Arial,12,,
FrmSetPlus_RdoLandscape 横向打印 横書き印刷 Arial,12,,
FrmSetPlus_LblPrint 打印机 プリンター Arial,12,,
FrmSetPlus_RdoNoImage 不保存 保存しない Arial,12,,
FrmSetPlus_RdoCondense 压缩图 圧縮図 Arial,12,,
FrmSetPlus_RdoOriginal 原始图 オリジナル図 Arial,12,,
FrmSetPlus_LblHistoryImage 追溯图像保存 履歴イメージ保存 Arial,12,,
FrmSetPlus_pnlCode 条码 バーコード Arial,12,,
FrmSetPlus_pnlCodeOp 条码操作 バーコード操作 Arial,12,,
FrmSetPlus_BtnTemplateValite 模板验证 テンプレート検証 Arial,12,,
FrmSetPlus_BtnExtractCode 提取 抽出 Arial,12,,
FrmSetPlus_pnlImg 图片 画像 Arial,12,,
FrmSetPlus_pnlImgOp 图片操作 画像操作 Arial,12,,
FrmSetPlus_BtnCloseLight 关闭光源 光源オフ Arial,12,,
FrmSetPlus_BtnOpenLight 打开光源 光源オン Arial,12,,
FrmSetPlus_BtnCameraImage 获取设备图像 デバイスからイメージを取得 Arial,12,,
FrmSetPlus_BtnLocalImage 打开本地图片 ローカルイメージを開く Arial,12,,
FrmSetPlus_BtnScanCode 识别 認識 Arial,12,,
FrmSetPlus_BtnSaveImage 图片另存 画像を別名で保存 Arial,12,,
FrmSetPlus_pnlMaterial 模板 テンプレート Arial,12,,
FrmSetPlus_pnlMaterialOp 模板操作 テンプレート操作 Arial,12,,
FrmSetPlus_BtnAddMate 新建模板 テンプレート新規作成 Arial,12,,
FrmSetPlus_BtnDelMate 删除模板 テンプレート削除 Arial,12,,
FrmSetPlus_BtnRenameMate 重命名 リネーム Arial,12,,
FrmSetPlus_btn_adddatetime 添加日期时间 日時追加 Arial,12,,
FrmSetPlus_LblContent 生成条件 生成条件 Arial,12,,
FrmSetPlus_LblPlaces 数字位数 数字桁数 Arial,12,,
FrmSetPlus_ChkReelIDFillZero 位数不足前面补0 桁数不足の際、前に0を補完 Arial,12,,
FrmSetPlus_LblPrefix 开头字符串 先頭文字列 Arial,12,,
FrmSetPlus_LblPostfix 结尾字符串 末尾文字列 Arial,12,,
FrmSetPlus_btn_setriid 切换自动RI 自動RI切り替え Arial,12,,
FrmSetPlus_BtnAppendKey 添加到生成条件 生成条件に追加 Arial,12,,
FrmSetPlus_BtnUpdateKey 更新 更新 Arial,12,,
FrmSetPlus_BtnDelKey 删除 削除 Arial,12,,
FrmSetPlus_BtnAddKey 添加 追加 Arial,12,,
FrmSetPlus_UpdateLabel 修改关键字 キーワード更新 Arial,12,,
FrmSetPlus_AddLabel 添加 追加 Arial,12,,
FrmSetPlus_SaveLabel 确认 確認 Arial,12,,
FrmSetPlus_Xoffset X轴偏移量 X軸オフセット Arial,12,,
FrmSetPlus_Yoffset Y轴偏移量 Y軸オフセット Arial,12,,
FrmSetPlus_LabelRotation 标签旋转角度 ラベル回転角度 Arial,12,,
FrmSetPlus_RotateAngle 以特征码顺时针旋转角度 特徴コードの時計回り回転角度 Arial,12,,
FrmCodeExtract_ChkMatchingSplit 条码分割字符 バーコードの分割キャラクタ Arial,12,,
FrmCodeExtract_ChkMaxLength 最大长度 最大長さ Arial,12,,
FrmCodeExtract_ChkMinLength 最小长度 最小長さ Arial,12,,
FrmCodeExtract_LblKeyword 选择关键字 キーワードを選択 Arial,12,,
FrmCodeExtract_LblSplitPart 获取分割部分 分割部分の取得 Arial,12,,
FrmCodeExtract_ChkLengthEnd 截取至结尾 末尾まで切り出す Arial,12,,
FrmCodeExtract_ChkMatchingSplit 条码分割字符 バーコードの分割キャラクタ Arial,12,,
FrmCodeExtract_ChkMaxLength 最大长度 最大長さ Arial,12,,
FrmCodeExtract_ChkMinLength 最小长度 最小長さ Arial,12,,
FrmCodeExtract_LblKeyword 选择关键字 キーワードを選択 Arial,12,,
FrmCodeExtract_LblSplitPart 获取分割部分 分割部分の取得 Arial,12,,
FrmCodeExtract_ChkLengthEnd 截取至结尾 末尾まで切り出す Arial,12,,
FrmCodeExtract_ChoMatchMiddleType 匹配数量等于 マッチ数量イコール Arial,12,,
Dialog_ReplaceData ReplaceData ReplaceData Arial,12,,
BtnAddKey 添加 追加
BtnDelKey 删除 削除
BtnUpdateKey 更新 更新
BtnAppendKey 添加到生成条件 生成条件に追加"
btn_setriid 切换自动RI 自動RI切り替え
BtnStart 开始 開始
BtnRetrospect 追溯 トレーサビリティ
BtnSet 设置 設定
BtnAI AI AI
BtnAbout 关于 About
BtnTriggerIO 图片识别 画像認識
LblCameraExist 识别设备连接 認識デバイス接続
LblIOExist IO模块连接 IOモジュール接続
setting 配置 設定
NS_KW_identifier 字段标识符 フィールドマーク
NS_KW_Display_name 显示名称 表示名称
NS_KW_api API和数据库中使用的唯一标识符 APIおよびデータベースで使用されるユニークマーク
NS_KW_name 在界面中显示的名称 インターフェースに表示される名称
NS_KW_ID 唯一键自增 ユニークキー自動増分
LblContent 生成条件 生成条件
LblPrefix 开头字符 先頭キャラクタ
LblPostfix 结尾字符 先頭キャラクタ
LblPlaces 数字位数 数字桁数
NS_KW_WEISHU 位数不足前面补0 桁数不足の際、前に0を補完
NS_KW_H 标准字段 標準フィールド
VMC_Main_operation 主要操作 主要操作
VMC_Image_control 图像控制 イメージコントロール
ns_Pring 打印标签 ラベル印刷
WPF_pring 打印方式 印刷方式
RdoLandscape 横向打印 縦書き印刷
RdoVertical 纵向打印 横書き印刷
WPF_camerasave 追溯图像保存 履歴イメージ保存
RdoOriginal 原图 オリジナル画像
RdoCondense 压缩图像 圧縮画像
RdoNoImage 不保存 保存しない
WPF_Advanced_Options 高级选项 詳細設定
ChkLabelEmptyCheck 打印版签空白内容提醒 印刷サインの空白内容アラート
ChkSelectPN 从服务器查询PN サーバーからPNを查询
ChkPrintCompletedClear 打印版签后清除内容 印刷版サイン後に内容をクリア
ChkOpenEnterWork 打开软件自动进入工作模式 ソフトウェアを開くと自動的に作業モードに入ります
ChkOpenMaximize 打开软件最大化窗口 ソフトウェアを開くとウィンドウを最大化します
ChkTriggerOpenLight 触发信号后自动开启光源 トリガー信号後に光源を自動的に開きます
ChkPromptAfterPrinting 识别完成后提示 認識完了後のプロンプト
ChkAutoPrint 自动打印 自動印刷
ChkAllowModifyPrint 允许修改打印内容 印刷内容の変更を許可
ChkCheckFunction Check功能 チェック機能
PrinterInfoGridtext 打印机 プリンター
PrinterInfoGridtext1 默认打印标签 デフォルト印刷ラベル
PrinterInfoGridtext2 优先匹配模板 テンプレート優先マッチ
NS_ISENABLE 是否启用 採用しますか
ShowLog 报警信息 アラート情報
UsrMaterialTemplate_TxtAddMate + +
UsrMaterialTemplate_txtRenameMate ✎ ✎
UsrMaterialTemplate_txtDelMate - -
Camera_status 相机状态 カメラモード
LblIOExists IO模块连接 IOモジュール接続
Unique_code_generator 唯一码生成器 ユニックコードジェネレータ
Generate_keywords 生成字符 文字列生成
kesadd 选择关键词(点击添加) キーワードを選択(クリックして追加)
Preview 唯一码预览: ユニックコードプレビュー:
Reset 重置 リセット
Generate_a_unique_code 生成唯一码 ユニックコード生成
BtnAutoId 唯一键自增 ユニックコード自動増分
lbl_Green 绿色 - 完全正确 緑色 - 完全正確
lbl_yellow 黄色 - OCR识别结果,需要验证 黄色 - OCR認識結果、検証が必要
lbl_red 红色 - 无法识别或有问题 赤色 - 識別不能または問題あり
Rule 添加字符 文字追加
VMC_System_status 系统状态 システム状態
Barcode_content 条码内容 バーコード内容
WPF_FrmCodeExtract 提取条码 バーコード抽出
WPF_Condition 匹配条件 マッチング条件
ChkCheckCodeType 条码类型 バーコード種類
ChkMatchingStart 开头字符 先頭キャラクタ
ChkMatchingEnd 结尾字符 先頭キャラクタ
ChkMatchingMiddle 任意位置字符 任意位置のキャラクタ
WPF_COUNT 匹配次数: マッチング回数:
ChkCaseSensitivity 区分大小写 大文字と小文字を区別
Characteristicbarcode 特征码 特徴コー
WPF_KEYS 关键字 キーワード
WPF_Add 添加 追加
WPF_Delect 删除 削除
WPF_Reslues 解析结果 解析結果
WPF_Set 提取设置 抽出設定
WPF_ChooseKeys 选择关键字: キーワード選択:
ChkSplitBarcode 条码分割字符 バーコードの分割キャラクタ
WPF_CHkSplit 获取分割部分: 分割部分の取得:
WPF_CHkSplitStart 截取起始位置: 切り出し開始位置:
WPF_SplitLenght 截取长度: 切り出し長さ:
ChkMustBeNumber 必须为数字 数字でなければならない
ChkExtractToEnd 截取至结尾 末尾まで切り出す
ChkMinLength 最小长度 最小長さ
ChkMaxLength 最大长度 最大長さ
WPF_Ok 确定 確認
WPF_ng 取消 キャンセル
BtnMinimize - -
BtnMaximize □ □
BtnClose × ×
WPF_PringBehavior 打印行为 印刷動作
WPF_Software 软件设置 ソフト設置
WPF_API API设置 API设置
Serial_number 添加流水 シリアル値
...@@ -353,3 +353,8 @@ FrmCodeExtract_LblSplitPart 获取分割部分 获取分割部分 Arial,12,, ...@@ -353,3 +353,8 @@ FrmCodeExtract_LblSplitPart 获取分割部分 获取分割部分 Arial,12,,
FrmCodeExtract_ChkLengthEnd 截取至结尾 截取至结尾 Arial,12,, FrmCodeExtract_ChkLengthEnd 截取至结尾 截取至结尾 Arial,12,,
FrmCodeExtract_ChoMatchMiddleType 匹配数量等于 匹配数量等于 Arial,12,, FrmCodeExtract_ChoMatchMiddleType 匹配数量等于 匹配数量等于 Arial,12,,
Dialog_ReplaceData ReplaceData ReplaceData Arial,12,, Dialog_ReplaceData ReplaceData ReplaceData Arial,12,,
BtnAddKey 添加 添加
BtnDelKey 删除 删除
BtnUpdateKey 更新 更新
BtnAppendKey 添加到生成条件 添加到生成条件
btn_setriid 切换自动RI 切换自动RI
\ No newline at end of file \ No newline at end of file
...@@ -94,6 +94,7 @@ namespace SmartScan ...@@ -94,6 +94,7 @@ namespace SmartScan
} }
} }
} }
return; return;
} }
...@@ -142,7 +143,29 @@ namespace SmartScan ...@@ -142,7 +143,29 @@ namespace SmartScan
} }
Exit(); Exit();
} }
public static void Service_OnChengeLanguage(string language)
{
ChangeLanguge(language);
}
public static void ChangeLanguge(string languge)
{
if (languge == "Chinese")
{
var path = "pack://application:,,,/Wesky/Chinese.xaml";
// Resources.MergedDictionaries[0].Source = new Uri(path);
}
else if (languge == "English")
{
var path = "pack://application:,,,/Wesky/English.xaml";
// Resources.MergedDictionaries[0].Source = new Uri(path);
}
}
private static bool IsRun() private static bool IsRun()
{ {
Process current = Process.GetCurrentProcess(); Process current = Process.GetCurrentProcess();
......
...@@ -73,7 +73,7 @@ namespace SmartScan ...@@ -73,7 +73,7 @@ namespace SmartScan
this.facePanel1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230))))); this.facePanel1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.facePanel1.Location = new System.Drawing.Point(3, 3); this.facePanel1.Location = new System.Drawing.Point(3, 3);
this.facePanel1.Name = "facePanel1"; this.facePanel1.Name = "facePanel1";
this.facePanel1.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); this.facePanel1.Padding = new System.Windows.Forms.Padding(3);
this.facePanel1.ShowText = false; this.facePanel1.ShowText = false;
this.facePanel1.Size = new System.Drawing.Size(722, 496); this.facePanel1.Size = new System.Drawing.Size(722, 496);
this.facePanel1.TabIndex = 1; this.facePanel1.TabIndex = 1;
...@@ -99,7 +99,7 @@ namespace SmartScan ...@@ -99,7 +99,7 @@ namespace SmartScan
this.PnlReelid.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230))))); this.PnlReelid.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.PnlReelid.Location = new System.Drawing.Point(356, 7); this.PnlReelid.Location = new System.Drawing.Point(356, 7);
this.PnlReelid.Name = "PnlReelid"; this.PnlReelid.Name = "PnlReelid";
this.PnlReelid.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); this.PnlReelid.Padding = new System.Windows.Forms.Padding(3);
this.PnlReelid.Size = new System.Drawing.Size(230, 451); this.PnlReelid.Size = new System.Drawing.Size(230, 451);
this.PnlReelid.TabIndex = 35; this.PnlReelid.TabIndex = 35;
this.PnlReelid.Text = "ReelID"; this.PnlReelid.Text = "ReelID";
...@@ -115,7 +115,7 @@ namespace SmartScan ...@@ -115,7 +115,7 @@ namespace SmartScan
this.CmbResetidBy.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230))))); this.CmbResetidBy.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.CmbResetidBy.Location = new System.Drawing.Point(6, 321); this.CmbResetidBy.Location = new System.Drawing.Point(6, 321);
this.CmbResetidBy.Name = "CmbResetidBy"; this.CmbResetidBy.Name = "CmbResetidBy";
this.CmbResetidBy.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); this.CmbResetidBy.Padding = new System.Windows.Forms.Padding(3);
this.CmbResetidBy.SelectedIndex = -1; this.CmbResetidBy.SelectedIndex = -1;
this.CmbResetidBy.SelectedText = ""; this.CmbResetidBy.SelectedText = "";
this.CmbResetidBy.Size = new System.Drawing.Size(218, 35); this.CmbResetidBy.Size = new System.Drawing.Size(218, 35);
...@@ -133,7 +133,7 @@ namespace SmartScan ...@@ -133,7 +133,7 @@ namespace SmartScan
this.btn_adddatetime.HoldPress = false; this.btn_adddatetime.HoldPress = false;
this.btn_adddatetime.Location = new System.Drawing.Point(6, 373); this.btn_adddatetime.Location = new System.Drawing.Point(6, 373);
this.btn_adddatetime.Name = "btn_adddatetime"; this.btn_adddatetime.Name = "btn_adddatetime";
this.btn_adddatetime.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); this.btn_adddatetime.Padding = new System.Windows.Forms.Padding(3);
this.btn_adddatetime.Size = new System.Drawing.Size(218, 45); this.btn_adddatetime.Size = new System.Drawing.Size(218, 45);
this.btn_adddatetime.TabIndex = 36; this.btn_adddatetime.TabIndex = 36;
this.btn_adddatetime.Text = "添加日期时间"; this.btn_adddatetime.Text = "添加日期时间";
...@@ -149,7 +149,7 @@ namespace SmartScan ...@@ -149,7 +149,7 @@ namespace SmartScan
this.LblContent.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230))))); this.LblContent.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.LblContent.Location = new System.Drawing.Point(6, 33); this.LblContent.Location = new System.Drawing.Point(6, 33);
this.LblContent.Name = "LblContent"; this.LblContent.Name = "LblContent";
this.LblContent.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); this.LblContent.Padding = new System.Windows.Forms.Padding(3);
this.LblContent.Size = new System.Drawing.Size(218, 35); this.LblContent.Size = new System.Drawing.Size(218, 35);
this.LblContent.TabIndex = 20; this.LblContent.TabIndex = 20;
this.LblContent.Text = "条件"; this.LblContent.Text = "条件";
...@@ -165,7 +165,7 @@ namespace SmartScan ...@@ -165,7 +165,7 @@ namespace SmartScan
this.TxtReelIDMatch.Location = new System.Drawing.Point(6, 75); this.TxtReelIDMatch.Location = new System.Drawing.Point(6, 75);
this.TxtReelIDMatch.MaxLength = 32767; this.TxtReelIDMatch.MaxLength = 32767;
this.TxtReelIDMatch.Name = "TxtReelIDMatch"; this.TxtReelIDMatch.Name = "TxtReelIDMatch";
this.TxtReelIDMatch.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); this.TxtReelIDMatch.Padding = new System.Windows.Forms.Padding(3);
this.TxtReelIDMatch.SelectedText = ""; this.TxtReelIDMatch.SelectedText = "";
this.TxtReelIDMatch.SelectionLength = 0; this.TxtReelIDMatch.SelectionLength = 0;
this.TxtReelIDMatch.SelectionStart = 0; this.TxtReelIDMatch.SelectionStart = 0;
...@@ -183,7 +183,7 @@ namespace SmartScan ...@@ -183,7 +183,7 @@ namespace SmartScan
this.LblPlaces.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230))))); this.LblPlaces.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.LblPlaces.Location = new System.Drawing.Point(6, 228); this.LblPlaces.Location = new System.Drawing.Point(6, 228);
this.LblPlaces.Name = "LblPlaces"; this.LblPlaces.Name = "LblPlaces";
this.LblPlaces.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); this.LblPlaces.Padding = new System.Windows.Forms.Padding(3);
this.LblPlaces.Size = new System.Drawing.Size(90, 45); this.LblPlaces.Size = new System.Drawing.Size(90, 45);
this.LblPlaces.TabIndex = 23; this.LblPlaces.TabIndex = 23;
this.LblPlaces.Text = "数字位数"; this.LblPlaces.Text = "数字位数";
...@@ -203,7 +203,7 @@ namespace SmartScan ...@@ -203,7 +203,7 @@ namespace SmartScan
this.NumReelIDPlaces.Maximum = 9999F; this.NumReelIDPlaces.Maximum = 9999F;
this.NumReelIDPlaces.Minimum = 1F; this.NumReelIDPlaces.Minimum = 1F;
this.NumReelIDPlaces.Name = "NumReelIDPlaces"; this.NumReelIDPlaces.Name = "NumReelIDPlaces";
this.NumReelIDPlaces.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); this.NumReelIDPlaces.Padding = new System.Windows.Forms.Padding(3);
this.NumReelIDPlaces.Size = new System.Drawing.Size(122, 45); this.NumReelIDPlaces.Size = new System.Drawing.Size(122, 45);
this.NumReelIDPlaces.TabIndex = 24; this.NumReelIDPlaces.TabIndex = 24;
this.NumReelIDPlaces.Text = "1"; this.NumReelIDPlaces.Text = "1";
...@@ -220,7 +220,7 @@ namespace SmartScan ...@@ -220,7 +220,7 @@ namespace SmartScan
this.ChkReelIDFillZero.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230))))); this.ChkReelIDFillZero.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.ChkReelIDFillZero.Location = new System.Drawing.Point(6, 279); this.ChkReelIDFillZero.Location = new System.Drawing.Point(6, 279);
this.ChkReelIDFillZero.Name = "ChkReelIDFillZero"; this.ChkReelIDFillZero.Name = "ChkReelIDFillZero";
this.ChkReelIDFillZero.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); this.ChkReelIDFillZero.Padding = new System.Windows.Forms.Padding(3);
this.ChkReelIDFillZero.Size = new System.Drawing.Size(218, 35); this.ChkReelIDFillZero.Size = new System.Drawing.Size(218, 35);
this.ChkReelIDFillZero.TabIndex = 25; this.ChkReelIDFillZero.TabIndex = 25;
this.ChkReelIDFillZero.Text = "前面补0"; this.ChkReelIDFillZero.Text = "前面补0";
...@@ -235,7 +235,7 @@ namespace SmartScan ...@@ -235,7 +235,7 @@ namespace SmartScan
this.TxtPostfix.Location = new System.Drawing.Point(102, 177); this.TxtPostfix.Location = new System.Drawing.Point(102, 177);
this.TxtPostfix.MaxLength = 32767; this.TxtPostfix.MaxLength = 32767;
this.TxtPostfix.Name = "TxtPostfix"; this.TxtPostfix.Name = "TxtPostfix";
this.TxtPostfix.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); this.TxtPostfix.Padding = new System.Windows.Forms.Padding(3);
this.TxtPostfix.SelectedText = ""; this.TxtPostfix.SelectedText = "";
this.TxtPostfix.SelectionLength = 0; this.TxtPostfix.SelectionLength = 0;
this.TxtPostfix.SelectionStart = 0; this.TxtPostfix.SelectionStart = 0;
...@@ -253,7 +253,7 @@ namespace SmartScan ...@@ -253,7 +253,7 @@ namespace SmartScan
this.LblPrefix.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230))))); this.LblPrefix.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.LblPrefix.Location = new System.Drawing.Point(6, 127); this.LblPrefix.Location = new System.Drawing.Point(6, 127);
this.LblPrefix.Name = "LblPrefix"; this.LblPrefix.Name = "LblPrefix";
this.LblPrefix.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); this.LblPrefix.Padding = new System.Windows.Forms.Padding(3);
this.LblPrefix.Size = new System.Drawing.Size(90, 45); this.LblPrefix.Size = new System.Drawing.Size(90, 45);
this.LblPrefix.TabIndex = 26; this.LblPrefix.TabIndex = 26;
this.LblPrefix.Text = "前缀"; this.LblPrefix.Text = "前缀";
...@@ -267,7 +267,7 @@ namespace SmartScan ...@@ -267,7 +267,7 @@ namespace SmartScan
this.LblPostfix.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230))))); this.LblPostfix.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.LblPostfix.Location = new System.Drawing.Point(6, 177); this.LblPostfix.Location = new System.Drawing.Point(6, 177);
this.LblPostfix.Name = "LblPostfix"; this.LblPostfix.Name = "LblPostfix";
this.LblPostfix.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); this.LblPostfix.Padding = new System.Windows.Forms.Padding(3);
this.LblPostfix.Size = new System.Drawing.Size(90, 45); this.LblPostfix.Size = new System.Drawing.Size(90, 45);
this.LblPostfix.TabIndex = 28; this.LblPostfix.TabIndex = 28;
this.LblPostfix.Text = "后缀"; this.LblPostfix.Text = "后缀";
...@@ -283,7 +283,7 @@ namespace SmartScan ...@@ -283,7 +283,7 @@ namespace SmartScan
this.TxtPrefix.Location = new System.Drawing.Point(102, 127); this.TxtPrefix.Location = new System.Drawing.Point(102, 127);
this.TxtPrefix.MaxLength = 32767; this.TxtPrefix.MaxLength = 32767;
this.TxtPrefix.Name = "TxtPrefix"; this.TxtPrefix.Name = "TxtPrefix";
this.TxtPrefix.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); this.TxtPrefix.Padding = new System.Windows.Forms.Padding(3);
this.TxtPrefix.SelectedText = ""; this.TxtPrefix.SelectedText = "";
this.TxtPrefix.SelectionLength = 0; this.TxtPrefix.SelectionLength = 0;
this.TxtPrefix.SelectionStart = 0; this.TxtPrefix.SelectionStart = 0;
...@@ -302,7 +302,7 @@ namespace SmartScan ...@@ -302,7 +302,7 @@ namespace SmartScan
this.btn_down.HoldPress = false; this.btn_down.HoldPress = false;
this.btn_down.Location = new System.Drawing.Point(92, 312); this.btn_down.Location = new System.Drawing.Point(92, 312);
this.btn_down.Name = "btn_down"; this.btn_down.Name = "btn_down";
this.btn_down.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); this.btn_down.Padding = new System.Windows.Forms.Padding(3);
this.btn_down.Size = new System.Drawing.Size(84, 45); this.btn_down.Size = new System.Drawing.Size(84, 45);
this.btn_down.TabIndex = 34; this.btn_down.TabIndex = 34;
this.btn_down.Text = "▼"; this.btn_down.Text = "▼";
...@@ -317,7 +317,7 @@ namespace SmartScan ...@@ -317,7 +317,7 @@ namespace SmartScan
this.btn_up.HoldPress = false; this.btn_up.HoldPress = false;
this.btn_up.Location = new System.Drawing.Point(6, 312); this.btn_up.Location = new System.Drawing.Point(6, 312);
this.btn_up.Name = "btn_up"; this.btn_up.Name = "btn_up";
this.btn_up.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); this.btn_up.Padding = new System.Windows.Forms.Padding(3);
this.btn_up.Size = new System.Drawing.Size(80, 45); this.btn_up.Size = new System.Drawing.Size(80, 45);
this.btn_up.TabIndex = 34; this.btn_up.TabIndex = 34;
this.btn_up.Text = "▲"; this.btn_up.Text = "▲";
...@@ -332,7 +332,7 @@ namespace SmartScan ...@@ -332,7 +332,7 @@ namespace SmartScan
this.btn_setriid.HoldPress = false; this.btn_setriid.HoldPress = false;
this.btn_setriid.Location = new System.Drawing.Point(182, 261); this.btn_setriid.Location = new System.Drawing.Point(182, 261);
this.btn_setriid.Name = "btn_setriid"; this.btn_setriid.Name = "btn_setriid";
this.btn_setriid.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); this.btn_setriid.Padding = new System.Windows.Forms.Padding(3);
this.btn_setriid.Size = new System.Drawing.Size(168, 45); this.btn_setriid.Size = new System.Drawing.Size(168, 45);
this.btn_setriid.TabIndex = 34; this.btn_setriid.TabIndex = 34;
this.btn_setriid.Text = "Toggle Auto ReelID"; this.btn_setriid.Text = "Toggle Auto ReelID";
...@@ -347,7 +347,7 @@ namespace SmartScan ...@@ -347,7 +347,7 @@ namespace SmartScan
this.BtnAppendKey.HoldPress = false; this.BtnAppendKey.HoldPress = false;
this.BtnAppendKey.Location = new System.Drawing.Point(182, 209); this.BtnAppendKey.Location = new System.Drawing.Point(182, 209);
this.BtnAppendKey.Name = "BtnAppendKey"; this.BtnAppendKey.Name = "BtnAppendKey";
this.BtnAppendKey.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); this.BtnAppendKey.Padding = new System.Windows.Forms.Padding(3);
this.BtnAppendKey.Size = new System.Drawing.Size(168, 45); this.BtnAppendKey.Size = new System.Drawing.Size(168, 45);
this.BtnAppendKey.TabIndex = 34; this.BtnAppendKey.TabIndex = 34;
this.BtnAppendKey.Text = "append"; this.BtnAppendKey.Text = "append";
...@@ -362,7 +362,7 @@ namespace SmartScan ...@@ -362,7 +362,7 @@ namespace SmartScan
this.BtnUpdateKey.HoldPress = false; this.BtnUpdateKey.HoldPress = false;
this.BtnUpdateKey.Location = new System.Drawing.Point(182, 159); this.BtnUpdateKey.Location = new System.Drawing.Point(182, 159);
this.BtnUpdateKey.Name = "BtnUpdateKey"; this.BtnUpdateKey.Name = "BtnUpdateKey";
this.BtnUpdateKey.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); this.BtnUpdateKey.Padding = new System.Windows.Forms.Padding(3);
this.BtnUpdateKey.Size = new System.Drawing.Size(168, 45); this.BtnUpdateKey.Size = new System.Drawing.Size(168, 45);
this.BtnUpdateKey.TabIndex = 33; this.BtnUpdateKey.TabIndex = 33;
this.BtnUpdateKey.Text = "update"; this.BtnUpdateKey.Text = "update";
...@@ -377,7 +377,7 @@ namespace SmartScan ...@@ -377,7 +377,7 @@ namespace SmartScan
this.BtnDelKey.HoldPress = false; this.BtnDelKey.HoldPress = false;
this.BtnDelKey.Location = new System.Drawing.Point(182, 108); this.BtnDelKey.Location = new System.Drawing.Point(182, 108);
this.BtnDelKey.Name = "BtnDelKey"; this.BtnDelKey.Name = "BtnDelKey";
this.BtnDelKey.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); this.BtnDelKey.Padding = new System.Windows.Forms.Padding(3);
this.BtnDelKey.Size = new System.Drawing.Size(168, 45); this.BtnDelKey.Size = new System.Drawing.Size(168, 45);
this.BtnDelKey.TabIndex = 32; this.BtnDelKey.TabIndex = 32;
this.BtnDelKey.Text = "del"; this.BtnDelKey.Text = "del";
...@@ -392,7 +392,7 @@ namespace SmartScan ...@@ -392,7 +392,7 @@ namespace SmartScan
this.BtnAddKey.HoldPress = false; this.BtnAddKey.HoldPress = false;
this.BtnAddKey.Location = new System.Drawing.Point(182, 57); this.BtnAddKey.Location = new System.Drawing.Point(182, 57);
this.BtnAddKey.Name = "BtnAddKey"; this.BtnAddKey.Name = "BtnAddKey";
this.BtnAddKey.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); this.BtnAddKey.Padding = new System.Windows.Forms.Padding(3);
this.BtnAddKey.Size = new System.Drawing.Size(168, 45); this.BtnAddKey.Size = new System.Drawing.Size(168, 45);
this.BtnAddKey.TabIndex = 31; this.BtnAddKey.TabIndex = 31;
this.BtnAddKey.Text = "add"; this.BtnAddKey.Text = "add";
...@@ -406,7 +406,7 @@ namespace SmartScan ...@@ -406,7 +406,7 @@ namespace SmartScan
this.TxtKey.Location = new System.Drawing.Point(182, 7); this.TxtKey.Location = new System.Drawing.Point(182, 7);
this.TxtKey.MaxLength = 32767; this.TxtKey.MaxLength = 32767;
this.TxtKey.Name = "TxtKey"; this.TxtKey.Name = "TxtKey";
this.TxtKey.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); this.TxtKey.Padding = new System.Windows.Forms.Padding(3);
this.TxtKey.SelectedText = ""; this.TxtKey.SelectedText = "";
this.TxtKey.SelectionLength = 0; this.TxtKey.SelectionLength = 0;
this.TxtKey.SelectionStart = 0; this.TxtKey.SelectionStart = 0;
...@@ -423,7 +423,7 @@ namespace SmartScan ...@@ -423,7 +423,7 @@ namespace SmartScan
this.LstKey.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230))))); this.LstKey.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.LstKey.Location = new System.Drawing.Point(6, 7); this.LstKey.Location = new System.Drawing.Point(6, 7);
this.LstKey.Name = "LstKey"; this.LstKey.Name = "LstKey";
this.LstKey.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); this.LstKey.Padding = new System.Windows.Forms.Padding(3);
this.LstKey.SelectedIndex = -1; this.LstKey.SelectedIndex = -1;
this.LstKey.Size = new System.Drawing.Size(170, 300); this.LstKey.Size = new System.Drawing.Size(170, 300);
this.LstKey.TabIndex = 21; this.LstKey.TabIndex = 21;
......
...@@ -176,6 +176,8 @@ namespace SmartScan ...@@ -176,6 +176,8 @@ namespace SmartScan
{ {
string key = "[datetime:yyyyMMddHHmmss]"; string key = "[datetime:yyyyMMddHHmmss]";
TxtReelIDMatch.AppendText(key); TxtReelIDMatch.AppendText(key);
} }
} }
} }
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
using System.Windows.Media;
namespace SmartScan.SetControl.WPF.Convent
{
public class BoolToColorConverter : IValueConverter
{
public Color TrueColor { get; set; } = Colors.Red;
public Color FalseColor { get; set; } = Colors.Gray;
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return (value is bool boolValue && boolValue)
? new SolidColorBrush(TrueColor)
: new SolidColorBrush(FalseColor);
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}
<UserControl x:Class="SmartScan.SetControl.WPF.KeyName"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:SmartScan.SetControl.WPF"
mc:Ignorable="d"
d:DesignHeight="600" d:DesignWidth="800" >
<UserControl.Resources>
<!-- 选项卡按钮样式 -->
<Style TargetType="RadioButton" x:Key="TabButtonStyle">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
<Border Background="{TemplateBinding Background}"
CornerRadius="3,3,0,0"
Padding="15,5">
<ContentPresenter HorizontalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- 字段列表项样式 -->
<Style TargetType="ListBoxItem" x:Key="FieldListItemStyle">
<Setter Property="Foreground" Value="White"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBoxItem">
<Grid Background="Transparent">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="30"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- 勾选状态 -->
<Path Data="M0,6 L4,10 12,2"
Stroke="#FF00FF00"
StrokeThickness="2"
/>
<TextBlock Grid.Column="1"
Text="{Binding Name}"
VerticalAlignment="Center"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</UserControl.Resources>
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" Grid.Row="0">
<RadioButton Content="字段配置"
GroupName="Tabs"
Style="{StaticResource TabButtonStyle}"
Background="#FF0066CC"
IsChecked="True"/>
<RadioButton Content="匹配规则"
GroupName="Tabs"
Style="{StaticResource TabButtonStyle}"
Background="#FF2D2D30"/>
<RadioButton Content="高级选项"
GroupName="Tabs"
Style="{StaticResource TabButtonStyle}"
Background="#FF2D2D30"/>
</StackPanel>
<!-- 主内容区 -->
<Grid Grid.Row="1" Margin="0,10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="250"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- 左侧字段列表 -->
<GroupBox Header="标准字段"
Foreground="White"
BorderBrush="#FF3E3E42">
<ListBox ItemsSource="{Binding StandardFields}"
ItemContainerStyle="{StaticResource FieldListItemStyle}"
SelectedItem="{Binding SelectedField}">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<CheckBox IsChecked="{Binding IsEnabled}"
Margin="0,0,10,0"/>
<TextBlock Text="{Binding Name}"/>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</GroupBox>
<!-- 右侧配置面板 -->
<ScrollViewer Grid.Column="1" Margin="10,0">
<GroupBox Header="Reel ID配置"
Foreground="White"
BorderBrush="#FF3E3E42">
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- 基本配置 -->
<StackPanel Grid.Row="0">
<TextBlock Text="字段标识符" Margin="0,5"/>
<TextBox Text="{Binding FieldID}"
Background="#FF252526"/>
<TextBlock Text="显示名称" Margin="0,10,0,5"/>
<TextBox Text="{Binding DisplayName}"
Background="#FF252526"/>
<CheckBox Content="启用"
IsChecked="{Binding IsEnabled}"
Margin="0,10"/>
</StackPanel>
<!-- 验证规则 -->
</Grid>
</GroupBox>
</ScrollViewer>
</Grid>
</Grid>
</UserControl>
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace SmartScan.SetControl.WPF
{
/// <summary>
/// KeyName.xaml 的交互逻辑
/// </summary>
public partial class KeyName : UserControl
{
public KeyName()
{
InitializeComponent();
DataContext = this;
}
public class FieldConfig
{
public string Name { get; set; }
public bool IsEnabled { get; set; }
public string FieldID { get; set; }
public string DisplayName { get; set; }
public string StartString { get; set; }
public string EndString { get; set; }
public int DigitCount { get; set; }
public bool ZeroPadding { get; set; }
public string RegexPattern { get; set; }
}
public ObservableCollection<FieldConfig> StandardFields { get; } = new()
{
new FieldConfig { Name = "RID", IsEnabled = true },
new FieldConfig { Name = "QTY", IsEnabled = true },
new FieldConfig { Name = "LOT", IsEnabled = true },
new FieldConfig { Name = "VPN", IsEnabled = false }
};
}
}
using Asa.FaceControl;
using DocumentFormat.OpenXml.Spreadsheet;
using DocumentFormat.OpenXml.Wordprocessing;
using Model;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Forms;
using System.Windows.Media;
using System.Xml;
using Control = System.Windows.Controls.Control;
using Font = System.Drawing.Font;
using FontStyle = System.Drawing.FontStyle;
namespace SmartScan.SetControl.WPF
{
public class LanguageWwitchover
{
private class ClsLangText
{
public string Name = "";
public string Text = "";
public Font Font = null;
}
public static List<string> Name { get; private set; } = new List<string>();
private static readonly Dictionary<string, Dictionary<string, ClsLangText>> langDict = new Dictionary<string, Dictionary<string, ClsLangText>>();
public static string CurrentLng { get; private set; } = "zh-CN";
private static string filePath;
public static void LoadPath(string path)
{
langDict.Clear();
filePath = path;
string[] files = Directory.GetFiles(path, "*.lngres");
string[] array = files;
foreach (var file in array)
{
var fileNameWithoutExtension = Path.GetFileNameWithoutExtension(file);
//var langDictTemp = new Dictionary<string, string>();
if (fileNameWithoutExtension.ToLower() == "en-US".ToLower())
{
Name.Add("English");
}
else if (fileNameWithoutExtension.ToLower() == "zh-CN".ToLower())
{
Name.Add("简体中文");
}
langDict.Add(fileNameWithoutExtension, new Dictionary<string, ClsLangText>());
var lines = File.ReadAllLines(file);
string[] array3 = lines;
foreach (var line in array3)
{
string[] parts = line.Split('\t');
if (parts.Length >= 3)
{
var key = parts[0];
var text = parts[2];
string s = ((parts.Length > 3) ? parts[3] : "");
ClsLangText clsLangText = new ClsLangText();
clsLangText.Font = ConvFont(s);
clsLangText.Name = key;
clsLangText.Text = text;
if (!langDict[fileNameWithoutExtension].ContainsKey(key))
{
langDict[fileNameWithoutExtension].Add(key, clsLangText);
}
}
}
//langDict.Add(fileNameWithoutExtension, langDictTemp);
}
}
private static Font ConvFont(string s)
{
if (string.IsNullOrWhiteSpace(s))
{
return null;
}
string[] array = s.Split(',');
float emSize = Convert.ToSingle(array[1]);
FontStyle fontStyle = FontStyle.Regular;
if (array[2] == "B")
{
fontStyle |= FontStyle.Bold;
}
if (array[3] == "I")
{
fontStyle |= FontStyle.Italic;
}
return new Font(array[0], emSize, fontStyle);
}
public static void LoadLanguage(string name)
{
CurrentLng = name;
}
public static string GetText(string key)
{
if (langDict.ContainsKey(CurrentLng) && langDict[CurrentLng].ContainsKey(key))
{
return langDict[CurrentLng][key].ToString();
}
return key; // Return key if text not found
}
public static void SetLanguage(DependencyObject parent)
{
for (int i = 0; i < VisualTreeHelper.GetChildrenCount(parent); i++)
{
DependencyObject child = VisualTreeHelper.GetChild(parent, i);
SetLanguage(child);
if (child is Control control)
{
// 执行你需要的操作,例如设置文本或字体
Console.WriteLine($"Control Type: {control.GetType().Name}, Name: {control.Name}, Content:{control.Name}");
var key = control.Name; // 假设控件名称是资源键
var text = LanguageWwitchover.GetText(key);
if (control is System.Windows.Controls.Button button)
{
try
{
text = LanguageWwitchover.GetText(langDict[CurrentLng][key].Text);
button.Content = text;
}
catch (Exception)
{
}
}
// 示例:设置控件文本
// string text = LanguageSwitcher.GetText("YourKeyHere");
// control.Content = text;
// 示例:设置控件字体
// if (control is TextBlock textBlock)
// {
// var font = new FontFamily("微软雅黑"), emSize = 12, fontStyle = FontStyles.Normal;
// textBlock.FontFamily = font;
// textBlock.FontSize = emSize;
// textBlock.FontStyle = fontStyle;
// }
}
}
//if (langDict.ContainsKey(CurrentLng) && langDict[CurrentLng].ContainsKey(frm.Name + "_" + frm.Name))
//{
// frm.Text = langDict[CurrentLng][frm.Name + "_" + frm.Name].Text;
// frm.TitleFont = langDict[CurrentLng][frm.Name + "_" + frm.Name].Font;
// SetLang(frm.Name, frm);
//}
}
private static void SetLang(string frmname, System.Windows.Forms.Control ctl)
{
if (!langDict.ContainsKey(CurrentLng))
{
return;
}
foreach (System.Windows.Forms.Control control in ctl.Controls)
{
if (control.Name == "")
{
continue;
}
string key = frmname + "_" + control.Name;
if (control.HasChildren)
{
SetLang(frmname, control);
}
}
}
private static bool HasChinese(string txt)
{
if (Regex.IsMatch(txt.ToString(), "[\\u4E00-\\u9FA5]+"))
{
return true;
}
return false;
}
public static void UpdateUI(UIElement element, string key)
{
if (element is FrameworkElement fe)
{
fe.Dispatcher.Invoke(() =>
{
var text = GetText(key);
if (fe is TextBlock tb)
{
tb.Text = text;
}
else if (fe is System.Windows.Controls.Button btn)
{
btn.Content = text;
}
// Add more controls as needed
});
}
}
}
}
using Asa.FaceControl;
using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms.Integration;
namespace SmartScan
{
internal class MenuElementHost : ElementHost, ISetMenu
{
FacePanel ISetMenu.GetPanel()
{
//throw new NotImplementedException();
return null;
}
void ISetMenu.Save()
{
//throw new NotImplementedException();
}
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
namespace SmartScan.SetControl.WPF.Models
{
public class ItemModel: INotifyPropertyChanged
{
private string _value;
private bool _isSelected;
public string Value
{
get => _value;
set { _value = value; OnPropertyChanged(); }
}
public bool IsSelected
{
get => _isSelected;
set { _isSelected = value; OnPropertyChanged(); }
}
public event PropertyChangedEventHandler PropertyChanged;
protected void OnPropertyChanged([CallerMemberName] string name = null) =>
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
}
}
<UserControl x:Class="SmartScan.SetControl.WPF.NS_Keyword"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:SmartScan.SetControl.WPF" xmlns:local1="clr-namespace:SmartScan.SetControl.WPF.Convent"
mc:Ignorable="d"
d:DesignHeight="850" d:DesignWidth="800" Loaded="UserControl_Loaded" >
<UserControl.Resources>
<Style x:Key="TextBoxStyle1" TargetType="{x:Type TextBox}">
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="AllowDrop" Value="true"/>
<Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBox}">
<Border CornerRadius="3" x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
<ScrollViewer x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsInactiveSelectionHighlightEnabled" Value="true"/>
<Condition Property="IsSelectionActive" Value="false"/>
</MultiTrigger.Conditions>
<Setter Property="SelectionBrush" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}"/>
</MultiTrigger>
</Style.Triggers>
</Style>
<Style x:Key="AlternatingListBoxItemStyle" TargetType="ListBoxItem">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBoxItem">
<Border Name="Bd"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Background="{TemplateBinding Background}"
Padding="{TemplateBinding Padding}">
<ContentPresenter/>
</Border>
<ControlTemplate.Triggers>
<!-- 鼠标悬停效果 -->
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bd"
Property="Background"
Value="#1AFFFFFF"/>
<!-- 10%透明度的白色 -->
</Trigger>
<!-- 选中状态触发器 -->
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="Bd" Property="Background" Value="#4b78d0"/>
<Setter TargetName="Bd" Property="BorderBrush" Value="#FF3C8D3C"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="VerticalContentAlignment" Value="Center"></Setter>
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="Foreground" Value="White"></Setter>
<Setter Property="Padding" Value="5"/>
<Setter Property="Height" Value="50"/>
<!-- 关键行高设置 -->
<Style.Triggers>
<!--<Trigger Property="ItemsControl.AlternationIndex" Value="0">
<Setter Property="Background" Value="{x:Null}"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="IsSelected" Value="True"/>
</Trigger>
<Trigger Property="ItemsControl.AlternationIndex" Value="1">
<Setter Property="Background" Value="#FFB3B0B0"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>-->
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="#4b78d0"/>
<!-- 深翡翠绿 -->
<Setter Property="BorderBrush" Value="#FF3C8D3C"/>
</Trigger>
</Style.Triggers>
</Style>
<local1:BoolToColorConverter x:Key="BoolToColor" TrueColor="Red" FalseColor="Gray"/>
<Style x:Key="buttonStyle" TargetType="{x:Type Button}">
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border CornerRadius="5" x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
<ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsDefaulted" Value="true">
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" />
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Background" TargetName="border" Value="#D2FFBB" />
<Setter Property="BorderBrush" TargetName="border" Value="#D2FFBB" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#C6FFCC"/>
<Setter Property="Foreground" Value="Black"/>
</Trigger>
</Style.Triggers>
</Style>
</UserControl.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.3*"></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<Rectangle Fill="#C1C1C1" Width="0.3" Grid.ColumnSpan="1" HorizontalAlignment="Right"/>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"></RowDefinition>
<RowDefinition Height="1.7*"></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<Grid>
<TextBlock Text="标准字段" HorizontalAlignment="Left" Foreground="White" FontFamily="微软雅黑" VerticalAlignment="Center" Margin="20 5 0 5" FontWeight="Bold" FontSize="25"></TextBlock>
<Rectangle Fill="#C1C1C1" Height="0.3" Margin="0 5 0 0" VerticalAlignment="Bottom"/>
</Grid>
<Grid Grid.Row="1">
<ListBox ItemsSource="{Binding keyCopy}" Name="LstKey" Margin="5"
AlternationCount="2" Background="{x:Null}" BorderThickness="0"
ItemContainerStyle="{StaticResource AlternatingListBoxItemStyle}" SelectionChanged="LstKey_SelectionChanged">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding}" FontSize="16" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5 0 0 0"/>
<Ellipse Grid.Column="1" Width="12" Height="12" VerticalAlignment="Center" HorizontalAlignment="Right" >
<Ellipse.Style>
<Style TargetType="Ellipse">
<Setter Property="Fill" Value="LightGray"/>
<Style.Triggers>
<DataTrigger Binding="{Binding
RelativeSource={RelativeSource
AncestorType={x:Type ListBoxItem}},
Path=IsSelected}"
Value="True">
<Setter Property="Fill" Value="Aqua"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Ellipse.Style>
</Ellipse>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<!--<Ellipse Width="12" Height="12" Margin="0,5,0,0"
Fill="{Binding SelectedItem.a, ElementName=LstKey,
Converter={StaticResource BoolToColor}}"/>-->
</Grid>
<Grid Grid.Row="2">
</Grid>
</Grid>
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="0.1*"></RowDefinition>
<RowDefinition Height="0.2*"></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition Height="0.3*"></RowDefinition>
</Grid.RowDefinitions>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock Text="配置" FontSize="23" Foreground="#4975cd" FontFamily="微软雅黑" VerticalAlignment="Center" Margin="10 0 0 0" FontWeight="Bold"></TextBlock>
<Button Content="启动" Grid.Column="1" Foreground="White" Style="{DynamicResource buttonStyle}" Height="30" Margin="15,0,10,0" Width="90" FontSize="15" HorizontalAlignment="Right" VerticalAlignment="Center" Background="#4b78d0" BorderThickness="1" Name="expand" ></Button>
<TextBlock Background="#C1C1C1" Margin="0,13,0,0" Height="0.3" Grid.ColumnSpan="2" VerticalAlignment="Bottom"> </TextBlock>
</Grid>
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition Height="0.3*"></RowDefinition>
<RowDefinition Height="0.5*"></RowDefinition>
<RowDefinition Height="0.2*"></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition ></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock Text="字段标识符" Foreground="#696969" FontFamily="微软雅黑" VerticalAlignment="Center" Margin="10 0 0 0" FontSize="18"></TextBlock>
<TextBox x:Name="lst_key" Foreground="White" Background="#252525" Grid.Row="1" Style="{StaticResource TextBoxStyle1}" BorderThickness="1" CaretBrush="White" Margin="10 5 10 5" FontSize="25" FontFamily="微软雅黑" VerticalContentAlignment="Center" Text="" ></TextBox>
<TextBlock Text="API和数据库中使用的唯一标识符" FontFamily="微软雅黑" Grid.Row="2" Foreground="#707070" VerticalAlignment="Center" Margin="10 0 0 0" FontSize="16"></TextBlock>
<TextBlock Text="显示名称:" Foreground="#696969" FontFamily="微软雅黑" VerticalAlignment="Center" Grid.Column="1" Margin="10 0 0 0" FontSize="18"></TextBlock>
<TextBox x:Name="lst_name" Foreground="White" Background="#252525" Grid.Row="1" Grid.Column="1" Style="{StaticResource TextBoxStyle1}" BorderThickness="1" CaretBrush="White" Margin="10 5 10 5" FontSize="25" VerticalContentAlignment="Center" Text="" ></TextBox>
<TextBlock Text="在界面中显示的名称" Grid.Row="2" FontFamily="微软雅黑" Grid.Column="1" Foreground="#707070" VerticalAlignment="Center" Margin="10 0 0 0" FontSize="16"></TextBlock>
</Grid>
<Grid Grid.Row="3">
<TextBlock Background="#C1C1C1" Margin="0,13,0,0" Height="0.3" Grid.ColumnSpan="2"></TextBlock>
<StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="0 0 10 10">
<Button Content="添加" Foreground="White" Style="{DynamicResource buttonStyle}" FontFamily="微软雅黑" Name="BtnAddKey" Height="30" Width="90" Margin="5" Background="#4B78D0" Click="BtnAddKey_Click"></Button>
<Button Content="删除" Foreground="White" Style="{DynamicResource buttonStyle}" FontFamily="微软雅黑" Name="BtnDelKey" Height="30" Width="90" Margin="5" Background="#4B78D0" Click="BtnDelKey_Click"></Button>
<Button Content="更新" Foreground="White" Style="{DynamicResource buttonStyle}" FontFamily="微软雅黑" Name="BtnUpdateKey" Height="30" Width="90" Margin="5" Background="#4B78D0" Click="BtnUpdateKey_Click"></Button>
<Button Content="添加到生成条件" Style="{DynamicResource buttonStyle}" FontFamily="微软雅黑" Foreground="White" Name="BtnAppendKey" Width="90" Height="30" Margin="5" Background="#4B78D0"></Button>
<Button Content="切换自动RI" Style="{DynamicResource buttonStyle}" FontFamily="微软雅黑" Foreground="White" Name="btn_setriid" Width="90" Height="30" Margin="5" Background="#4B78D0"></Button>
</StackPanel>
</Grid>
</Grid>
</Grid>
</UserControl>
using BLL;
using Model;
using SmartScan.PlusSettingFrm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Forms;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace SmartScan.SetControl.WPF
{
/// <summary>
/// NS_Keyword.xaml 的交互逻辑
/// </summary>
public partial class NS_Keyword : System.Windows.Controls.UserControl
{
private readonly List<string> keyCopy;
public string ButtonContent => LanguageWwitchover.GetText("ButtonContentKey");
public string TextBlockContent => LanguageWwitchover.GetText("TextBlockContentKey");
public NS_Keyword()
{
InitializeComponent();
keyCopy = new(BLLCommon.macroKey);
LstKey.ItemsSource=keyCopy;
string YU = BLLCommon.config.Language;
if (YU == "简体中文")
{
YU = "zh-CN";
}
else
{
YU = "en-US";
}
LanguageWwitchover.LoadPath(FilePath.LANGUAGE_DIR);
LanguageWwitchover.LoadLanguage(YU);
//ChangeInfo.LanguageService.ChangLanguagePublic(YU);
//LanguageWwitchover.SetLanguage(this);
}
private void LstKey_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (LstKey.SelectedItem != null)
{
string selectedValue = LstKey.SelectedItem.ToString();
lst_key.Text = selectedValue.ToString();
}
}
private void BtnAddKey_Click(object sender, RoutedEventArgs e)
{
string text = lst_key.Text;
int index = keyCopy.FindIndex(match => match == text);
if (index == -1)
{
keyCopy.Add(text);
LstKey.ItemsSource = null;
LstKey.ItemsSource=keyCopy;
}
else
{
string hint = Asa.FaceControl.Language.Dialog("KeyExists");
hint = hint.Replace("[name]", text);
new Asa.FaceControl.FaceMessageBox("", hint, MessageBoxButtons.OK).ShowDialog();
}
}
private void BtnDelKey_Click(object sender, RoutedEventArgs e)
{
int index = LstKey.SelectedIndex;
if (index == -1 || index >= keyCopy.Count) return;
keyCopy.RemoveAt(index);
LstKey.ItemsSource = null;
LstKey.ItemsSource = keyCopy;
var keyname = ConfigHelper.Config.Get("Label_Key");
if (!string.IsNullOrWhiteSpace(keyname))
{
UsrKeywordlabeling.Deletskeyname();
}
}
private void BtnUpdateKey_Click(object sender, RoutedEventArgs e)
{
if (LstKey.SelectedIndex == -1) return;
string text = lst_key.Text;
int index = keyCopy.FindIndex(match => match == text);
if (index == -1)
{
keyCopy[LstKey.SelectedIndex] = text;
var oldname = LstKey.Items[LstKey.SelectedIndex];
var keyname = ConfigHelper.Config.Get("Label_Key");
if (!string.IsNullOrWhiteSpace(keyname))
{
//ConfigHelper.Config.Set("Label_Key", "Part No");
if (oldname.ToString() == keyname)
{
UsrKeywordlabeling.Updatekeyname(text);
}
}
LstKey.ItemsSource = null;
LstKey.ItemsSource = keyCopy;
//LstKey.Items[LstKey.SelectedIndex] = text;
setRIkey();
}
else
{
string hint = Asa.FaceControl.Language.Dialog("KeyExists");
hint = hint.Replace("[name]", text);
new Asa.FaceControl.FaceMessageBox("", hint, MessageBoxButtons.OK).ShowDialog();
}
}
void setRIkey()
{
//LstKey.Items.Clear();
LstKey.ItemsSource=keyCopy;
for (int i = 0; i < LstKey.Items.Count; i++)
{
if (LstKey.Items[i] == BLLCommon.config.ReelIDKeyWord)
LstKey.Items[i] = "[RI]" + LstKey.Items[i];
}
}
private void UserControl_Loaded(object sender, RoutedEventArgs e)
{
LanguageWwitchover.SetLanguage(this);
}
}
}
namespace SmartScan.SetControl.WPF
{
partial class UsrWpfPanel
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.facepnl = new Asa.FaceControl.FacePanel();
this.SuspendLayout();
//
// facepnl
//
this.facepnl.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.facepnl.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.facepnl.BorderWidth = 2;
this.facepnl.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.facepnl.Location = new System.Drawing.Point(16, 20);
this.facepnl.Name = "facepnl";
this.facepnl.Padding = new System.Windows.Forms.Padding(3);
this.facepnl.ShowText = false;
this.facepnl.Size = new System.Drawing.Size(906, 758);
this.facepnl.TabIndex = 2;
this.facepnl.Text = "facePanel1";
this.facepnl.TitleFont = new System.Drawing.Font("宋体", 12F);
//
// UsrWpfPanel
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.Controls.Add(this.facepnl);
this.Name = "UsrWpfPanel";
this.Size = new System.Drawing.Size(1286, 866);
this.ResumeLayout(false);
}
#endregion
private Asa.FaceControl.FacePanel facepnl;
}
}
using Asa.FaceControl;
using Model;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Forms;
using System.Windows.Forms.Integration;
namespace SmartScan.SetControl.WPF
{
public partial class UsrWpfPanel : UserControl, ISetMenu
{
public UsrWpfPanel(UIElement ctl)
{
InitializeComponent();
elementHost = new ElementHost
{
Dock = DockStyle.Fill,
};
elementHost.Child = ctl;
}
ElementHost elementHost;
FacePanel ISetMenu.GetPanel()
{
facepnl.Controls.Add(elementHost);
return facepnl;
}
void ISetMenu.Save()
{
//ctl.Save();
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file \ No newline at end of file
...@@ -77,8 +77,11 @@ ...@@ -77,8 +77,11 @@
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\SharedDll\ConfigHelper.dll</HintPath> <HintPath>..\SharedDll\ConfigHelper.dll</HintPath>
</Reference> </Reference>
<Reference Include="DocumentFormat.OpenXml, Version=2.16.0.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL"> <Reference Include="DocumentFormat.OpenXml, Version=3.0.2.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
<HintPath>..\packages\DocumentFormat.OpenXml.2.16.0\lib\net46\DocumentFormat.OpenXml.dll</HintPath> <HintPath>..\packages\DocumentFormat.OpenXml.3.0.2\lib\net46\DocumentFormat.OpenXml.dll</HintPath>
</Reference>
<Reference Include="DocumentFormat.OpenXml.Framework, Version=3.0.2.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
<HintPath>..\packages\DocumentFormat.OpenXml.Framework.3.0.2\lib\net46\DocumentFormat.OpenXml.Framework.dll</HintPath>
</Reference> </Reference>
<Reference Include="ExcelNumberFormat, Version=1.1.0.0, Culture=neutral, PublicKeyToken=23c6f5d73be07eca, processorArchitecture=MSIL"> <Reference Include="ExcelNumberFormat, Version=1.1.0.0, Culture=neutral, PublicKeyToken=23c6f5d73be07eca, processorArchitecture=MSIL">
<HintPath>..\packages\ExcelNumberFormat.1.1.0\lib\net20\ExcelNumberFormat.dll</HintPath> <HintPath>..\packages\ExcelNumberFormat.1.1.0\lib\net20\ExcelNumberFormat.dll</HintPath>
...@@ -89,6 +92,14 @@ ...@@ -89,6 +92,14 @@
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> <HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference> </Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="SharpDocx, Version=2.5.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\SharpDocx.2.5.0\lib\net45\SharpDocx.dll</HintPath>
</Reference>
<Reference Include="SharpImage, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\SharpDocx.2.5.0\lib\net45\SharpImage.dll</HintPath>
</Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
...@@ -97,6 +108,7 @@ ...@@ -97,6 +108,7 @@
<Reference Include="System.ServiceModel.Web" /> <Reference Include="System.ServiceModel.Web" />
<Reference Include="System.Web" /> <Reference Include="System.Web" />
<Reference Include="System.Web.Extensions" /> <Reference Include="System.Web.Extensions" />
<Reference Include="System.Xaml" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
...@@ -107,6 +119,7 @@ ...@@ -107,6 +119,7 @@
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="WindowsBase" /> <Reference Include="WindowsBase" />
<Reference Include="WindowsFormsIntegration" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Common.cs" /> <Compile Include="Common.cs" />
...@@ -183,6 +196,22 @@ ...@@ -183,6 +196,22 @@
<Compile Include="SetControl\UsrWorkMode2.Designer.cs"> <Compile Include="SetControl\UsrWorkMode2.Designer.cs">
<DependentUpon>UsrWorkMode2.cs</DependentUpon> <DependentUpon>UsrWorkMode2.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="SetControl\WPF\Convent\BoolToColorConverter.cs" />
<Compile Include="SetControl\WPF\KeyName.xaml.cs">
<DependentUpon>KeyName.xaml</DependentUpon>
</Compile>
<Compile Include="SetControl\WPF\LanguageWwitchover.cs" />
<Compile Include="SetControl\WPF\MenuElementHost.cs" />
<Compile Include="SetControl\WPF\Models\ItemModel.cs" />
<Compile Include="SetControl\WPF\NS_Keyword.xaml.cs">
<DependentUpon>NS_Keyword.xaml</DependentUpon>
</Compile>
<Compile Include="SetControl\WPF\UsrWpfPanel.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="SetControl\WPF\UsrWpfPanel.Designer.cs">
<DependentUpon>UsrWpfPanel.cs</DependentUpon>
</Compile>
<Compile Include="UserLoginWindow.cs" /> <Compile Include="UserLoginWindow.cs" />
<Compile Include="Form\FrmAbout.cs"> <Compile Include="Form\FrmAbout.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
...@@ -384,10 +413,16 @@ ...@@ -384,10 +413,16 @@
<EmbeddedResource Include="SetControl\UsrCodeExtractList.resx"> <EmbeddedResource Include="SetControl\UsrCodeExtractList.resx">
<DependentUpon>UsrCodeExtractList.cs</DependentUpon> <DependentUpon>UsrCodeExtractList.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="SetControl\WPF\UsrWpfPanel.resx">
<DependentUpon>UsrWpfPanel.cs</DependentUpon>
</EmbeddedResource>
<None Include="app.manifest" /> <None Include="app.manifest" />
<None Include="Language\en-US.lngres"> <None Include="Language\en-US.lngres">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Include="Language\jn-JS.lngres">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Language\zh-CN.lngres"> <None Include="Language\zh-CN.lngres">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
...@@ -457,6 +492,16 @@ ...@@ -457,6 +492,16 @@
<ItemGroup> <ItemGroup>
<WCFMetadata Include="Connected Services\" /> <WCFMetadata Include="Connected Services\" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Page Include="SetControl\WPF\KeyName.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="SetControl\WPF\NS_Keyword.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>rem copy C:\Neotel\DLL\Halcon\halcondotnet.dll $(TargetDir)halcondotnet.dll <PostBuildEvent>rem copy C:\Neotel\DLL\Halcon\halcondotnet.dll $(TargetDir)halcondotnet.dll
......
...@@ -111,14 +111,9 @@ namespace SmartScan ...@@ -111,14 +111,9 @@ namespace SmartScan
public WebResultCamera GetPrintAiing(string a) public WebResultCamera GetPrintAiing(string a)
{ {
BLLCommon.extension.Clear(); //BLLCommon.extension.Clear();
scanWork.workCodeInfo = new(); //scanWork.workCodeInfo = new();
//string[] parts = a.Split(';');
//if (a.StartsWith("[") && a.EndsWith("]"))
//{
// a = a.Substring(1, a.Length - 2);
// Console.WriteLine(a);
//}
var aa = BLLCommon.macroKey; var aa = BLLCommon.macroKey;
// 2. 初始化目标字典 // 2. 初始化目标字典
Dictionary<string, string> aaa = new Dictionary<string, string>();// { { "LOT",null} }; Dictionary<string, string> aaa = new Dictionary<string, string>();// { { "LOT",null} };
...@@ -128,141 +123,20 @@ namespace SmartScan ...@@ -128,141 +123,20 @@ namespace SmartScan
} }
try try
{ {
// 解析 JSON 字符串 // 解析 JSON 字符串反序列化
aaa = JsonConvert.DeserializeObject<Dictionary<string, string>>(a); aaa = JsonConvert.DeserializeObject<Dictionary<string, string>>(a);
// 将解析结果赋值给 aaa 字典
//foreach (var key in aaa.Keys)
//{
// if (jsonObject.ContainsKey(key))
// {
// aaa[key] = jsonObject[key];
// }
//}
} }
catch (JsonException ex) catch (JsonException ex)
{ {
Console.WriteLine($"JSON 解析出错: {ex.Message}"); LogNet.log.Info($"JSON 解析出错: {ex.Message}");
} }
//string output = Regex.Replace(a, @"^-\s*|\n", "");
//string trimmed = a.Trim('[', ']').Replace("\n", "").Replace(" ", "");
//// 按逗号分隔字符串
//string[] keyValuePairs = trimmed.Split(new[] { '\"', ',' }, StringSplitOptions.RemoveEmptyEntries);
//foreach (var line in keyValuePairs)
//{
// string[] part = line.Split(new[] { ':' }, 2); // Split on first colon only
// if (part.Length == 2)
// {
// var key = part[0].Trim();
// var value = part[1].Trim();
// aaa[key] = value;
// }
//}
//var dataDict = new Dictionary<string, string>();
//foreach (var part in parts)
//{
// if (part.Contains(":"))
// {
// var keyValue = part.Split(new[] { ':' }, 2);
// dataDict[keyValue[0].Trim()] = keyValue[1].Trim();
// }
//}
//// Extract specific values with fallback to empty string if not found
//string article = parts[0]; // "ArticleRTIRES09221"
//string cleanedArticle = article.StartsWith("Article") ? article.Substring(7) : article; // 去掉 "Article"
//string vpn = dataDict.TryGetValue("VP/N", out var v) ? v : "";
//string lot = dataDict.TryGetValue("LOT", out var l) ? l : "";
//string qty = dataDict.TryGetValue("QTY", out var q) ? q : "";
//string coo = dataDict.TryGetValue("COO", out var c) ? c : "";
//string articleNumber = parts[0].Replace("Article", "PR"); // 将Article替换为PR
//string vpn = "";
//string lot = "";
//string qty = "";
//string coo = "AUSTIN"; // 根据要求固定为AUSTIN
//foreach (string segment in parts)
//{
// if (segment.StartsWith("VP/N:"))
// {
// vpn = segment.Substring(5); // 获取VP/N的值
// }
// else if (segment.StartsWith("LOT:"))
// {
// lot = segment.Substring(4); // 获取LOT的值
// }
// else if (segment == "5000") // QTY是单独的分段
// {
// qty = "5000";
// }
//}
//string text1 = articleNumber; // PRTIRES09221
//string text2 = $"{vpn};{lot};{qty};{coo}"; // CR0603-10W-2001FT;330NO057040;5000;AUSTIN
//// 4. 添加到workCodeInfo
//scanWork.workCodeInfo.Add(new CameraVisionLib.Model.BarcodeInfo { Text = text1 });
//scanWork.workCodeInfo.Add(new CameraVisionLib.Model.BarcodeInfo { Text = text2 });
// 2. Create the required text entries
//var text1 = $"{cleanedArticle}";
//var text2 = $"{vpn};{lot};{qty};{coo.Split(' ').FirstOrDefault()}";
// 3. Add to workCodeInfo
//scanWork.workCodeInfo.Add(new CameraVisionLib.Model.BarcodeInfo { Text = text1 });
//scanWork.workCodeInfo.Add(new CameraVisionLib.Model.BarcodeInfo { Text = text2 });
// aaa.Add(aa);
//{
// { "LOT", null }, // 默认值为 null
// { "Sample_2", null }, // 默认值为 null
// { "RID", null }, // 默认值为 null
// { "QTY", null }, // 默认值为 null
// { "VPN", null }, // 默认值为 null
// { "VPN_2", null }, // 默认值为 null
// { "FC", null }, // 默认值为 null
// // 默认值为 null
//};
// 3. 遍历所有字段,提取 LOT 和 RID
// 遍历所有字段,提取目标值
//foreach (string part in parts)
//{
// 检查字段是否包含目标键(如 "LOT:"、"QTY:"、"VP/N:")
// foreach (string key in aaa.Keys.ToList()) // 遍历字典的键
// {
// 特殊处理 VP/ N → VPN(替换 "/" 为 "_")
// string prefix = (key == "VPN") ? "VP/N:" : key + ":";
// if (part.StartsWith(prefix))
// {
// aaa[key] = part.Substring(prefix.Length); // 提取冒号后的值
// break; // 找到后跳出当前循环
// }
// if (part.StartsWith(prefix))
// {
// if (key == "LOT")
// {
// aaa[key] = $"<OCR>{part.Substring(prefix.Length)}";
// }
// else
// {
// aaa[key] = part.Substring(prefix.Length);
// aaa[key] = $"<OCR>{part.Substring(prefix.Length)}";
// }
// break;
// }
// }
//}
try try
{ {
bool hasMatch = scanWork.MatchingTemplate(); //bool hasMatch = scanWork.MatchingTemplate();
bool hasMatch = true;
BLLCommon.extension.SetKey(scanWork.originalCodeText, aaa, hasMatch, out _); BLLCommon.extension.SetKey(scanWork.originalCodeText, aaa, hasMatch, out _);
BLLCommon.extension.Print(hasMatch, aaa); BLLCommon.extension.Print(hasMatch, aaa);
} }
...@@ -272,11 +146,7 @@ namespace SmartScan ...@@ -272,11 +146,7 @@ namespace SmartScan
return new WebResultCamera { Text = "NG" }; return new WebResultCamera { Text = "NG" };
} }
//Common.frmMain.Invoke(delegate ()
//{
//scanWork.SetKey(hasMatch);
//});
//PrintAiing?.Invoke(aaa);
return new WebResultCamera { Text = "OK" }; return new WebResultCamera { Text = "OK" };
} }
public static void SaveBitmapToFile(Bitmap bmp, string filePath) public static void SaveBitmapToFile(Bitmap bmp, string filePath)
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware> <longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</windowsSettings> </windowsSettings>
</application> </application>
<!-- 启用 Windows 公共控件和对话框的主题(Windows XP 和更高版本) --> <!-- 启用 Windows 公共控件和对话框的主题(Windows XP 和更高版本) -->
<!-- <!--
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="ClosedXML" version="0.96.0" targetFramework="net472" /> <package id="ClosedXML" version="0.96.0" targetFramework="net472" />
<package id="DocumentFormat.OpenXml" version="2.16.0" targetFramework="net472" /> <package id="DocumentFormat.OpenXml" version="3.0.2" targetFramework="net472" />
<package id="DocumentFormat.OpenXml.Framework" version="3.0.2" targetFramework="net472" />
<package id="ExcelNumberFormat" version="1.1.0" targetFramework="net472" /> <package id="ExcelNumberFormat" version="1.1.0" targetFramework="net472" />
<package id="log4net" version="2.0.12" targetFramework="net461" /> <package id="log4net" version="2.0.12" targetFramework="net461" />
<package id="Microsoft.CSharp" version="4.7.0" targetFramework="net472" /> <package id="Microsoft.CSharp" version="4.7.0" targetFramework="net472" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net461" /> <package id="Newtonsoft.Json" version="13.0.1" targetFramework="net461" />
<package id="SharpDocx" version="2.5.0" targetFramework="net472" />
</packages> </packages>
\ No newline at end of file \ No newline at end of file
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!