EPLAN_PROD_Plugin/Sinvo.EplanHpD.Plugin.WPFUI/Models/ScanCableModel.cs

96 lines
2.0 KiB
C#
Raw Normal View History

2024-12-02 11:02:52 +08:00
using EPLAN.Harness.Core.Utils;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Sinvo.EplanHpD.Plugin.WPFUI.Models
{
public class ScanCableModel : CheckedModel
{
private int _index;
public int Index
{
get => _index; set
{
_index = value;
OnPropertyChanged(nameof(Index));
}
}
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
private string _id;
2024-12-02 11:02:52 +08:00
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
public string Id
{
get => _id; set
{
_id = value;
OnPropertyChanged(nameof(Id));
}
}
2024-12-02 11:02:52 +08:00
private string _name;
public string Name
{
get => _name; set
{
_name = value;
OnPropertyChanged(nameof(Name));
}
}
private string _code;
public string Code
{
get => _code;
set
{
_code = value;
OnPropertyChanged(nameof(Code));
}
}
private string _imprint;
public string Imprint
{
get => _imprint;
set
{
_imprint = value;
OnPropertyChanged(nameof(Imprint));
}
}
private string _length;
public string Length
{
get => _length;
set
{
_length = value;
OnPropertyChanged(nameof(Length));
}
}
private string _s_pin;
public string S_Pin
{
get => _s_pin;
set
{
_s_pin = value;
OnPropertyChanged(nameof(S_Pin));
}
}
private string _e_pin;
public string E_Pin
{
get => _e_pin;
set
{
_e_pin = value;
OnPropertyChanged(nameof(E_Pin));
}
}
2024-12-02 11:02:52 +08:00
}
}