lihanbo
|
5d8eb5d05a
|
105040 Update 调整线材资料排序方式
|
2025-01-11 12:29:50 +08:00 |
lihanbo
|
9a76f9e60a
|
105040 Fix 窗口关闭时注销事件的错误
|
2025-01-11 12:29:08 +08:00 |
lihanbo
|
4fec37dfb1
|
105040 Update 调整使用的符号为全角符号
|
2025-01-11 12:27:26 +08:00 |
lihanbo
|
3da2dd39bf
|
105040 Update 伺服电机线材抓取增加安川逻辑
|
2025-01-10 14:41:51 +08:00 |
lihanbo
|
c25035284f
|
105040 Update 线材类型从线型号名中判断获取
|
2024-12-23 12:06:32 +08:00 |
lihanbo
|
ec7916db1d
|
105040 Update 增加DLL引用;不再复制引用DLL到目标路径
|
2024-12-23 12:05:54 +08:00 |
lihanbo
|
4b2f449a97
|
105040 Update 不再使用json转换;增加DEBUG标记判断,方便调试
|
2024-12-23 12:05:05 +08:00 |
lihanbo
|
5b11cae2cd
|
105040 Fix 动力刹车线逻辑
|
2024-12-23 12:04:21 +08:00 |
lihanbo
|
9ffe8c8080
|
105040 Update 使用共享盘获取数据;修改Sheet名为外部品牌参数传入
|
2024-12-23 12:02:05 +08:00 |
lihanbo
|
d6bfc21127
|
105040 Update 复制时增加全局提示;布线助手界面增加插入电缆按钮;
|
2024-12-23 12:01:16 +08:00 |
lihanbo
|
844e10040e
|
105040 Update 不再使用json保存
|
2024-12-23 11:59:41 +08:00 |
lihanbo
|
5a89a88437
|
105040 Update 添加CableLectotypeId绑定
|
2024-12-23 11:58:44 +08:00 |
lihanbo
|
8e1612b873
|
105040 Update 添加默认值
|
2024-12-23 11:58:23 +08:00 |
lihanbo
|
32f3bc54b5
|
105040 Update 将Service移动到WPFUI包中
|
2024-12-23 11:57:55 +08:00 |
lihanbo
|
c257842321
|
105040 Fix 修复Enum.IsDefined无法正确判断的问题
|
2024-12-23 11:57:20 +08:00 |
lihanbo
|
10410dcee2
|
105040 Clean code
|
2024-12-17 15:16:37 +08:00 |
lihanbo
|
d5465df3ae
|
105040 Update 优化查找电机功能,使用Tag传值
|
2024-12-17 15:15:51 +08:00 |
lihanbo
|
59a74a1c17
|
105040 Update 注册提示区域,增加按钮事件复制内容
|
2024-12-17 15:15:12 +08:00 |
lihanbo
|
a885412c9f
|
105040 Update 优化读取Excel逻辑
|
2024-12-17 15:14:25 +08:00 |
lihanbo
|
f65a13f180
|
105040 Update 添加提示位置,优化按钮与布局
|
2024-12-17 15:12:41 +08:00 |
lihanbo
|
bbd32fa7d8
|
105040 Update 移除非必要的函数调用
|
2024-12-17 15:12:01 +08:00 |
lihanbo
|
bd4063346c
|
105040 Update 优化选中线检查逻辑
|
2024-12-17 15:10:32 +08:00 |
lihanbo
|
e979379045
|
105040 Update 调整提示等级,改为警告
|
2024-12-17 15:09:47 +08:00 |
lihanbo
|
394427a193
|
105040 Update 处理电机型号
|
2024-12-17 15:09:07 +08:00 |
lihanbo
|
19e04eb3ed
|
105040 优化与完善功能实现
重构和功能增强
删除了无用的注释和文件,添加了新的属性和方法,调整了窗口布局和视图模型引用。具体更改包括:
- 删除 `MotorModel.cs` 中 `_motorPower` 的 `inheritdoc` 注释。
- `ScanCableModel.cs` 中添加 `Id` 属性及其私有字段 `_id`。
- 更新 `Sinvo.EplanHpD.Plugin.WPFUI.csproj`,删除 `Utils\DrawPDFHelper.cs` 和 `Utils\MessageSend.cs` 的编译引用,添加 `ViewModel\LayoutHelperViewModel.cs` 的编译引用,并添加 `KissStudio.DotNetDetour` 包的引用。
- 删除 `DrawPDFHelper.cs` 和 `MessageSend.cs` 文件内容。
- `LayoutHelperWindow.xaml` 中增加 `viewmodel` 命名空间引用,调整窗口高度和最小高度,设置 `d:DataContext`,并在窗口加载时调用 `GlowWindow_Loaded` 方法,修改部分 `TextBlock` 和 `ListView` 的内容绑定。
- `LayoutHelperWindow.xaml.cs` 中添加 `LayoutHelperViewModel` 的引用,并在构造函数中初始化 `viewModel`,设置 `DataContext`,在 `OnInit` 方法中调用 `GetMotorCables`,添加 `GlowWindow_Loaded`、`PrevBtn_Click` 和 `NextBtn_Click` 方法。
- `LectotypeWindow.xaml.cs` 中修改 `StartLayoutBtn_Click` 方法,传递 `motorIds` 给 `LayoutHelperWindow` 的构造函数。
- `ScannerViewModel.cs` 中添加 `Id` 属性的赋值,修改 `PerformSearch` 方法以根据 `Imprint` 进行搜索,添加 `ToSourceById` 方法用于根据 `occId` 定位线缆。
- 在 `DesignPluginEntry.cs`、`PluginEntry.cs` 和 `ScanPluginEntry.cs` 中添加 `Sinvo.EplanHpD.Plugin.WPFUI.Extension` 的引用。
- 新增 `LayoutHelperViewModel.cs` 文件,定义 `LayoutHelperViewModel` 类及其相关属性和方法,用于处理电机和线缆的选择和切换逻辑。
|
2024-12-10 17:02:58 +08:00 |
lihanbo
|
3bab55aff6
|
105040 Rename CableLectotypeWindow -> CableLectotypeUserControl
|
2024-12-05 14:38:54 +08:00 |
lihanbo
|
bfb9d9b880
|
105040 Clear code
|
2024-12-05 14:37:31 +08:00 |
lihanbo
|
7bcddb1702
|
105040 优化界面显示效果
|
2024-12-05 14:15:08 +08:00 |
lihanbo
|
01ce9d436a
|
105040 增加布线助手窗口
|
2024-12-04 14:21:35 +08:00 |
lihanbo
|
698c23fcdb
|
105040 优化界面样式
|
2024-12-03 16:10:44 +08:00 |
lihanbo
|
2740456d41
|
105040 增加数据库保存,优化界面
|
2024-12-03 11:50:36 +08:00 |
lihanbo
|
870faf37a9
|
105040 优化电机线材选型页面
|
2024-12-02 11:02:52 +08:00 |
lihanbo
|
4ffa6d478a
|
105040 Add 扫码器插件
|
2024-12-02 09:28:54 +08:00 |
lihanbo
|
6818840420
|
105040 测试版本,增加功能与优化,调整了数据源
|
2024-11-26 10:34:31 +08:00 |
lihanbo
|
b7591e9cb2
|
105040 Update 优化滚动效果
|
2024-11-26 10:33:07 +08:00 |
lihanbo
|
4be42fdc5c
|
更新 UI 和逻辑,添加新功能和改进错误处理
在 `MainWindow.xaml` 中:
- 修改 `CheckBox` 控件,绑定 `IsUseDiscoloration` 属性,添加 `IsEnabled="False"` 和 `ToolTip`。
- 添加两个新的 `MenuItem`,分别绑定 `ToSourceAndHideOthers_Click` 和 `ShowAllWire_Click` 事件。
- 移除 `MultiDataTrigger.Conditions` 中的一个 `Condition` 和 `DataGrid.Resources` 中的一个 `Style`。
在 `MainWindow.xaml.cs` 中:
- 注释掉 `GoToSource_Click` 方法中的 `HideOthers()` 调用。
- 添加 `OthersWireShow` 方法。
- 添加 `ToSourceAndHideOthers_Click` 和 `ShowAllWire_Click` 方法。
在 `MainViewModel.Check.cs` 中:
- 添加 `using System.IO.Packaging;` 引用。
- 修改 `ValidateItem` 方法,注释掉 `IsUseDiscoloration` 的判断。
- 在 `CheckImprintCondition` 方法中,添加对 `DiscolorationDesc` 和 `Insulation` 的检查,改进错误处理逻辑。
在 `MainViewModel.cs` 中:
- 初始化 `IsUseDiscoloration` 为 `true`。
|
2024-11-26 10:31:58 +08:00 |
lihanbo
|
ed490f4315
|
重构项目结构并添加新功能
将项目输出类型从 `Library` 更改为 `Exe`,并设置 `StartupObject` 为 `Sinvo.EplanHpD.Plugin.WPFUI.TestWindow`。删除了 `LectotypeWindow.xaml.cs` 的编译项,并添加了 `View\LectotypeWindow.xaml.cs`、`View\MainWindow.xaml.cs` 和 `View\CableLectotypeWindow.xaml.cs` 的编译项。添加了 `Utils\BaseAppExt.cs` 的编译项。
将 `MainWindow.xaml` 和 `TestWindow.xaml` 的页面项移动到 `View` 文件夹下,并添加了 `CableLectotypeWindow.xaml` 的页面项。在项目文件中添加了 `Common` 文件夹。在 `TestWindow.xaml.cs` 中添加了 `Main` 方法,并在其中显示 `CableLectotypeWindow`。
在 `Theme.xaml` 中添加了一个 `DataGrid` 的样式。添加了 `CableLectotypeWindow.xaml` 和 `CableLectotypeWindow.xaml.cs` 文件,定义了一个新的窗口。在 `LectotypeWindow.xaml` 中添加了一个按钮和 `DataGrid` 的上下文菜单,并在 `LectotypeWindow.xaml.cs` 中添加了多个事件处理方法。
在 `MainWindow.xaml.cs` 中修改了 `Dispatcher` 的调用方式。在 `DesignPluginEntry.cs` 中添加了 `EPLAN.Harness.AppCore` 的引用,并设置了窗口的所有者。在 `Sinvo.EplanHpD.Plugin.csproj` 中添加了 `EPLAN.Harness.AppCore` 的引用。
|
2024-11-19 12:11:29 +08:00 |
lihanbo
|
04045b01e3
|
更新 MotorModel 和 LectotypeViewModel 逻辑
在 `MotorModel.cs` 文件中,添加了一个新的私有字段 `_occPartId` 和对应的公共属性 `OccPartId`,并在属性设置时调用 `OnPropertyChanged` 方法。
在 `BaseAppExt.cs` 文件中,新增了一个静态类 `BaseAppExt`,包含一个静态方法 `GetApplication`,用于获取当前活动的 `BaseApp` 实例。
在 `LectotypeViewModel.cs` 文件中:
- 将变量 `doc` 重命名为 `designer`,并相应地修改了获取线材的代码。
- 添加了一个事件处理方法 `SelectSet_NodeSelected`,并在某个任务完成时订阅了 `designer.SelectSet.NodeSelected` 事件。
- 将 `ToMotorSource` 方法的参数 `motorName` 改为 `motorId`,并修改了获取部件和电缆的逻辑。
- 创建 `MotorModel` 实例时,新增了对 `OccPartId` 属性的赋值。
|
2024-11-19 11:56:06 +08:00 |
lihanbo
|
0acb2f7bb4
|
调整 ToggleButton 宽度属性
修改了 `ToggleButton` 的 `Width` 属性,将其从 `200` 改为 `130`。
|
2024-11-16 08:46:11 +08:00 |
lihanbo
|
ed140b5952
|
105040 存在错误项,不允许导出报表
|
2024-11-16 08:45:32 +08:00 |
lihanbo
|
4a997baa0e
|
105040 更新多个控件的属性和删除注释代码
在 <hc:Card> 和 <TabControl> 中添加 FontSize="14" 属性。
在 <DataGrid> 中修改虚拟化相关属性,添加 IsReadOnly="True"。
在 <DataGrid.RowStyle> 中添加 BorderBrush="#CC002255" 属性。
在 <Expander> 中调整 BorderThickness,添加子元素属性。
删除 <DataGrid> 和 <ListView> 的注释代码块。
在 <ListView> 中删除多个属性。
|
2024-11-16 08:45:11 +08:00 |
lihanbo
|
4d856bbfe5
|
105040 使用共享盘中的资料
|
2024-11-16 08:43:06 +08:00 |
lihanbo
|
37172cc58a
|
105040 Update 伺服电机线缆抓取增加PDF查看,BOM查看,优化界面
|
2024-11-15 15:04:45 +08:00 |
lihanbo
|
9c0d3acdfa
|
105040 Update 线材检查增加导出文件名自定义,增加刷新报表数据,修复部分情况下导致的长度异常
|
2024-11-15 15:04:08 +08:00 |
lihanbo
|
40cbbc7d55
|
添加 ApplicationExt 静态类及初始化调用,解决因为未初始化主机导致的找不到资源问题
在 ApplicationExt.cs 文件中添加了一个新的静态类 ApplicationExt,包含 SetMainWindow 和 InitApplication 方法。更新 DesignPluginEntry.cs 和 PluginEntry.cs 文件,引入 Sinvo.EplanHpD.Plugin.WPFUI.Utils 命名空间,并在 Initialize 方法中调用 ApplicationExt.InitApplication 方法。
|
2024-11-15 15:02:16 +08:00 |
lihanbo
|
a0f401aad6
|
105040 多芯线数据抓取优化,导出、右键跳转、图纸与BOM查看
|
2024-11-14 19:22:25 +08:00 |
lihanbo
|
1d394780a7
|
105040 从3D中抓取多芯线数据
|
2024-11-13 13:39:06 +08:00 |
lihanbo
|
5bc1533d9b
|
添加异常处理并重构 MainViewModel.Check.cs
在 MainViewModel.Check.cs 文件中添加了多个 try-catch 块,以捕获异常并设置错误信息。重构了 ValidateItem、CheckWireErpNr 和 CheckRequiredFields 方法的代码逻辑,确保在不同情况下设置相应的错误信息。
|
2024-11-08 17:14:38 +08:00 |
lihanbo
|
c2dca12e99
|
重构生成线缆型号的逻辑
对生成线缆型号的逻辑进行了重构和优化:
- 在 `MainViewModel.Check.cs` 文件中:
- 注释掉了原有的直接拼接字符串生成线缆型号的代码。
- 新增了调用 `GenWireModel` 方法来生成线缆型号的代码,并在调用时对线缆长度进行了处理。
- 在 `MainViewModel.cs` 文件中:
- 注释掉了原有的直接拼接字符串生成线缆型号的代码。
- 新增了调用 `GenWireModel` 方法来生成线缆型号的代码。
- 新增了 `GenWireModel` 方法,该方法接收线缆颜色、截面积、线缆长度和线缆编号作为参数,并返回生成的线缆型号字符串。
|
2024-11-08 17:13:24 +08:00 |
lihanbo
|
5afa7c0892
|
105040 Update 更新提示内容指引
|
2024-11-08 17:11:07 +08:00 |
lihanbo
|
861253e891
|
105040 Update 调整导出表格文件名为机构信息
|
2024-11-08 17:10:38 +08:00 |
lihanbo
|
82a9f67d8c
|
105040 Update 窗口打开时重新加载缓存数据
|
2024-11-08 17:10:10 +08:00 |
lihanbo
|
7bc9c84af3
|
105040 Update 修改下单表导出时的日期格式
|
2024-11-08 17:09:11 +08:00 |
lihanbo
|
9e7815e7ee
|
更新程序集版本信息至 1.0.0.16
更新了 `AssemblyInfo.cs` 文件中的程序集版本信息:
- 将 `AssemblyVersion` 从 `1.0.0.13` 更新为 `1.0.0.16`。
- 将 `AssemblyFileVersion` 从 `1.0.0.15` 更新为 `1.0.0.16`。
- 将 `AssemblyInformationalVersion` 从 `1.0.0.15` 更新为 `1.0.0.16`。
|
2024-11-08 15:30:28 +08:00 |
lihanbo
|
c387222d1f
|
更改日期属性类型并更新日期格式
在 `ExportModel.cs` 文件中:
- 添加了 `MiniExcelLibs.Attributes` 和 `System` 的引用。
- 将 `OrderDate` 和 `DeliveryDate` 属性的数据类型从 `string` 改为 `DateTime`,并添加了 `ExcelColumn` 属性以指定日期格式为 "MM月dd日"。
在 `MainViewModel.cs` 文件中:
- 修改了 `data.Model` 的格式字符串,将 "1x" 改为 "1×"。
- 将 `nowDateStr` 和 `nowDeliveryDateStr` 的初始化从字符串格式的日期改为 `DateTime` 类型,并注释掉了 `.ToString("yyyy-MM-dd")` 部分。
|
2024-11-08 15:29:49 +08:00 |
lihanbo
|
0ff6557251
|
更新 MainWindow.xaml 和 MainWindow.xaml.cs 文件
在 MainWindow.xaml 文件中:
- 修改 DataGrid.RowStyle 和 DataGridCell 样式中 IsSelected 触发器的 Background 属性值。
在 MainWindow.xaml.cs 文件中:
- 重构了 SelectedItems 相关代码,优化了条件判断和循环逻辑。
- 保留并调整了注释代码的缩进。
|
2024-11-08 15:28:38 +08:00 |
lihanbo
|
4a06cb018c
|
添加导出完成提示框和忽略异常确认对话框
在 `MainWindow.xaml.cs` 文件中,`saveFileDialog.ShowDialog()` 方法调用后,添加了一行代码 `FlexMessageBox.Info($"导出完成!");`,用于在导出完成后显示信息提示框。
在 `IgnoreSelectedError_Click` 方法中添加了一段代码,用于在用户点击忽略异常按钮后,弹出一个警告对话框,询问用户是否继续操作。如果用户选择继续,则设置 `isContinue` 为 `true`,并继续执行后续代码。
|
2024-11-08 15:27:46 +08:00 |
lihanbo
|
a10a4371ba
|
优化并行处理和代码可读性
格式化了 `data.Where` 的条件部分以提高可读性。
将并行度从 1 提升到 8 以提高性能。
|
2024-11-08 10:21:10 +08:00 |
lihanbo
|
83449ea2dd
|
更新程序集版本信息至1.0.0.15
更新了 `AssemblyInfo.cs` 文件中的程序集版本信息:
- 将 `[assembly: AssemblyVersion("1.0.0.14")]` 更新为 `[assembly: AssemblyVersion("1.0.0.15")]`。
- 将 `[assembly: AssemblyFileVersion("1.0.0.14")]` 更新为 `[assembly: AssemblyFileVersion("1.0.0.15")]`。
- 将 `[assembly: AssemblyInformationalVersion("1.0.0.14")]` 更新为 `[assembly: AssemblyInformationalVersion("1.0.0.15")]`。
- 将 `[assembly: AssemblyFileVersion("1.0.0.8")]` 更新为 `[assembly: AssemblyFileVersion("1.0.0.15")]`。
|
2024-11-08 10:17:50 +08:00 |
lihanbo
|
ef54992069
|
105040 添加搜索和异常筛选功能
在 `MainWindow.xaml` 中添加了 `StackPanel`,包含 `SearchBar` 和 `ToggleButton`。将 `DataGrid` 的 `ItemsSource` 从 `StuffedData` 更改为 `SearchedData`。在 `MainWindow.xaml.cs` 中初始化 `ViewModel.SearchedData`,并在数据加载完成后调用 `ViewModel.SearchByWireName(null)` 进行初始搜索。添加 `SearchBar_SearchStarted` 方法处理搜索事件,并调用 `ViewModel.SearchByWireName` 进行搜索。在 `StuffedDataModel.cs` 中删除 `INotifyPropertyChanged` 接口的实现。在 `MainViewModel.cs` 中添加 `SearchedData` 和 `OnlyShowError` 属性,以及 `SearchByWireName` 方法用于搜索和更新 `SearchedData`。
|
2024-11-08 10:16:58 +08:00 |
lihanbo
|
34e2337864
|
添加多个方法的注释以提高代码可读性
添加了以下方法的注释:
- `CheckDPETerminals`:检查地排端子
- `CheckWireErpNr`:检查线材料号
- `CheckNumberTube`:检查号码管
- `CheckRequiredFields`:检查必填项
- `CheckCeCompliance`:检查是否全部使用CE认证物料
- `CheckInsulation`:检查变色套大小与是否使用变色管
- `CheckDuplicateModel`:检查重复
- `SetItemError`:将一项设置为异常
- `GetCanUsedTerminal`:获取可使用的端子
- `CheckImprint`:检查变色套是否使用正确的颜色
|
2024-11-08 09:19:27 +08:00 |
lihanbo
|
0ae84bd0ca
|
增加变色套检查逻辑
在 `MainViewModel.Check.cs` 文件中,新增了对变色套(绝缘软套)的检查逻辑。在 `else` 语句块中,增加了一个条件分支,调用 `CheckUseDiscoloration` 方法来检查是否使用了变色套,如果未匹配到变色套,则设置相应的错误信息。新增了 `CheckUseDiscoloration` 方法,该方法通过检查印记(imprint)是否符合特定前缀和标志类型的条件,来判断是否使用了变色套。`CheckUseDiscoloration` 方法中定义了一组印记条件,包括前缀和标志类型,并通过遍历这些条件来检查印记是否符合规范。
|
2024-11-08 09:19:10 +08:00 |
lihanbo
|
d9e039f168
|
优化 regex 和 dRegex 的正则表达式定义
这些更改使得正则表达式的定义更加简洁和一致。
具体来说,`\\.{0,1}` 被替换为 `\\.?`,`[\\d]+` 被替换为 `[\\d]*`,
以更好地匹配可能的输入格式。
|
2024-11-08 09:18:07 +08:00 |
lihanbo
|
143b0c3660
|
改进电缆数据处理和检查逻辑,更新版本号
在 `CheckTest.cs` 文件中,添加了多个测试方法,包括 `DPETerminalCheckTest`、`DPETerminalCrossSectionCheckTest` 和 `TerminalCheckTest`,用于检查不同端子的测试逻辑。
在 `AssemblyInfo.cs` 文件中,更新了程序集版本号和文件版本号。
在 `StuffTest.cs` 文件中,注释掉了一些断言语句,并添加了一个新的测试方法 `StuffedNameTubeTest`,用于测试号码管处理逻辑。
在 `LectotypeWindow.xaml` 文件中,添加了 `util` 命名空间引用,并定义了多个 `ControlTemplate` 模板和一个 `LectotypeLengthDataTemplateSelector` 模板选择器,用于根据线材类型选择不同的显示模板。同时,将 `DataGrid` 控件替换为 `ListView` 控件,并添加了上下文菜单和样式触发器。
在 `LectotypeWindow.xaml.cs` 文件中,添加了 `ToSourceMenuItem_Click` 方法,用于处理上下文菜单项的点击事件。
在 `MainWindow.xaml.cs` 文件中,重构了 `AddToDesignerSelectSet` 方法,添加了异常处理逻辑。
在 `Sinvo.EplanHpD.Plugin.WPFUI.csproj` 文件中,添加了 `LectotypeLengthDataTemplateSelector.cs` 文件的编译项。
在 `ExcelHelper.cs` 文件中,修改了 `GetWireTerminalMappingTable` 方法的过滤逻辑。
新增了 `LectotypeLengthDataTemplateSelector.cs` 文件,定义了 `LectotypeLengthDataTemplateSelector` 类,用于根据线材类型选择不同的数据模板。
在 `LectotypeViewModel.cs` 文件中:
* 添加了对 `EPLAN.Harness.ProjectCore.Occurrences` 命名空间的引用。
* 添加了 `StuffedWires` 属性及其对应的私有字段 `_stuffedWires`。
* 在 `LoadData` 方法中,添加了对 `StuffData` 方法的调用,并将结果赋值给 `Wires`。
* 添加了 `StuffData` 方法,用于整理和合并电缆数据。
* 在 `ToSource` 方法中,添加了根据电缆名称获取设计器并设置可见性的逻辑。
* 修改了 `CableType` 的默认值从 "位置类型" 改为 "未知类型"。
在 `MainViewModel.Check.cs` 文件中:
* 添加了 `CheckDPETerminals` 方法,用于检查地排端子。
* 修改了 `CheckTerminals` 方法,移除了对 `D-PE` 前缀的特殊处理逻辑。
* 修改了 `GetD_PECanUsedTerminal` 方法,注释掉了获取不包含前缀的端子的逻辑。
在 `DesignPluginEntry.cs` 文件中:
* 注释掉了 `DesignPluginEntry` 类实现的 `IHpDPlugin` 接口。
在 `AssemblyInfo.cs` 文件中:
* 更新了程序集版本号,从 `1.0.0.6` 更新到 `1.0.0.14`。
|
2024-11-08 08:34:20 +08:00 |
lihanbo
|
ed520cd26b
|
重命名StuffData方法参数并重构GetNumberTubeSpecification
重命名StuffData方法的参数和变量名称,改进并行处理和数据添加逻辑。重构GetNumberTubeSpecification方法,使用double.TryParse转换crossSection并返回相应规格。
|
2024-11-07 17:44:28 +08:00 |
lihanbo
|
65970751b3
|
更新多个文件,添加新功能和修复bug
在 `CheckTest.cs` 文件中,添加了三个新的测试方法:`CheckWireErpNrTest`、`ChecImprintTest` 和 `CheckSizeTest`。
在 `AssemblyInfo.cs` 文件中,将程序集版本和文件版本从 `1.0.0.5` 更新为 `1.0.0.6`。
在 `StuffTest.cs` 文件中,添加了一个新的断言 `Assert.IsTrue(result.Where(it => it.Imprint == "EC5L3").First().WireColor == "BK");`。
在 `LectotypeWindow.xaml` 文件中,添加了一个新的 `Window` 定义,包括资源字典、按钮和 `TabControl` 控件。
在 `LectotypeWindow.xaml.cs` 文件中,添加了 `LectotypeWindow` 类的定义和相关的事件处理方法。
在 `MainWindow.xaml` 文件中,移除了旧的样式定义,添加了新的资源字典引用,并更新了 `GroupBox` 为 `hc:Card` 控件,调整了按钮样式和 `DataGrid` 的样式。
在 `MainWindow.xaml` 文件中,更新了 `DataGrid` 的 `RowStyle` 和 `CellStyle`,并添加了新的触发器和样式设置。
在 `MainWindow.xaml` 文件中,更新了检查配置项的布局,使用 `hc:Card` 控件替换了 `GroupBox`,并调整了文本块的样式和布局。
在 `MainWindow.xaml.cs` 文件中:
* 在 `MainWindow` 类中添加了对 `model.IsError` 的检查,如果为 `true`,则将 `model.IsIgnore` 设置为 `true`。
* 在 `Copy_Click` 方法中添加了 `try-catch` 块来捕获异常,并在捕获到异常时显示错误消息。
* 在 `GoToSource_Click` 方法中添加了 `try-catch` 块来捕获异常,并在捕获到异常时显示错误消息。
* 将 `Array.Empty<object>()` 替换为 `[]`。
在 `CheckedModel.cs` 文件中:
* 注释掉了 `SetProperty` 方法中对 `Equals` 方法的检查。
在 `LectotypeModel.cs` 文件中:
* 新增了 `LectotypeModel` 类,包含多个属性和相应的 `OnPropertyChanged` 调用。
在 `LineSegmentModel.cs` 文件中:
* 新增了 `LineSegmentModel` 类,包含 `LineAxisNo`、`LineType` 和 `LineParagraph` 属性。
在 `AssemblyInfo.cs` 文件中:
* 更新了程序集版本号,从 `1.0.0.5` 更新到 `1.0.0.6`。
在 `Sinvo.EplanHpD.Plugin.WPFUI.csproj` 文件中:
* 添加了对 `EPLAN.Harness.MathLib` 的引用。
* 添加了 `LectotypeWindow.xaml` 和 `TestWindow.xaml` 及其对应的代码文件。
* 添加了 `HandyControl` 包的引用。
在 `TestWindow.xaml` 文件中:
* 新增了 `TestWindow` 窗口的 XAML 定义,包含一个 `DataGrid` 控件。
在 `TestWindow.xaml.cs` 文件中:
* 新增了 `TestWindow` 类,包含加载数据的方法。
在 `ExcelHelper.cs` 文件中:
* 修改了 `GetWireTerminalMappingTable` 方法,使其在 `Prefix` 为 `null` 时也能匹配。
* 新增了 `GetWireInfo` 方法,用于获取线材信息。
在 `LectotypeViewModel.cs` 文件中:
* 新增了 `LectotypeViewModel` 类,包含加载数据的方法和多个辅助方法。
在 `MainViewModel.Check.cs` 文件中:
* 在 `ValidateItem` 方法中添加了对 `CheckWireErpNr` 方法的调用。
* 新增了 `CheckWireErpNr` 方法,用于检查线材料号。
* 在 `CheckNumberTube` 方法中添加了对 `item.Imprint` 是否为空的检查。
将 `data.AsParallel().WithDegreeOfParallelism(8).ForAll(entry =>` 修改为 `data.Where(it => it.OrigOcc == "OccWire" && !(it?.Properties["WireName"]?.GetDisplayValue()?.StartsWith("导线") ?? false)).AsParallel().WithDegreeOfParallelism(1).ForAll(entry =>`,以过滤出 `OrigOcc` 为 "OccWire" 且 `WireName` 不以 "导线" 开头的数据,并将并行度设置为 1。
将 `data.FrontTerminalModel = item.ConnectorFrom.Contains(":") ? item.ConnectorFrom.Split(':')[0] : item.ConnectorFrom;` 修改为 `data.FrontTerminalModel = item.ConnectorFrom?.Contains(":") ?? false ? item.ConnectorFrom.Split(':')[0] : item.ConnectorFrom ?? "";`,以处理 `ConnectorFrom` 可能为 null 的情况。
将 `data.RearTerminalModel = item.ConnectorTo.Contains(":") ? item.ConnectorTo.Split(':')[0] : item.ConnectorTo;` 修改为 `data.RearTerminalModel = item.ConnectorTo?.Contains(":") ?? false ? item.ConnectorTo.Split(':')[0] : item.ConnectorTo ?? "";`,以处理 `ConnectorTo` 可能为 null 的情况。
删除了 `if (insulationModels.Any()) { data.Insulation = insulationModels.First(); }` 语句块,简化了代码逻辑。
更新了 `GetWireColorCode` 方法中的注释,将原来的注释替换为更简洁的版本。
|
2024-11-07 12:14:44 +08:00 |
lihanbo
|
09c4e983bd
|
105040 增加颜色匹配
|
2024-11-02 11:57:05 +08:00 |
lihanbo
|
d5e61f5ac2
|
105040 右键菜单列表增加 转至源 选项,直接打开3D模型并跳转选中到对应的线
|
2024-10-29 10:23:27 +08:00 |
lihanbo
|
04b57294ce
|
105040 增加字段,优化数量逻辑,修复检查大小匹配时的错误
|
2024-10-28 17:56:13 +08:00 |
lihanbo
|
ba6c125c95
|
105040 Update 忽略异常时只处理有异常的项
|
2024-10-28 14:30:24 +08:00 |
lihanbo
|
67a9e0c416
|
105040 Fix 变色套管匹配错误
|
2024-10-28 14:29:56 +08:00 |
lihanbo
|
5bcbacffd3
|
105040 Clean code
|
2024-10-26 14:40:46 +08:00 |
lihanbo
|
f194ff589c
|
105040 修改端子检查逻辑,增加地线检查与料号匹配
|
2024-10-26 14:40:12 +08:00 |
lihanbo
|
2978aab2ff
|
105040 调整为传入数据的方式,便于测试
|
2024-10-26 14:01:56 +08:00 |
lihanbo
|
21035167c8
|
105040 修复读取变量为空时的报错
|
2024-10-26 14:01:32 +08:00 |
lihanbo
|
f41e0e39b4
|
增加导出时的是否忽略异常字段
|
2024-10-26 14:00:22 +08:00 |
lihanbo
|
92c920b559
|
105040 增加带前缀查询
|
2024-10-26 14:00:04 +08:00 |
lihanbo
|
d24fdac142
|
105040 增加产品版本
|
2024-10-26 13:59:31 +08:00 |
lihanbo
|
5574ddbd0e
|
105040 增加地线前缀处理
|
2024-10-26 13:59:13 +08:00 |
lihanbo
|
ce014b95e0
|
105040 增加下单日期字段,增加逻辑
|
2024-10-26 10:27:03 +08:00 |
lihanbo
|
a8815b8f9a
|
105040 使用FormUISettings保存配置项
|
2024-10-25 15:17:32 +08:00 |
lihanbo
|
ecb6f69383
|
105040 调整进度条样式与选择文件框过滤
|
2024-10-25 15:16:39 +08:00 |
lihanbo
|
ea543c8992
|
105040 Clean code
|
2024-10-25 08:40:22 +08:00 |
lihanbo
|
f2cd6c50b2
|
105040 Update 增加叉耳端子检查
|
2024-10-25 08:37:28 +08:00 |
lihanbo
|
faa4bbf20d
|
添加项目文件。
|
2024-10-24 18:01:26 +08:00 |