145 lines
5.5 KiB
XML
145 lines
5.5 KiB
XML
<Window
|
||
x:Class="RookieStation.PackAreaModule.View.WpfShelvesLayout"
|
||
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:RookieStation.PackAreaModule.Model"
|
||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||
xmlns:utils="clr-namespace:RookieStation.Utils"
|
||
Width="81"
|
||
Height="396"
|
||
MinWidth="400"
|
||
MinHeight="500"
|
||
ShowInTaskbar="False"
|
||
mc:Ignorable="d">
|
||
<Window.Resources>
|
||
<ResourceDictionary>
|
||
<utils:EnumItemsSource x:Key="GroupEnumDescriptionSource" Type="{x:Type local:NumOfGroup}" />
|
||
<utils:EnumItemsSource x:Key="LengthTypeEnumDescriptionSource" Type="{x:Type local:ShelfLength}" />
|
||
<utils:EnumItemsSource x:Key="WidthTypeEnumDescriptionSource" Type="{x:Type local:ShelfWidth}" />
|
||
<ResourceDictionary.MergedDictionaries>
|
||
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml" />
|
||
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml" />
|
||
</ResourceDictionary.MergedDictionaries>
|
||
</ResourceDictionary>
|
||
</Window.Resources>
|
||
<Grid Margin="10">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="*" />
|
||
</Grid.ColumnDefinitions>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="1.3*" />
|
||
<RowDefinition Height="5*" />
|
||
<RowDefinition Height="*" />
|
||
</Grid.RowDefinitions>
|
||
<GroupBox
|
||
Grid.Row="0"
|
||
Grid.Column="0"
|
||
Margin="2"
|
||
Header="通道宽度">
|
||
<TextBox
|
||
x:Name="tbPassageWidth"
|
||
InputMethod.IsInputMethodEnabled="False"
|
||
PreviewTextInput="tb_PreviewTextInput"
|
||
Text="1500"
|
||
TextAlignment="Center" />
|
||
</GroupBox>
|
||
<GroupBox
|
||
Grid.Row="0"
|
||
Grid.Column="1"
|
||
Margin="2"
|
||
Header="起点距离">
|
||
<TextBox
|
||
x:Name="tbDistance"
|
||
InputMethod.IsInputMethodEnabled="False"
|
||
PreviewTextInput="tb_PreviewTextInput"
|
||
Text="0"
|
||
TextAlignment="Center" />
|
||
</GroupBox>
|
||
<GroupBox
|
||
Grid.Row="0"
|
||
Grid.Column="2"
|
||
Margin="2"
|
||
Header="起点垂距 ">
|
||
<TextBox
|
||
x:Name="tbOffest"
|
||
InputMethod.IsInputMethodEnabled="False"
|
||
PreviewTextInput="tb_PreviewTextInput"
|
||
Text="0"
|
||
TextAlignment="Center" />
|
||
</GroupBox>
|
||
<GroupBox
|
||
Grid.Row="0"
|
||
Grid.Column="3"
|
||
Margin="2"
|
||
Header="货架间距 ">
|
||
<TextBox
|
||
x:Name="tbSpacing"
|
||
InputMethod.IsInputMethodEnabled="False"
|
||
PreviewTextInput="tb_PreviewTextInput"
|
||
Text="1200"
|
||
TextAlignment="Center" />
|
||
</GroupBox>
|
||
<DataGrid
|
||
x:Name="dgShelves"
|
||
Grid.Row="1"
|
||
Grid.ColumnSpan="4"
|
||
Margin="2"
|
||
hc:DataGridAttach.ShowRowNumber="True"
|
||
AutoGenerateColumns="False"
|
||
CanUserSortColumns="False"
|
||
ItemsSource="{Binding Data}">
|
||
<DataGrid.Columns>
|
||
<DataGridComboBoxColumn
|
||
MinWidth="100"
|
||
Header="成组"
|
||
ItemsSource="{Binding Source={StaticResource GroupEnumDescriptionSource}}"
|
||
SelectedValueBinding="{Binding NumOfGroup, Converter={StaticResource GroupEnumDescriptionSource}, Mode=TwoWay}" />
|
||
<DataGridComboBoxColumn
|
||
MinWidth="100"
|
||
Header="长度"
|
||
ItemsSource="{Binding Source={StaticResource LengthTypeEnumDescriptionSource}}"
|
||
SelectedValueBinding="{Binding ShelfLength, Converter={StaticResource LengthTypeEnumDescriptionSource}, Mode=TwoWay}" />
|
||
<DataGridComboBoxColumn
|
||
MinWidth="100"
|
||
Header="宽度"
|
||
ItemsSource="{Binding Source={StaticResource WidthTypeEnumDescriptionSource}}"
|
||
SelectedValueBinding="{Binding ShelfWidth, Converter={StaticResource WidthTypeEnumDescriptionSource}, Mode=TwoWay}" />
|
||
</DataGrid.Columns>
|
||
</DataGrid>
|
||
<TextBlock
|
||
Grid.Row="2"
|
||
Grid.Column="0"
|
||
VerticalAlignment="Center"
|
||
Text="单位:mm"
|
||
TextAlignment="Center" />
|
||
<Button
|
||
x:Name="btnAdd"
|
||
Grid.Row="2"
|
||
Grid.Column="1"
|
||
Width="75"
|
||
Height="30"
|
||
Click="btnAdd_Click"
|
||
Content="新增" />
|
||
<Button
|
||
x:Name="btnDelete"
|
||
Grid.Row="2"
|
||
Grid.Column="2"
|
||
Width="75"
|
||
Height="30"
|
||
Click="btnDelete_Click"
|
||
Content="删除" />
|
||
<Button
|
||
x:Name="btnConfirm"
|
||
Grid.Row="2"
|
||
Grid.Column="3"
|
||
Width="75"
|
||
Height="30"
|
||
Click="btnConfirm_Click"
|
||
Content="确定" />
|
||
</Grid>
|
||
</Window> |