diff --git a/Sinvo.EplanHpD.Plugin.WPFUI/LectotypeWindow.xaml b/Sinvo.EplanHpD.Plugin.WPFUI/LectotypeWindow.xaml index 31794cf..a87c36a 100644 --- a/Sinvo.EplanHpD.Plugin.WPFUI/LectotypeWindow.xaml +++ b/Sinvo.EplanHpD.Plugin.WPFUI/LectotypeWindow.xaml @@ -20,8 +20,7 @@ - - + @@ -104,6 +103,7 @@ + @@ -163,7 +163,7 @@ EnableRowVirtualization="True" ItemsSource="{Binding Source={StaticResource LettotypeData}, IsAsync=True}" RowDetailsVisibilityChanged="LettotypeListView_RowDetailsVisibilityChanged" - RowDetailsVisibilityMode="{Binding DetailsShowMode}" + RowDetailsVisibilityMode="Visible" RowHeight="NaN" ScrollViewer.CanContentScroll="False" SelectedItem="{Binding SelectedItem}" @@ -476,11 +476,13 @@ Margin="40,0,0,0" BorderBrush="Gray" BorderThickness="2,0,0,0" + ItemsSource="{Binding SubLines}" ScrollViewer.VerticalScrollBarVisibility="Auto" SelectionChanged="SubDetailsDataGrid_SelectionChanged" SelectionMode="Single" VirtualizingPanel.IsVirtualizing="True" - VirtualizingPanel.VirtualizationMode="Recycling"> + VirtualizingPanel.VirtualizationMode="Recycling" + Visibility="{Binding IsComplexLine, Converter={StaticResource Boolean2VisibilityConverter}}"> diff --git a/Sinvo.EplanHpD.Plugin.WPFUI/LectotypeWindow.xaml.cs b/Sinvo.EplanHpD.Plugin.WPFUI/LectotypeWindow.xaml.cs index 3875811..084acca 100644 --- a/Sinvo.EplanHpD.Plugin.WPFUI/LectotypeWindow.xaml.cs +++ b/Sinvo.EplanHpD.Plugin.WPFUI/LectotypeWindow.xaml.cs @@ -26,6 +26,7 @@ namespace Sinvo.EplanHpD.Plugin.WPFUI InitializeComponent(); //_docId = docId; this.DataContext = ViewModel = new LectotypeViewModel(docId); + Application.Current.SetMainWindow(this); } private void Window_Loaded(object sender, RoutedEventArgs e) @@ -111,15 +112,15 @@ namespace Sinvo.EplanHpD.Plugin.WPFUI { Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); - var datagrid = sender as DataGrid; - if (datagrid != null) - { - var DetailsDataGrid = e.DetailsElement as ListView; - if (DetailsDataGrid != null) - { - DetailsDataGrid.ItemsSource = ViewModel.SelectedSubItem; - } - } + //var datagrid = sender as DataGrid; + //if (datagrid != null) + //{ + // var DetailsDataGrid = e.DetailsElement as ListView; + // if (DetailsDataGrid != null) + // { + // DetailsDataGrid.ItemsSource = ViewModel.SelectedSubItem; + // } + //} stopwatch.Stop(); Debug.Print($"LettotypeListView_RowDetailsVisibilityChanged :{stopwatch.ElapsedMilliseconds}ms"); } diff --git a/Sinvo.EplanHpD.Plugin.WPFUI/Models/LectotypeLineModel.cs b/Sinvo.EplanHpD.Plugin.WPFUI/Models/LectotypeLineModel.cs index e0b6eef..2128120 100644 --- a/Sinvo.EplanHpD.Plugin.WPFUI/Models/LectotypeLineModel.cs +++ b/Sinvo.EplanHpD.Plugin.WPFUI/Models/LectotypeLineModel.cs @@ -1,4 +1,5 @@ using Sinvo.EplanHpD.Plugin.WPFUI.Utils; +using System.Collections.Generic; using System.Diagnostics; using System.Linq; @@ -389,5 +390,16 @@ namespace Sinvo.EplanHpD.Plugin.WPFUI.Models OnPropertyChanged(nameof(Motor)); } } + + private List _subLines; + public List SubLines + { + get => _subLines; + set + { + _subLines = value; + OnPropertyChanged(nameof(SubLines)); + } + } } } diff --git a/Sinvo.EplanHpD.Plugin.WPFUI/Sinvo.EplanHpD.Plugin.WPFUI.csproj b/Sinvo.EplanHpD.Plugin.WPFUI/Sinvo.EplanHpD.Plugin.WPFUI.csproj index 610a4a6..f799f23 100644 --- a/Sinvo.EplanHpD.Plugin.WPFUI/Sinvo.EplanHpD.Plugin.WPFUI.csproj +++ b/Sinvo.EplanHpD.Plugin.WPFUI/Sinvo.EplanHpD.Plugin.WPFUI.csproj @@ -58,6 +58,24 @@ + + true + bin\x86\Debug\ + DEBUG;TRACE + full + x86 + 12.0 + prompt + + + bin\x86\Release\ + TRACE + true + pdbonly + x86 + 12.0 + prompt + ..\Sinvo.EplanHpD.Plugin\RefDLL\C1.Win.C1FlexGrid.2.dll @@ -135,15 +153,18 @@ TestWindow.xaml + + + @@ -165,6 +186,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + diff --git a/Sinvo.EplanHpD.Plugin.WPFUI/ViewModel/LectotypeViewModel.cs b/Sinvo.EplanHpD.Plugin.WPFUI/ViewModel/LectotypeViewModel.cs index a8fbc69..83a48b4 100644 --- a/Sinvo.EplanHpD.Plugin.WPFUI/ViewModel/LectotypeViewModel.cs +++ b/Sinvo.EplanHpD.Plugin.WPFUI/ViewModel/LectotypeViewModel.cs @@ -328,6 +328,7 @@ namespace Sinvo.EplanHpD.Plugin.WPFUI.ViewModel .Where(data => data.AxisNo == existLine.AxisNo && data.CurrentLine == 1) .Select(data => data.CableName) .Aggregate("/"); + existLine.SubLines = OriWires.Where(i => i.AxisNo == existLine.AxisNo && i.CurrentLine == existLine.CurrentLine && i.CurrentLine == 1).ToList(); } if ((it.IsFlexibility || existLine.IsFlexibility) && it.IsFlexibility != existLine.IsFlexibility) diff --git a/Sinvo.EplanHpD.Plugin.sln b/Sinvo.EplanHpD.Plugin.sln index 72f2250..d590919 100644 --- a/Sinvo.EplanHpD.Plugin.sln +++ b/Sinvo.EplanHpD.Plugin.sln @@ -15,42 +15,60 @@ Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU Release|x64 = Release|x64 + Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {5BDA26F8-001F-4C54-B992-7CC5AE5ED08B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5BDA26F8-001F-4C54-B992-7CC5AE5ED08B}.Debug|Any CPU.Build.0 = Debug|Any CPU {5BDA26F8-001F-4C54-B992-7CC5AE5ED08B}.Debug|x64.ActiveCfg = Debug|x64 {5BDA26F8-001F-4C54-B992-7CC5AE5ED08B}.Debug|x64.Build.0 = Debug|x64 + {5BDA26F8-001F-4C54-B992-7CC5AE5ED08B}.Debug|x86.ActiveCfg = Debug|x86 + {5BDA26F8-001F-4C54-B992-7CC5AE5ED08B}.Debug|x86.Build.0 = Debug|x86 {5BDA26F8-001F-4C54-B992-7CC5AE5ED08B}.Release|Any CPU.ActiveCfg = Release|Any CPU {5BDA26F8-001F-4C54-B992-7CC5AE5ED08B}.Release|Any CPU.Build.0 = Release|Any CPU {5BDA26F8-001F-4C54-B992-7CC5AE5ED08B}.Release|x64.ActiveCfg = Release|x64 {5BDA26F8-001F-4C54-B992-7CC5AE5ED08B}.Release|x64.Build.0 = Release|x64 + {5BDA26F8-001F-4C54-B992-7CC5AE5ED08B}.Release|x86.ActiveCfg = Release|x86 + {5BDA26F8-001F-4C54-B992-7CC5AE5ED08B}.Release|x86.Build.0 = Release|x86 {2DBCD22A-650D-4797-9908-9C4D5D6665FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2DBCD22A-650D-4797-9908-9C4D5D6665FE}.Debug|Any CPU.Build.0 = Debug|Any CPU {2DBCD22A-650D-4797-9908-9C4D5D6665FE}.Debug|x64.ActiveCfg = Debug|x64 {2DBCD22A-650D-4797-9908-9C4D5D6665FE}.Debug|x64.Build.0 = Debug|x64 + {2DBCD22A-650D-4797-9908-9C4D5D6665FE}.Debug|x86.ActiveCfg = Debug|x86 + {2DBCD22A-650D-4797-9908-9C4D5D6665FE}.Debug|x86.Build.0 = Debug|x86 {2DBCD22A-650D-4797-9908-9C4D5D6665FE}.Release|Any CPU.ActiveCfg = Release|Any CPU {2DBCD22A-650D-4797-9908-9C4D5D6665FE}.Release|Any CPU.Build.0 = Release|Any CPU {2DBCD22A-650D-4797-9908-9C4D5D6665FE}.Release|x64.ActiveCfg = Release|x64 {2DBCD22A-650D-4797-9908-9C4D5D6665FE}.Release|x64.Build.0 = Release|x64 + {2DBCD22A-650D-4797-9908-9C4D5D6665FE}.Release|x86.ActiveCfg = Release|x86 + {2DBCD22A-650D-4797-9908-9C4D5D6665FE}.Release|x86.Build.0 = Release|x86 {AEC39474-528B-4DA8-B650-99189ACB7A2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AEC39474-528B-4DA8-B650-99189ACB7A2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {AEC39474-528B-4DA8-B650-99189ACB7A2C}.Debug|x64.ActiveCfg = Debug|Any CPU {AEC39474-528B-4DA8-B650-99189ACB7A2C}.Debug|x64.Build.0 = Debug|Any CPU + {AEC39474-528B-4DA8-B650-99189ACB7A2C}.Debug|x86.ActiveCfg = Debug|x86 + {AEC39474-528B-4DA8-B650-99189ACB7A2C}.Debug|x86.Build.0 = Debug|x86 {AEC39474-528B-4DA8-B650-99189ACB7A2C}.Release|Any CPU.ActiveCfg = Release|Any CPU {AEC39474-528B-4DA8-B650-99189ACB7A2C}.Release|Any CPU.Build.0 = Release|Any CPU {AEC39474-528B-4DA8-B650-99189ACB7A2C}.Release|x64.ActiveCfg = Release|Any CPU {AEC39474-528B-4DA8-B650-99189ACB7A2C}.Release|x64.Build.0 = Release|Any CPU + {AEC39474-528B-4DA8-B650-99189ACB7A2C}.Release|x86.ActiveCfg = Release|x86 + {AEC39474-528B-4DA8-B650-99189ACB7A2C}.Release|x86.Build.0 = Release|x86 {60D3C75C-E71D-4116-BD7E-CAC68C4DD96B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {60D3C75C-E71D-4116-BD7E-CAC68C4DD96B}.Debug|Any CPU.Build.0 = Debug|Any CPU {60D3C75C-E71D-4116-BD7E-CAC68C4DD96B}.Debug|x64.ActiveCfg = Debug|Any CPU {60D3C75C-E71D-4116-BD7E-CAC68C4DD96B}.Debug|x64.Build.0 = Debug|Any CPU + {60D3C75C-E71D-4116-BD7E-CAC68C4DD96B}.Debug|x86.ActiveCfg = Debug|x86 + {60D3C75C-E71D-4116-BD7E-CAC68C4DD96B}.Debug|x86.Build.0 = Debug|x86 {60D3C75C-E71D-4116-BD7E-CAC68C4DD96B}.Release|Any CPU.ActiveCfg = Release|Any CPU {60D3C75C-E71D-4116-BD7E-CAC68C4DD96B}.Release|Any CPU.Build.0 = Release|Any CPU {60D3C75C-E71D-4116-BD7E-CAC68C4DD96B}.Release|x64.ActiveCfg = Release|Any CPU {60D3C75C-E71D-4116-BD7E-CAC68C4DD96B}.Release|x64.Build.0 = Release|Any CPU + {60D3C75C-E71D-4116-BD7E-CAC68C4DD96B}.Release|x86.ActiveCfg = Release|x86 + {60D3C75C-E71D-4116-BD7E-CAC68C4DD96B}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Sinvo.EplanHpD.Plugin/Sinvo.EplanHpD.Plugin.csproj b/Sinvo.EplanHpD.Plugin/Sinvo.EplanHpD.Plugin.csproj index 841bcf3..45f3668 100644 --- a/Sinvo.EplanHpD.Plugin/Sinvo.EplanHpD.Plugin.csproj +++ b/Sinvo.EplanHpD.Plugin/Sinvo.EplanHpD.Plugin.csproj @@ -49,6 +49,24 @@ 7.3 prompt + + true + bin\x86\Debug\ + DEBUG;TRACE + full + x86 + latest + prompt + + + bin\x86\Release\ + TRACE + true + pdbonly + x86 + latest + prompt + RefDLL\EPLAN.Harness.API.dll