105040 Update 伺服电机线缆抓取增加PDF查看,BOM查看,优化界面

This commit is contained in:
lihanbo 2024-11-15 15:04:45 +08:00
parent 9c0d3acdfa
commit 37172cc58a
7 changed files with 90 additions and 13 deletions

View File

@ -20,8 +20,7 @@
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml" />
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml" />
<ResourceDictionary Source="pack://application:,,,/Sinvo.EplanHpD.Plugin.WPFUI;component/Themes/Theme.xaml" />
</ResourceDictionary.MergedDictionaries>
<CollectionViewSource x:Key="LettotypeData" Source="{Binding Wires, IsAsync=True}">
<CollectionViewSource.GroupDescriptions>
@ -104,6 +103,7 @@
</StackPanel>
</Grid>
</DataTemplate>
<hc:Boolean2VisibilityReConverter x:Key="Boolean2VisibilityReConverter" />
</ResourceDictionary>
</Window.Resources>
<hc:DrawerContainer>
@ -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}}">
<ListView.ContextMenu>
<ContextMenu>
<MenuItem Click="SubToSourceMenuItem_Click" Header="在3D中查看转至源" />

View File

@ -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");
}

View File

@ -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<LectotypeLineModel> _subLines;
public List<LectotypeLineModel> SubLines
{
get => _subLines;
set
{
_subLines = value;
OnPropertyChanged(nameof(SubLines));
}
}
}
}

View File

@ -58,6 +58,24 @@
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<LangVersion>12.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<LangVersion>12.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<ItemGroup>
<Reference Include="C1.Win.C1FlexGrid.2">
<HintPath>..\Sinvo.EplanHpD.Plugin\RefDLL\C1.Win.C1FlexGrid.2.dll</HintPath>
@ -135,15 +153,18 @@
<Compile Include="TestWindow.xaml.cs">
<DependentUpon>TestWindow.xaml</DependentUpon>
</Compile>
<Compile Include="Utils\ApplicationExt.cs" />
<Compile Include="Utils\CheckedModelExt.cs" />
<Compile Include="Utils\Consts.cs" />
<Compile Include="Utils\DataGridType.cs" />
<Compile Include="Utils\DrawPDFHelper.cs" />
<Compile Include="Utils\ExcelHelper.cs" />
<Compile Include="Utils\ExportFileNameType.cs" />
<Compile Include="Utils\FlagEnumConverter.cs" />
<Compile Include="Utils\LambdaComparer.cs" />
<Compile Include="Utils\LectotypeLengthDataTemplateSelector.cs" />
<Compile Include="Utils\MotorExcelHelper.cs" />
<Compile Include="Utils\NameTypeConverter.cs" />
<Compile Include="Utils\PropertyListExt.cs" />
<Compile Include="Utils\WireFlagType.cs" />
<Compile Include="ViewModel\LectotypeViewModel.cs" />
@ -165,6 +186,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Themes\Theme.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">

View File

@ -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)

View File

@ -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

View File

@ -49,6 +49,24 @@
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<LangVersion>latest</LangVersion>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<LangVersion>latest</LangVersion>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<ItemGroup>
<Reference Include="EPLAN.Harness.API">
<HintPath>RefDLL\EPLAN.Harness.API.dll</HintPath>