EPLAN_PROD_Plugin/Sinvo.EplanHpD.Plugin.WPFUI/View/MainWindow.xaml

617 lines
34 KiB
Plaintext
Raw Normal View History

2024-10-24 18:01:26 +08:00
<Window
x:Class="Sinvo.EplanHpD.Plugin.WPFUI.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
2024-12-05 14:37:31 +08:00
xmlns:converter="clr-namespace:Sinvo.EplanHpD.Plugin.WPFUI.Converter"
2024-10-24 18:01:26 +08:00
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
2024-12-05 14:37:31 +08:00
xmlns:enum="clr-namespace:Sinvo.EplanHpD.Plugin.WPFUI.Enum"
更新多个文件,添加新功能和修复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
xmlns:hc="https://handyorg.github.io/handycontrol"
2024-10-24 18:01:26 +08:00
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:util="clr-namespace:Sinvo.EplanHpD.Plugin.WPFUI.Utils"
xmlns:viewmodel="clr-namespace:Sinvo.EplanHpD.Plugin.WPFUI.ViewModel"
Title="线材资料检查"
Width="1600"
Height="800"
d:DataContext="{d:DesignInstance Type=viewmodel:MainViewModel}"
Loaded="Window_Loaded"
mc:Ignorable="d">
<Window.Resources>
更新多个文件,添加新功能和修复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
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Sinvo.EplanHpD.Plugin.WPFUI;component/Themes/Theme.xaml" />
更新多个文件,添加新功能和修复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
</ResourceDictionary.MergedDictionaries>
<Style
x:Key="DataGridCheckBoxCellStyle"
BasedOn="{StaticResource {x:Type DataGridCell}}"
TargetType="DataGridCell">
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Center" />
</Style>
2024-12-05 14:37:31 +08:00
<converter:FlagEnumConverter x:Key="FlagEnumConverter" />
<converter:NameTypeConverter x:Key="NameTypeConverter" />
更新多个文件,添加新功能和修复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
<DataTemplate x:Key="LoadingMask">
<Grid Background="#66424242">
<StackPanel
2024-10-24 18:01:26 +08:00
HorizontalAlignment="Center"
更新多个文件,添加新功能和修复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
VerticalAlignment="Center"
Orientation="Vertical">
<TextBlock
HorizontalAlignment="Center"
FontSize="16"
Text="加载中..." />
<ProgressBar
Width="200"
Height="10"
IsIndeterminate="True" />
</StackPanel>
</Grid>
</DataTemplate>
</ResourceDictionary>
2024-10-24 18:01:26 +08:00
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="105" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<ScrollViewer
Grid.Row="0"
Grid.RowSpan="2"
HorizontalAlignment="Right"
Panel.ZIndex="99"
VerticalScrollBarVisibility="Hidden">
<StackPanel
x:Name="GrowlParent"
Margin="0,10,10,10"
VerticalAlignment="Top"
Panel.ZIndex="99" />
</ScrollViewer>
2024-10-24 18:01:26 +08:00
<ContentPresenter
x:Name="LoadingMask"
Grid.Row="0"
Grid.RowSpan="2"
Panel.ZIndex="99"
Content="{Binding}"
ContentTemplate="{StaticResource LoadingMask}" />
更新多个文件,添加新功能和修复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
<Grid Grid.Row="0">
2024-10-24 18:01:26 +08:00
<StackPanel Orientation="Horizontal">
更新多个文件,添加新功能和修复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
<hc:Card
MinWidth="200"
Margin="8"
BorderThickness="0"
Effect="{DynamicResource EffectShadow2}"
FontSize="14">
<StackPanel
Margin="8"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Vertical">
<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
<TextBlock VerticalAlignment="Center" Text="项目号:" />
2024-10-24 18:01:26 +08:00
<TextBox MinWidth="100" Text="{Binding ProjectNo}" />
</StackPanel>
<StackPanel Margin="5,0,0,0" Orientation="Vertical">
更新多个文件,添加新功能和修复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
<CheckBox
Margin="2"
Content="是否全部CE认证"
FontSize="14"
IsChecked="{Binding IsRequireCe}" />
<CheckBox
Margin="2"
Content="是否使用变色套"
FontSize="14"
IsChecked="{Binding IsUseDiscoloration}"
IsEnabled="False"
ToolTip="默认将会检查变色套信息" />
2024-10-24 18:01:26 +08:00
</StackPanel>
</StackPanel>
更新多个文件,添加新功能和修复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
</hc:Card>
<hc:Card
MinWidth="200"
Margin="8"
BorderThickness="0"
Effect="{DynamicResource EffectShadow2}"
FontSize="14">
<StackPanel
Margin="10"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Vertical">
<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
<TextBlock
Width="60"
VerticalAlignment="Center"
Text="机构号:" />
2024-10-24 18:01:26 +08:00
<TextBox MinWidth="100" Text="{Binding MechanismNo}" />
</StackPanel>
更新多个文件,添加新功能和修复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
<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
<TextBlock
Width="60"
VerticalAlignment="Center"
Text="机构名称:" />
2024-10-24 18:01:26 +08:00
<TextBox MinWidth="100" Text="{Binding MechanismName}" />
</StackPanel>
</StackPanel>
更新多个文件,添加新功能和修复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
</hc:Card>
2024-10-24 18:01:26 +08:00
<Button
Height="40"
Margin="10"
Padding="10"
Click="Button_Click"
Content="检查"
更新多个文件,添加新功能和修复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
FontSize="14"
Style="{StaticResource ButtonPrimary}" />
2024-10-24 18:01:26 +08:00
<Button
x:Name="GenTemplateBtn"
Height="40"
Margin="10"
Padding="10"
Click="GenTemplateBtn_Click"
Content="生成导入模板数据"
更新多个文件,添加新功能和修复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
FontSize="14"
Style="{StaticResource ButtonPrimary}" />
<StackPanel Orientation="Horizontal">
<hc:SearchBar
Width="200"
Height="30"
hc:InfoElement.Placeholder="W_00961"
hc:TitleElement.Title="线名称"
IsRealTime="True"
SearchStarted="SearchBar_SearchStarted" />
<ToggleButton
Width="130"
HorizontalContentAlignment="Left"
Content="只搜索异常项"
IsChecked="{Binding OnlyShowError}"
Style="{StaticResource ToggleButtonSwitch}" />
</StackPanel>
<Button
x:Name="RefreshReportDataBtn"
Height="40"
Margin="10"
Padding="10"
Click="RefreshReportDataBtn_Click"
Content="刷新报表数据"
FontSize="14"
Style="{StaticResource ButtonPrimary}" />
2024-10-24 18:01:26 +08:00
</StackPanel>
更新多个文件,添加新功能和修复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
</Grid>
2024-10-24 18:01:26 +08:00
<TabControl x:Name="DataTabControl" Grid.Row="1">
<TabItem Header="报表数据">
<DataGrid
x:Name="OriginialDataGrid"
AutoGenerateColumns="False"
EnableColumnVirtualization="True"
EnableRowVirtualization="True"
2024-10-24 18:01:26 +08:00
IsReadOnly="True"
ItemsSource="{Binding Data, IsAsync=True}"
ScrollViewer.CanContentScroll="True"
VirtualizingPanel.IsContainerVirtualizable="True"
VirtualizingPanel.IsVirtualizing="True"
VirtualizingPanel.VirtualizationMode="Recycling">
更新多个文件,添加新功能和修复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
<!--<DataGrid.Resources>
2024-10-24 18:01:26 +08:00
<Style BasedOn="{StaticResource DefaultDataGridRowStyle}" TargetType="DataGridRow" />
<Style BasedOn="{StaticResource DefaultDataGridCellStyle}" TargetType="DataGridCell" />
更新多个文件,添加新功能和修复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
</DataGrid.Resources>-->
2024-10-24 18:01:26 +08:00
</DataGrid>
</TabItem>
<TabItem Header="型号生成" IsSelected="True">
<DataGrid
x:Name="ModelGenDataGrid"
hc:DataGridAttach.EditingComboBoxColumnStyle="{StaticResource ComboBoxBaseStyle}"
hc:DataGridAttach.EditingTextColumnStyle="{StaticResource TextBoxBaseStyle}"
更新多个文件,添加新功能和修复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
hc:ScrollViewerAttach.AutoHide="False"
2024-10-24 18:01:26 +08:00
AutoGenerateColumns="False"
CanUserAddRows="False"
CanUserDeleteRows="False"
ClipboardCopyMode="IncludeHeader"
2024-10-26 14:40:46 +08:00
EnableColumnVirtualization="False"
EnableRowVirtualization="True"
ItemsSource="{Binding SearchedData, IsAsync=True}"
RowHeight="NaN"
ScrollViewer.CanContentScroll="True"
2024-10-24 18:01:26 +08:00
SelectionUnit="FullRow"
VirtualizingPanel.IsContainerVirtualizable="True"
VirtualizingPanel.IsVirtualizing="True"
VirtualizingPanel.VirtualizationMode="Recycling">
2024-10-24 18:01:26 +08:00
<DataGrid.ContextMenu>
<ContextMenu>
<MenuItem Click="IgnoreSelectedError_Click" Header="忽略选中项的异常" />
2024-11-13 13:39:06 +08:00
<MenuItem Click="GoToSource_Click">
<MenuItem.Header>
<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
<TextBlock VerticalAlignment="Center" Text="转至源" />
<Border
Margin="10,0,0,0"
BorderBrush="Gray"
BorderThickness="0,0,0,1">
<StackPanel Orientation="Horizontal">
<CheckBox VerticalAlignment="Center" IsChecked="{Binding ToSourceAndMinSelf}" />
<TextBlock VerticalAlignment="Center" Text="最小化窗口" />
</StackPanel>
</Border>
</StackPanel>
</MenuItem.Header>
</MenuItem>
<MenuItem Click="ToSourceAndHideOthers_Click" Header="转到源并隐藏其他线" />
<MenuItem Click="ShowAllWire_Click" Header="显示所有线" />
2024-10-26 14:40:46 +08:00
<MenuItem Click="UnIgnoreSelectedError_Click" Header="取消忽略选中项的异常" />
2024-10-24 18:01:26 +08:00
<MenuItem
Click="Copy_Click"
Header="复制导线名称"
Tag="WireName" />
<MenuItem Header="复制">
<MenuItem
Click="Copy_Click"
Header="复制料号与异常信息"
Tag="MNoAndErrMsg" />
<MenuItem
Click="Copy_Click"
Header="单独复制料号"
Tag="MNo" />
<MenuItem
Click="Copy_Click"
Header="单独复制异常信息"
Tag="ErrMsg" />
</MenuItem>
</ContextMenu>
</DataGrid.ContextMenu>
更新多个文件,添加新功能和修复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
<DataGrid.RowStyle>
<Style BasedOn="{StaticResource DataGridRowStyle}" TargetType="DataGridRow">
<Setter Property="MinHeight" Value="20" />
2024-10-24 18:01:26 +08:00
<Style.Triggers>
更新多个文件,添加新功能和修复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
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsError}" Value="true" />
</MultiDataTrigger.Conditions>
2024-10-24 18:01:26 +08:00
<Setter Property="Background" Value="#dc4d41" />
<Setter Property="Foreground" Value="White" />
更新多个文件,添加新功能和修复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
</MultiDataTrigger>
2024-10-24 18:01:26 +08:00
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsError}" Value="false" />
<Condition Binding="{Binding IsChecked}" Value="true" />
</MultiDataTrigger.Conditions>
<Setter Property="Background" Value="#18a05d" />
<Setter Property="Foreground" Value="White" />
</MultiDataTrigger>
更新多个文件,添加新功能和修复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
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="#aa326cf3" />
更新多个文件,添加新功能和修复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
</Trigger>
</Style.Triggers>
</Style>
</DataGrid.RowStyle>
<DataGrid.Resources>
<Style BasedOn="{StaticResource DataGridCellStyle}" TargetType="DataGridCell">
<Setter Property="Height" Value="Auto" />
<Setter Property="MaxHeight" Value="9999" />
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="Transparent" />
更新多个文件,添加新功能和修复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
<Setter Property="Foreground" Value="White" />
</Trigger>
2024-10-24 18:01:26 +08:00
</Style.Triggers>
</Style>
</DataGrid.Resources>
<DataGrid.Columns>
<DataGridTextColumn
Binding="{Binding WireName}"
Header="导线名称"
IsReadOnly="True" />
<DataGridTextColumn
Binding="{Binding WireColor}"
Header="线色"
IsReadOnly="True" />
<DataGridTextColumn
Binding="{Binding WireModel}"
Header="线材型号"
IsReadOnly="True" />
<DataGridTextColumn
Binding="{Binding WireCode}"
Header="线材编码"
IsReadOnly="True" />
<DataGridTextColumn
Binding="{Binding FrontTerminalModel}"
Header="前端子型号"
IsReadOnly="True" />
<DataGridTextColumn
Binding="{Binding FrontTerminalMaterialCode}"
Header="前端子物料编码"
IsReadOnly="True" />
<DataGridTextColumn
Binding="{Binding FrontStripLength}"
Header="前端剥线长度"
IsReadOnly="True" />
<DataGridTextColumn
Binding="{Binding RearTerminalModel}"
Header="后端子型号"
IsReadOnly="True" />
<DataGridTextColumn
Binding="{Binding RearTerminalMaterialCode}"
Header="后端子物料编码"
IsReadOnly="True" />
<DataGridTextColumn
Binding="{Binding RearStripLength}"
Header="后端剥线长度"
IsReadOnly="True" />
<DataGridTextColumn
Binding="{Binding CrossSection}"
Header="截面积"
IsReadOnly="True" />
<DataGridTextColumn
Binding="{Binding WireLength}"
Header="线长"
IsReadOnly="True" />
<DataGridTextColumn
Binding="{Binding WireNumber}"
Header="线号"
IsReadOnly="True" />
<DataGridTextColumn
Binding="{Binding Model}"
Header="型号"
IsReadOnly="True" />
<DataGridTextColumn
Binding="{Binding Quantity}"
Header="数量"
IsReadOnly="True" />
<DataGridTextColumn
Binding="{Binding NumberTubeSpec}"
Header="号码管型号"
IsReadOnly="True" />
<DataGridTextColumn
Binding="{Binding NumberTubeMaterialNo}"
Header="号码管料号"
IsReadOnly="True" />
2024-10-24 18:01:26 +08:00
<DataGridTextColumn
Binding="{Binding DiscolorationDesc}"
Header="变色套型号"
IsReadOnly="True" />
<DataGridTextColumn
Binding="{Binding Insulation.MaterialCode}"
Header="变色套料号"
IsReadOnly="True" />
更新多个文件,添加新功能和修复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
<!--<DataGridCheckBoxColumn Header="忽略异常">
2024-10-24 18:01:26 +08:00
<DataGridCheckBoxColumn.ElementStyle>
<Style TargetType="CheckBox">
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="CheckBox">
更新多个文件,添加新功能和修复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
<Grid HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}">
2024-10-24 18:01:26 +08:00
<CheckBox
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
VerticalAlignment="{TemplateBinding VerticalAlignment}"
更新多个文件,添加新功能和修复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
IsChecked="{Binding IsIgnore, UpdateSourceTrigger=PropertyChanged}" />
</Grid>
2024-10-24 18:01:26 +08:00
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</DataGridCheckBoxColumn.ElementStyle>
更新多个文件,添加新功能和修复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
</DataGridCheckBoxColumn>-->
<DataGridCheckBoxColumn CellStyle="{StaticResource DataGridCheckBoxCellStyle}" Header="忽略异常">
<DataGridCheckBoxColumn.Binding>
<Binding Path="IsIgnore" />
</DataGridCheckBoxColumn.Binding>
2024-10-24 18:01:26 +08:00
</DataGridCheckBoxColumn>
更新多个文件,添加新功能和修复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
<!--<DataGridTemplateColumn Header="异常信息">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock
Height="auto"
VerticalAlignment="Center"
Text="{Binding CheckedMsg}"
TextWrapping="Wrap" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>-->
<DataGridTextColumn Binding="{Binding CheckedMsg}" Header="异常信息" />
2024-10-24 18:01:26 +08:00
<DataGridTextColumn
Binding="{Binding ErrorCount}"
Header="异常数"
IsReadOnly="True" />
</DataGrid.Columns>
</DataGrid>
</TabItem>
<TabItem Header="导入模板预览">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="70" />
2024-10-24 18:01:26 +08:00
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="300" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<hc:SimpleStackPanel
Grid.Column="1"
HorizontalAlignment="Center"
Orientation="Horizontal">
<Button
Width="300"
Height="40"
Margin="5"
Click="ExportDataBtn_Click"
Content="导出下单数据"
FontSize="16"
Style="{StaticResource ButtonPrimary}" />
</hc:SimpleStackPanel>
<StackPanel Grid.Column="2" VerticalAlignment="Center">
<StackPanel Margin="10,0,0,0">
<RadioButton
HorizontalAlignment="Left"
Content="使用项目编号作为文件名"
FontSize="14"
GroupName="ExportFileName"
2024-12-05 14:37:31 +08:00
IsChecked="{Binding NameType, Converter={StaticResource NameTypeConverter}, ConverterParameter={x:Static enum:ExportFileNameType.ProjectNo}}" />
<RadioButton
HorizontalAlignment="Left"
Content="使用机构号&机构名作为文件名"
FontSize="14"
GroupName="ExportFileName"
2024-12-05 14:37:31 +08:00
IsChecked="{Binding NameType, Converter={StaticResource NameTypeConverter}, ConverterParameter={x:Static enum:ExportFileNameType.Mechanism}}" />
<RadioButton
HorizontalAlignment="Left"
FontSize="14"
GroupName="ExportFileName"
2024-12-05 14:37:31 +08:00
IsChecked="{Binding NameType, Converter={StaticResource NameTypeConverter}, ConverterParameter={x:Static enum:ExportFileNameType.Custom}}">
<StackPanel Orientation="Horizontal">
<TextBlock VerticalAlignment="Center" Text="自定义:" />
<hc:TextBox Width="200" Text="{Binding CustomFileName}" />
</StackPanel>
</RadioButton>
</StackPanel>
</StackPanel>
</Grid>
2024-10-24 18:01:26 +08:00
<DataGrid
x:Name="ImportDataGrid"
Grid.Row="1"
AutoGenerateColumns="False"
EnableColumnVirtualization="True"
EnableRowVirtualization="True"
2024-10-24 18:01:26 +08:00
IsReadOnly="True"
ItemsSource="{Binding ExportData, IsAsync=True}"
ScrollViewer.CanContentScroll="True"
VirtualizingPanel.IsContainerVirtualizable="True"
VirtualizingPanel.IsVirtualizing="True"
VirtualizingPanel.VirtualizationMode="Recycling">
2024-10-24 18:01:26 +08:00
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding SeqNo}" Header="清单序号" />
<DataGridTextColumn Binding="{Binding MechanismNo}" Header="机构代号" />
<DataGridTextColumn Binding="{Binding MechanismName}" Header="机构名称" />
<DataGridTextColumn Binding="{Binding DrawNo}" Header="图号" />
<DataGridTextColumn Binding="{Binding MaterialCode}" Header="物料编码" />
<DataGridTextColumn Binding="{Binding WireOrTubeSpec}" Header="气管规格" />
<DataGridTextColumn Binding="{Binding WireOrTubeMaterialNo}" Header="线材/气管物料编号" />
<DataGridTextColumn Binding="{Binding WireOrTubeLength}" Header="线材/气管长度" />
<DataGridTextColumn Binding="{Binding NumberTubeSpec}" Header="号码管规格" />
<DataGridTextColumn Binding="{Binding NumberTubeMaterialNo}" Header="号码管物料编码" />
<DataGridTextColumn Binding="{Binding NumberTubeContent}" Header="号码管内容" />
<DataGridTextColumn Binding="{Binding FrontTerminalModel}" Header="前端子型号" />
<DataGridTextColumn Binding="{Binding FrontTerminalMaterialNo}" Header="前端子物料编码" />
<DataGridTextColumn Binding="{Binding FrontTerminalStripLength}" Header="前端子剥线长度" />
<DataGridTextColumn Binding="{Binding RearTerminalModel}" Header="后端子型号" />
<DataGridTextColumn Binding="{Binding RearTerminalMaterialNo}" Header="后端子物料编码" />
<DataGridTextColumn Binding="{Binding RearTerminalStripLength}" Header="后端子剥线长度" />
<DataGridTextColumn Binding="{Binding InsulationModel}" Header="绝缘软套型号" />
<DataGridTextColumn Binding="{Binding InsulationMaterialNo}" Header="绝缘软套型号物料编码" />
</DataGrid.Columns>
</DataGrid>
</Grid>
</TabItem>
<TabItem
Height="28"
VerticalAlignment="Top"
Header="检查配置项">
<Grid>
<StackPanel>
更新多个文件,添加新功能和修复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
<hc:Card
Margin="8"
Effect="{DynamicResource EffectShadow2}"
FontSize="14">
<hc:Card.Header>
<TextBlock
Margin="10"
FontSize="16"
Text="变色套检查标识" />
</hc:Card.Header>
<StackPanel Margin="10" HorizontalAlignment="Left">
2024-10-24 18:01:26 +08:00
<RadioButton
更新多个文件,添加新功能和修复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
HorizontalAlignment="Left"
2024-10-24 18:01:26 +08:00
Content="L1/L2/L3/PE"
更新多个文件,添加新功能和修复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
FontSize="14"
2024-10-24 18:01:26 +08:00
GroupName="Insulation"
2024-12-05 14:37:31 +08:00
IsChecked="{Binding FlagType, Converter={StaticResource FlagEnumConverter}, ConverterParameter={x:Static enum:WireFlagType.Dual}}" />
2024-10-24 18:01:26 +08:00
<RadioButton
更新多个文件,添加新功能和修复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
HorizontalAlignment="Left"
2024-10-24 18:01:26 +08:00
Content="R/S/T/PE"
更新多个文件,添加新功能和修复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
FontSize="14"
2024-10-24 18:01:26 +08:00
GroupName="Insulation"
2024-12-05 14:37:31 +08:00
IsChecked="{Binding FlagType, Converter={StaticResource FlagEnumConverter}, ConverterParameter={x:Static enum:WireFlagType.Single}}" />
2024-10-24 18:01:26 +08:00
<RadioButton
更新多个文件,添加新功能和修复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
HorizontalAlignment="Left"
2024-10-24 18:01:26 +08:00
Content="L1/R/L2/S/L3/T/PE"
更新多个文件,添加新功能和修复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
FontSize="14"
2024-10-24 18:01:26 +08:00
GroupName="Insulation"
2024-12-05 14:37:31 +08:00
IsChecked="{Binding FlagType, Converter={StaticResource FlagEnumConverter}, ConverterParameter={x:Static enum:WireFlagType.Mix}}" />
2024-10-24 18:01:26 +08:00
</StackPanel>
更新多个文件,添加新功能和修复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
</hc:Card>
<hc:Card Margin="8" FontSize="14">
<hc:Card.Header>
<TextBlock
Margin="10"
FontSize="16"
Text="检查规则说明" />
</hc:Card.Header>
<StackPanel Margin="10">
<StackPanel
Margin="2"
VerticalAlignment="Center"
Orientation="Horizontal">
<Rectangle
Width="40"
Height="20"
Fill="#dc4d41" />
更新多个文件,添加新功能和修复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
<TextBlock
Margin="2"
VerticalAlignment="Center"
Text="红色表示该项存在异常" />
</StackPanel>
更新多个文件,添加新功能和修复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
<StackPanel
Margin="2"
VerticalAlignment="Center"
Orientation="Horizontal">
<Rectangle
Width="40"
Height="20"
Fill="#18a05d" />
更新多个文件,添加新功能和修复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
<TextBlock
Margin="2"
VerticalAlignment="Center"
Text="绿色表示该项正常,检查通过" />
</StackPanel>
更新多个文件,添加新功能和修复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
<StackPanel
Margin="2"
VerticalAlignment="Center"
Orientation="Vertical">
<TextBlock
Margin="2"
VerticalAlignment="Center"
Text="检查线时,会根据型号配对表中的数据进行检查,当端子使用未与配对表中的信息匹配时,将会提示错误,具体错误请查看每一项的异常信息。" />
更新多个文件,添加新功能和修复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
<TextBlock
Margin="2"
VerticalAlignment="Center"
Text="当线径为1.5或是1.5以下时变色套管绝缘软套应使用1.5平方,如未按此规则使用,将提示异常。" />
<TextBlock
Margin="2"
VerticalAlignment="Center"
Text="当勾选全部CE认证时未使用CE认证的线或是端子将提示异常。" />
<TextBlock
Margin="2"
VerticalAlignment="Center"
Text="当型号出现重复时将会自动增加5mm长度如果依旧出现重复将会再增加一次第二次增加长度后依旧重复则根据原有长度提示异常。增加长度如果未出现异常则会以增加后的长度进行生成(不会修改已有的数据,只会影响检查时的显示与导出报表)。" />
<TextBlock
Margin="2"
VerticalAlignment="Center"
Text="当型号中出现:(冒号)时会自动去除冒号以及冒号后面的内容。例如“A000-CE / 定制:1” 将会被识别成 “A000-CE / 定制”" />
</StackPanel>
</StackPanel>
更新多个文件,添加新功能和修复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
</hc:Card>
2024-10-24 18:01:26 +08:00
</StackPanel>
</Grid>
</TabItem>
</TabControl>
</Grid>
</Window>