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
|
5a89a88437
|
105040 Update 添加CableLectotypeId绑定
|
2024-12-23 11:58:44 +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
|
870faf37a9
|
105040 优化电机线材选型页面
|
2024-12-02 11:02:52 +08:00 |
lihanbo
|
6818840420
|
105040 测试版本,增加功能与优化,调整了数据源
|
2024-11-26 10:34:31 +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
|
37172cc58a
|
105040 Update 伺服电机线缆抓取增加PDF查看,BOM查看,优化界面
|
2024-11-15 15:04:45 +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
|
7bc9c84af3
|
105040 Update 修改下单表导出时的日期格式
|
2024-11-08 17:09:11 +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
|
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
|
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
|
04b57294ce
|
105040 增加字段,优化数量逻辑,修复检查大小匹配时的错误
|
2024-10-28 17:56:13 +08:00 |
lihanbo
|
f194ff589c
|
105040 修改端子检查逻辑,增加地线检查与料号匹配
|
2024-10-26 14:40:12 +08:00 |
lihanbo
|
f41e0e39b4
|
增加导出时的是否忽略异常字段
|
2024-10-26 14:00:22 +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
|
f2cd6c50b2
|
105040 Update 增加叉耳端子检查
|
2024-10-25 08:37:28 +08:00 |
lihanbo
|
faa4bbf20d
|
添加项目文件。
|
2024-10-24 18:01:26 +08:00 |