Commit Graph

75 Commits

Author SHA1 Message Date
lihanbo 1fc8ba3603 105040 Update 如果电机型号没有直通线信息,默认强制指定为一种
更新版本号到1.0.0.27
2025-02-19 13:40:49 +08:00
lihanbo 9e3e71a4ca 105040 Update 更新安川电机逻辑,750W以下功率不生成前段线
更新程序集版本,添加新方法和类

更新了 `AssemblyInfo.cs` 文件中的程序集版本号至 `1.0.0.26`。
在 `MotorLectotypeService.cs` 文件中添加了 `SetLineDone` 方法。
在 `Sinvo.EplanHpD.Plugin.WPFUI.csproj` 文件中添加了 `MotorPowerModel.cs` 文件的编译包含项。
在 `MotorExcelHelper.cs` 文件中添加了 `GetMotorPower` 方法,用于获取电机功率。
在 `CableLectotypeViewModel.cs` 文件中进行了多处修改,包括修正逻辑、初始化 `LectotypeList`、根据电机功率决定前段线、排序并重新设置序号。
在 `Sinvo.EplanHpD.Plugin.csproj` 文件中更新了多个配置的输出路径。
添加了 `MotorPowerModel.cs` 文件,定义了 `MotorPowerModel` 类,用于表示电机功率。
2025-02-14 15:40:43 +08:00
lihanbo 4b088964e2 105040 Update 增加识别刹车线 2025-02-14 09:56:53 +08:00
lihanbo ec7bb642e2 Merge branch 'master' of http://192.168.1.144:8859/SinvoCSharp/Sinvo.EplanHpD.Plugin.WireCheck 2025-02-14 09:24:01 +08:00
lihanbo d7f61b0db3 105040 Update 增加第三种直通线选择,可选择的线材种类数量由配置表决定
增加 CableTypeThree 属性及相关处理

在 CableLectotype.cs 文件中增加了 CableTypeThree 属性,并设置了 SugarColumn(IsNullable = true)。
在 MotorLectotypeService.cs 文件中增加了对 CableTypeThree 属性的处理。
在 Sinvo.EplanHpD.Plugin.WPFUI.csproj 文件中增加了对 MotorPassthroughCable.cs 文件的编译包含。
在 MotorExcelHelper.cs 文件中增加了 GetPassthroughCableCount 方法。
在 CableLectotypeUserControl.xaml 文件中修改了 hc:SimpleStackPanel 的 Visibility 绑定属性。
在 CableLectotypeUserControl.xaml.cs 文件中增加了对 EPLAN.Harness.Core.Interfaces 的引用,并在 CableLectotypeViewModel 类中增加了一个实例。
在 CableLectotypeViewModel.cs 文件中增加了对 CableTypeThree 属性的处理,并增加了 _passthroughCableCount 和 IsEnableThreeCableType 属性及其相关逻辑。
在 MotorPassthroughCable.cs 文件中增加了 MotorPassthroughCable 类,用于表示电机直通线数量。
2025-02-14 09:22:11 +08:00
SINVO\yangshunli 4a977023f8 105067 优化选中部件高亮显示 2025-02-13 12:00:20 +08:00
lihanbo 823f8998de Merge branch 'master' of http://192.168.1.144:8859/SinvoCSharp/Sinvo.EplanHpD.Plugin.WireCheck 2025-02-13 08:55:20 +08:00
lihanbo 3d0606a619 105040 增加线材检查,段数按照已选择的电机选型数据获取
添加电机线段数获取及第三种线材类型支持

在 `MotorLectotypeService.cs` 文件中,添加了 `GetLineCount` 方法,用于获取电机对应的线段数。

在 `MotorExcelHelper.cs` 文件中,添加了 `#if DEBUG` 和 `#else` 预处理指令,以便在调试模式和发布模式下使用不同的文件路径。

在 `CableLectotypeUserControl.xaml` 文件中,添加了 `BooleanToVisibilityConverter` 资源,并在界面中添加了一个新的 `SimpleStackPanel`,用于显示第三种线材类型的选择。

在 `CableLectotypeViewModel.cs` 文件中,添加了 `CableTypeThree` 属性和 `IsShowThreeCableType` 属性,用于绑定第三种线材类型的选择和显示控制。

在 `LectotypeViewModel.cs` 文件中,添加了对 `MotorLectotypeService` 的引用,并在构造函数中实例化了 `MotorLectotypeService`。在处理电机和线材匹配时,增加了对电机信息的检查和线段数的获取逻辑。
2025-02-13 08:55:12 +08:00
SINVO\yangshunli a8dcd5bd9c 105067 点击部件和管脚能追踪到对应部件 2025-02-12 10:15:34 +08:00
lihanbo aaa8a77ccc 105040 Update 优化安川逻辑,直通线允许选择两种 2025-02-11 14:48:15 +08:00
lihanbo 6465a465ac 105040 Update
1. 修复部分情况下导致动力刹车线没有显示长度的问题;
2. 修复布线助手无法回到上一个电机的问题;
3. 修复直通线类型识别问题。
4. 提升版本号到1.0.0.22
2025-02-10 16:14:25 +08:00
lihanbo 8ce1bc5190 105040 增加注释,优化逻辑 2025-02-10 09:53:41 +08:00
SINVO\yangshunli aaac1c51dc Merge remote-tracking branch 'origin/master'
# Conflicts:
#	Sinvo.EplanHpD.Plugin.WPFUI/ViewModel/LectotypeViewModel.cs
2025-02-08 09:50:08 +08:00
SINVO\yangshunli f0d4e614de 105067 优化重复生成线材列表导致崩溃 2025-02-08 09:46:17 +08:00
lihanbo d5c03a1248 添加 IsComplete 属性,更新注释和方法逻辑
在 LectotypeLine.cs 中添加 IsComplete 属性并标记为可空。
在 MotorLectotypeService.cs 中更新映射和 SetColumns 方法。
在 CableLectotypeUserControl.xaml 中修改 CheckBox 绑定和注释 GridViewColumn。
在 LectotypeWindow.xaml.cs 中添加 ToLayout 和 Window_Closing 方法的注释。
在 CableLectotypeViewModel.cs 中更新映射和 LectotypeLineModel。
在 LayoutHelperViewModel.cs 中修改 SetSubLineAndSave 方法逻辑。
在 LectotypeViewModel.cs 中添加多个方法的注释,删除 CheckSaved 方法。
2025-02-08 09:41:20 +08:00
lihanbo 2870b5ea2a 105040 Update 不再使用部件ID作为唯一标识 2025-01-24 11:27:14 +08:00
lihanbo 860ce040ed 105040 Update 关闭窗口时增加提示,未保存电机数据是否丢弃
添加未保存警告窗口及其相关视图模型和消息类

增加了 `LectotypeMessage.cs` 文件:
- 定义了 `LectotypeMessage` 类,继承自 `ValueChangedMessage<Dictionary<string,string>>`。

增加了 `NotSavedWarningViewModel.cs` 文件:
- 定义了 `NotSavedWarningViewModel` 类,实现了 `INotifyPropertyChanged` 和 `IDialogResultable<bool>` 接口。
- 包含 `PropertyChanged` 事件、`OnChange` 方法、`NotSavedLectotypeList` 属性、`Result` 和 `CloseAction` 属性及 `Close` 方法。

增加了 `NotSavedWarningWindow.xaml` 文件:
- 定义了未保存警告窗口的 UI,包括 `Border`、`Grid`、`StackPanel`、`TextBlock`、`ListBox` 和两个按钮。

增加了 `NotSavedWarningWindow.xaml.cs` 文件:
- 定义了 `NotSavedWarningWindow` 类,包含 `ViewModel` 字段、构造函数及按钮点击事件处理方法。
2025-01-23 17:06:34 +08:00
lihanbo 707cf928ee 105040 Update 独立获取项目名称的逻辑 2025-01-23 09:09:29 +08:00
lihanbo 98df216fae 105040 Update 不再使用Eplan内部的零件ID,改为使用当前文档的创建时间+轴号作为电机数据保存的唯一标识;
添加电机唯一标识及相关属性和方法

在多个文件中添加了 `MotorUniqueFlag` 属性,并将其设置为可为空。在 `MotorModel.cs` 文件中还添加了 `DocName` 属性。新增了 `GetUniqueFlag` 扩展方法,用于生成电机的唯一标识,并在相关文件中使用该方法。修改了界面显示和方法参数,将“电机ID”替换为“电机唯一标识”。在 `LectotypeManager.cs` 文件中添加了 `CURRENT_DOC_NAME` 和 `CURRENT_DOC_CREATE_TIME` 静态字段。
2025-01-22 16:45:50 +08:00
lihanbo 373e23ba08 105040 Update 将线材两头连接的元器件加入选中项中,同时设置选中效果 2025-01-20 17:07:41 +08:00
lihanbo f6ca75223a 105040 Update 重命名函数 2025-01-20 17:06:25 +08:00
lihanbo ea4ad17ad2 105040 Update 移除下标变化事件,不再触发自动跳转选中项 2025-01-20 17:06:08 +08:00
lihanbo 0b21021566 105040 合并冲突 2025-01-20 17:03:35 +08:00
lihanbo 2e3eb98583 105040 Update 增加注释 2025-01-20 15:55:43 +08:00
SINVO\yangshunli c5a092efed 105067 布线详细信息把线材两端的部件带出 2025-01-17 09:33:27 +08:00
SINVO\yangshunli 6bed559bfe 105067 add线材两端管脚信息窗口 2025-01-15 09:40:04 +08:00
lihanbo 8342f4dd09 105040 Remove 移除未使用的函数;布线助手增加转至电机功能;抓取BOM中型号时增加包含刹车线; 2025-01-13 17:18:51 +08:00
lihanbo 5a8652457c Merge branch 'master' of http://192.168.1.144:8859/SinvoCSharp/Sinvo.EplanHpD.Plugin.WireCheck 2025-01-13 11:22:51 +08:00
lihanbo e825595117 105040 Update 调整选择线段类型逻辑 2025-01-13 11:22:45 +08:00
SINVO\yangshunli d7dbc3c872 105067 扫描器增加长度 .线两头管脚属性 2025-01-13 09:36:58 +08:00
lihanbo 5d8eb5d05a 105040 Update 调整线材资料排序方式 2025-01-11 12:29:50 +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 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 10410dcee2 105040 Clean code 2024-12-17 15:16:37 +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 bfb9d9b880 105040 Clear code 2024-12-05 14:37:31 +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 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 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