175 lines
7.2 KiB
Plaintext
175 lines
7.2 KiB
Plaintext
|
|
<controls:MaterialWindow
|
||
|
|
x:Class="Szmedi.RvKits.InfoManager.EAMTools.EAMFacilityCodeWin"
|
||
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
|
|
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
|
||
|
|
xmlns:controls="clr-namespace:Szmedi.RvKits.Controls"
|
||
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||
|
|
xmlns:eam="clr-namespace:Szmedi.RvKits.InfoManager.EAMTools"
|
||
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||
|
|
xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||
|
|
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
||
|
|
Title="EAM设备编码"
|
||
|
|
Width="800"
|
||
|
|
Height="600"
|
||
|
|
d:DataContext="{d:DesignInstance Type=eam:EAMFacilityCodeViewModel}"
|
||
|
|
mc:Ignorable="d">
|
||
|
|
<controls:MaterialWindow.Resources>
|
||
|
|
<ResourceDictionary Source="pack://application:,,,/Szmedi.RvKits;component/WPFUI.xaml" />
|
||
|
|
</controls:MaterialWindow.Resources>
|
||
|
|
|
||
|
|
<Grid>
|
||
|
|
<Grid.RowDefinitions>
|
||
|
|
<RowDefinition Height="*" />
|
||
|
|
<RowDefinition Height="Auto" />
|
||
|
|
<RowDefinition Height="Auto" />
|
||
|
|
</Grid.RowDefinitions>
|
||
|
|
<DataGrid
|
||
|
|
Margin="5"
|
||
|
|
d:ItemsSource="{d:SampleData ItemCount=5}"
|
||
|
|
AutoGeneratingColumn="DataGrid_AutoGeneratingColumn"
|
||
|
|
CanUserAddRows="False"
|
||
|
|
CanUserResizeColumns="True"
|
||
|
|
ItemsSource="{Binding Facilities, Mode=OneWay}"
|
||
|
|
SelectedItem="{Binding SelectedFacility}"
|
||
|
|
SelectionMode="Single"
|
||
|
|
ToolTip="双击定位到已编码的设备">
|
||
|
|
<b:Interaction.Triggers>
|
||
|
|
<b:EventTrigger EventName="SelectionChanged">
|
||
|
|
<b:InvokeCommandAction Command="{Binding GetSelectedFacilityCommand}" />
|
||
|
|
</b:EventTrigger>
|
||
|
|
<b:EventTrigger EventName="MouseDoubleClick">
|
||
|
|
<b:InvokeCommandAction Command="{Binding LocationSelectedFacilityCommand}" />
|
||
|
|
</b:EventTrigger>
|
||
|
|
</b:Interaction.Triggers>
|
||
|
|
<DataGrid.Columns>
|
||
|
|
<DataGridTemplateColumn>
|
||
|
|
<DataGridTemplateColumn.Header>
|
||
|
|
<TextBlock Text="是否填写" />
|
||
|
|
</DataGridTemplateColumn.Header>
|
||
|
|
<DataGridTemplateColumn.CellTemplate>
|
||
|
|
<DataTemplate>
|
||
|
|
<CheckBox
|
||
|
|
HorizontalAlignment="Center"
|
||
|
|
VerticalAlignment="Center"
|
||
|
|
IsChecked="{Binding IsChecked, UpdateSourceTrigger=PropertyChanged}" />
|
||
|
|
</DataTemplate>
|
||
|
|
</DataGridTemplateColumn.CellTemplate>
|
||
|
|
</DataGridTemplateColumn>
|
||
|
|
</DataGrid.Columns>
|
||
|
|
<!--<DataGrid.Columns>
|
||
|
|
<DataGridTextColumn
|
||
|
|
Binding="{Binding Name}"
|
||
|
|
Header="设备名称"
|
||
|
|
IsReadOnly="True" />
|
||
|
|
<DataGridTextColumn
|
||
|
|
Binding="{Binding AssetName}"
|
||
|
|
Header="固定资产名称"
|
||
|
|
IsReadOnly="True" />
|
||
|
|
<DataGridTextColumn
|
||
|
|
Binding="{Binding Model}"
|
||
|
|
Header="规格型号"
|
||
|
|
IsReadOnly="True" />
|
||
|
|
<DataGridTextColumn
|
||
|
|
Binding="{Binding FunctionCode}"
|
||
|
|
Header="功能位置"
|
||
|
|
IsReadOnly="True" />
|
||
|
|
<DataGridTextColumn
|
||
|
|
Binding="{Binding Floor}"
|
||
|
|
Header="楼层"
|
||
|
|
IsReadOnly="True" />
|
||
|
|
<DataGridTextColumn
|
||
|
|
Binding="{Binding Location}"
|
||
|
|
Header="存放位置"
|
||
|
|
IsReadOnly="True" />
|
||
|
|
</DataGrid.Columns>-->
|
||
|
|
</DataGrid>
|
||
|
|
<Grid Grid.Row="1">
|
||
|
|
<Grid.ColumnDefinitions>
|
||
|
|
<ColumnDefinition Width="*" />
|
||
|
|
<ColumnDefinition Width="*" />
|
||
|
|
<ColumnDefinition Width="*" />
|
||
|
|
<ColumnDefinition Width="Auto" />
|
||
|
|
</Grid.ColumnDefinitions>
|
||
|
|
<Grid.RowDefinitions>
|
||
|
|
<RowDefinition Height="Auto" />
|
||
|
|
<RowDefinition Height="Auto" />
|
||
|
|
</Grid.RowDefinitions>
|
||
|
|
<TextBox
|
||
|
|
x:Name="Search"
|
||
|
|
Grid.Column="0"
|
||
|
|
Margin="5"
|
||
|
|
md:HintAssist.Hint="搜索"
|
||
|
|
Text="{Binding SearchText, UpdateSourceTrigger=PropertyChanged}" />
|
||
|
|
<TextBox
|
||
|
|
x:Name="Path"
|
||
|
|
Grid.Column="1"
|
||
|
|
Margin="5"
|
||
|
|
md:HintAssist.Hint="编码表路径"
|
||
|
|
IsReadOnly="True"
|
||
|
|
Text="{Binding FilePath}" />
|
||
|
|
<ComboBox
|
||
|
|
x:Name="TableName"
|
||
|
|
Grid.Column="2"
|
||
|
|
Margin="5"
|
||
|
|
ItemsSource="{Binding TableNames}"
|
||
|
|
SelectedItem="{Binding SelectedTableName}" />
|
||
|
|
<UniformGrid Grid.Column="3" Rows="1">
|
||
|
|
<Button
|
||
|
|
Margin="5"
|
||
|
|
HorizontalAlignment="Stretch"
|
||
|
|
Command="{Binding BrowserExcelFileCommand}"
|
||
|
|
Content="选择Excel文件" />
|
||
|
|
<Button
|
||
|
|
Grid.Column="3"
|
||
|
|
Margin="5"
|
||
|
|
HorizontalAlignment="Stretch"
|
||
|
|
Command="{Binding OpenExcelFileCommand}"
|
||
|
|
Content="打开Excel文件" />
|
||
|
|
|
||
|
|
</UniformGrid>
|
||
|
|
<TextBox
|
||
|
|
x:Name="Prefix"
|
||
|
|
Grid.Row="1"
|
||
|
|
Grid.Column="0"
|
||
|
|
Margin="5"
|
||
|
|
md:HintAssist.Hint="前缀"
|
||
|
|
Text="{Binding Prefix}" />
|
||
|
|
<ComboBox
|
||
|
|
x:Name="Floor"
|
||
|
|
Grid.Row="1"
|
||
|
|
Grid.Column="1"
|
||
|
|
Margin="5"
|
||
|
|
md:HintAssist.Hint="楼层"
|
||
|
|
ItemsSource="{Binding Floors}"
|
||
|
|
SelectedIndex="0"
|
||
|
|
SelectedItem="{Binding SelectedFloor}" />
|
||
|
|
<TextBox
|
||
|
|
x:Name="Code"
|
||
|
|
Grid.Row="1"
|
||
|
|
Grid.Column="2"
|
||
|
|
Margin="5"
|
||
|
|
md:HintAssist.Hint="功能位置编码"
|
||
|
|
Text="{Binding FacilityCode, UpdateSourceTrigger=PropertyChanged}" />
|
||
|
|
<UniformGrid
|
||
|
|
Grid.Row="1"
|
||
|
|
Grid.Column="3"
|
||
|
|
Rows="1">
|
||
|
|
<Button
|
||
|
|
Margin="5"
|
||
|
|
HorizontalAlignment="Stretch"
|
||
|
|
Command="{Binding AddToComponentCommand}"
|
||
|
|
Content="添加到选中构件" />
|
||
|
|
<Button
|
||
|
|
Grid.Column="3"
|
||
|
|
Margin="5"
|
||
|
|
HorizontalAlignment="Stretch"
|
||
|
|
Command="{Binding SaveExcelFileCommand}"
|
||
|
|
Content="保存填写结果" />
|
||
|
|
</UniformGrid>
|
||
|
|
</Grid>
|
||
|
|
<Grid Grid.Row="2" VerticalAlignment="Center" />
|
||
|
|
</Grid>
|
||
|
|
|
||
|
|
</controls:MaterialWindow>
|