196 lines
9.0 KiB
XML
196 lines
9.0 KiB
XML
<Window
|
|
x:Class="Sinvo.EplanHpD.Plugin.WPFUI.View.ScannerWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:hc="https://handyorg.github.io/handycontrol"
|
|
xmlns:local="clr-namespace:Sinvo.EplanHpD.Plugin.WPFUI.View"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:viewmodel="clr-namespace:Sinvo.EplanHpD.Plugin.WPFUI.ViewModel"
|
|
Title="扫描"
|
|
Width="340"
|
|
Height="750"
|
|
MinWidth="340"
|
|
d:DataContext="{d:DesignInstance Type=viewmodel:ScannerViewModel}"
|
|
Left="1500"
|
|
Loaded="Window_Loaded"
|
|
Top="450"
|
|
WindowStartupLocation="Manual"
|
|
mc:Ignorable="d">
|
|
<Window.Resources>
|
|
<ResourceDictionary>
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary Source="pack://application:,,,/Sinvo.EplanHpD.Plugin.WPFUI;component/Themes/Theme.xaml" />
|
|
</ResourceDictionary.MergedDictionaries>
|
|
</ResourceDictionary>
|
|
</Window.Resources>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="220" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<WrapPanel
|
|
Grid.Row="0"
|
|
MaxWidth="320"
|
|
HorizontalAlignment="Left">
|
|
<hc:TextBox
|
|
x:Name="ScanCodeTextBox"
|
|
Width="300"
|
|
Height="80"
|
|
Margin="10"
|
|
VerticalContentAlignment="Center"
|
|
hc:InfoElement.Placeholder="请扫描条码,例: w_00012"
|
|
hc:TitleElement.Title="扫描条码:"
|
|
FontSize="16">
|
|
<hc:TextBox.Text>
|
|
<Binding
|
|
Path="InputCode"
|
|
UpdateSourceTrigger="PropertyChanged"
|
|
ValidatesOnNotifyDataErrors="True" />
|
|
</hc:TextBox.Text>
|
|
</hc:TextBox>
|
|
|
|
<WrapPanel Margin="10">
|
|
<CheckBox
|
|
x:Name="HideOthersWire"
|
|
Margin="3"
|
|
Content="自动隐藏其他线"
|
|
FontSize="16"
|
|
IsChecked="{Binding OthersWireShow}" />
|
|
|
|
<!--<CheckBox Content="窗口透明" FontSize="16" />-->
|
|
<CheckBox
|
|
x:Name="TopMostWindow"
|
|
Margin="3"
|
|
Checked="TopMostWindow_Checked"
|
|
Content="窗口置顶"
|
|
FontSize="16"
|
|
IsChecked="True"
|
|
Unchecked="TopMostWindow_Unchecked" />
|
|
<CheckBox
|
|
x:Name="ContinueScan"
|
|
Margin="3"
|
|
Content="连续扫描"
|
|
FontSize="16"
|
|
IsChecked="{Binding ContinueScan}" />
|
|
<!--<CheckBox
|
|
Margin="3"
|
|
Content="扫描即装配"
|
|
FontSize="16"
|
|
IsChecked="{Binding ScanAndAssembled}" />-->
|
|
<CheckBox
|
|
Margin="3"
|
|
Content="隐藏或显示时同时包括注释"
|
|
FontSize="16"
|
|
IsChecked="{Binding IsIncludeAnnotation}" />
|
|
<Button
|
|
x:Name="ShowAllWire"
|
|
Margin="3"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center"
|
|
Click="ShowAllWire_Click"
|
|
Content="显示所有线" />
|
|
<Button
|
|
x:Name="GetDoc"
|
|
Margin="3"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center"
|
|
Click="GetDoc_Click"
|
|
Content="刷新打开的项目" />
|
|
</WrapPanel>
|
|
</WrapPanel>
|
|
<TabControl Grid.Row="1">
|
|
<TabItem Header="线材列表">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="30" />
|
|
</Grid.RowDefinitions>
|
|
<!-- SelectedIndex="{Binding ScanedIndex}" -->
|
|
<DataGrid
|
|
x:Name="CableList"
|
|
AutoGenerateColumns="False"
|
|
ColumnHeaderHeight="20"
|
|
EnableColumnVirtualization="False"
|
|
EnableRowVirtualization="False"
|
|
HeadersVisibility="Column"
|
|
IsReadOnly="True"
|
|
ItemsSource="{Binding _ScanCableModels}"
|
|
VirtualizingPanel.IsVirtualizing="False">
|
|
<DataGrid.Resources>
|
|
<Style BasedOn="{StaticResource DataGridCellStyle}" TargetType="DataGridCell">
|
|
<Setter Property="Height" Value="Auto" />
|
|
<Setter Property="MaxHeight" Value="9999" />
|
|
<Setter Property="Margin" Value="0" />
|
|
<Style.Triggers>
|
|
<Trigger Property="IsSelected" Value="True">
|
|
<Setter Property="Background" Value="Transparent" />
|
|
<Setter Property="Foreground" Value="White" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</DataGrid.Resources>
|
|
<DataGrid.RowStyle>
|
|
<Style BasedOn="{StaticResource DataGridRowStyle}" TargetType="DataGridRow">
|
|
<Setter Property="Foreground" Value="White" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding IsChecked}" Value="false">
|
|
<Setter Property="Background" Value="#dc4d41" />
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding IsChecked}" Value="true">
|
|
<Setter Property="Background" Value="#18a05d" />
|
|
</DataTrigger>
|
|
<Trigger Property="IsSelected" Value="True">
|
|
<Setter Property="Foreground" Value="White" />
|
|
<Setter Property="Background" Value="#33326cf3" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</DataGrid.RowStyle>
|
|
<DataGrid.Columns>
|
|
<DataGridTextColumn
|
|
Width="50"
|
|
Binding="{Binding Index}"
|
|
Header="序号" />
|
|
<DataGridTextColumn
|
|
Width="80"
|
|
Binding="{Binding Code}"
|
|
Header="线材编号" />
|
|
<DataGridTextColumn
|
|
Width="120"
|
|
hc:Poptip.Content="{Binding Name}"
|
|
hc:Poptip.HitMode="Hover"
|
|
Binding="{Binding Name}"
|
|
Header="线材名称" />
|
|
<!--<DataGridTextColumn
|
|
Width="60"
|
|
hc:Poptip.Content="{Binding Length}"
|
|
hc:Poptip.HitMode="Hover"
|
|
Binding="{Binding Length}"
|
|
Header="长度" />
|
|
<DataGridTextColumn
|
|
Width="auto"
|
|
hc:Poptip.Content="{Binding Length}"
|
|
hc:Poptip.HitMode="Hover"
|
|
Binding="{Binding S_Pin}"
|
|
Header="开始管脚" />
|
|
<DataGridTextColumn
|
|
Width="auto"
|
|
hc:Poptip.Content="{Binding Length}"
|
|
hc:Poptip.HitMode="Hover"
|
|
Binding="{Binding E_Pin}"
|
|
Header="结束管脚" />-->
|
|
<DataGridTextColumn Binding="{Binding Imprint}" Header="印记" />
|
|
<!--<DataGridTextColumn Binding="{Binding IsChecked}" Header="线材名称" />-->
|
|
</DataGrid.Columns>
|
|
</DataGrid>
|
|
<Button
|
|
Grid.Row="1"
|
|
Click="ExportScanedListBtn_Click"
|
|
Content="导出线材列表" />
|
|
</Grid>
|
|
</TabItem>
|
|
</TabControl>
|
|
</Grid>
|
|
</Window>
|