720 lines
39 KiB
Plaintext
720 lines
39 KiB
Plaintext
|
|
<Window
|
|||
|
|
x:Class="MetroGauges.WpfLiEqui"
|
|||
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|||
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|||
|
|
xmlns:Custom="http://metro.mahapps.com/winfx/xaml/controls"
|
|||
|
|
xmlns:Model="clr-namespace:MetroGauges.Model"
|
|||
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|||
|
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|||
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|||
|
|
Title="直线段设备限界"
|
|||
|
|
Width="1280"
|
|||
|
|
Height="720"
|
|||
|
|
MinWidth="1280"
|
|||
|
|
MinHeight="720"
|
|||
|
|
AllowsTransparency="True"
|
|||
|
|
Background="{DynamicResource MaterialDesignPaper}"
|
|||
|
|
FontFamily="{DynamicResource MaterialDesignFont}"
|
|||
|
|
Icon="/MetroGauges;component/Resources/Icon/直线设备限界.png"
|
|||
|
|
Loaded="Window_Loaded"
|
|||
|
|
TextElement.FontSize="14"
|
|||
|
|
TextElement.FontWeight="Regular"
|
|||
|
|
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
|
|||
|
|
TextOptions.TextFormattingMode="Ideal"
|
|||
|
|
TextOptions.TextRenderingMode="Auto"
|
|||
|
|
WindowStartupLocation="CenterScreen"
|
|||
|
|
WindowStyle="None"
|
|||
|
|
mc:Ignorable="d">
|
|||
|
|
<Grid>
|
|||
|
|
<StackPanel>
|
|||
|
|
<materialDesign:ColorZone
|
|||
|
|
materialDesign:ShadowAssist.ShadowDepth="Depth2"
|
|||
|
|
Mode="PrimaryDark"
|
|||
|
|
MouseLeftButtonDown="HeaderZone_MouseLeftButtonDown">
|
|||
|
|
<Grid>
|
|||
|
|
<TextBlock
|
|||
|
|
HorizontalAlignment="Center"
|
|||
|
|
VerticalAlignment="Center"
|
|||
|
|
FontSize="22"><Run Text="直线段设备限界" /></TextBlock>
|
|||
|
|
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
|
|||
|
|
<Button
|
|||
|
|
x:Name="BtnPalette"
|
|||
|
|
Width="48"
|
|||
|
|
Height="48"
|
|||
|
|
Padding="0"
|
|||
|
|
Click="BtnPalette_Click"
|
|||
|
|
Style="{DynamicResource MaterialDesignFlatButton}"
|
|||
|
|
ToolTip="界面颜色">
|
|||
|
|
<materialDesign:PackIcon
|
|||
|
|
Width="40"
|
|||
|
|
Height="40"
|
|||
|
|
Foreground="White"
|
|||
|
|
Kind="Palette" />
|
|||
|
|
</Button>
|
|||
|
|
<Button
|
|||
|
|
x:Name="WindowMinimize"
|
|||
|
|
Width="48"
|
|||
|
|
Height="48"
|
|||
|
|
Padding="0"
|
|||
|
|
Click="WindowMinimize_Click"
|
|||
|
|
Style="{DynamicResource MaterialDesignFlatButton}"
|
|||
|
|
ToolTip="最小化">
|
|||
|
|
<materialDesign:PackIcon
|
|||
|
|
Width="40"
|
|||
|
|
Height="40"
|
|||
|
|
Foreground="White"
|
|||
|
|
Kind="WindowMinimize" />
|
|||
|
|
</Button>
|
|||
|
|
<Button
|
|||
|
|
x:Name="WindowClose"
|
|||
|
|
Width="48"
|
|||
|
|
Height="48"
|
|||
|
|
Padding="0"
|
|||
|
|
Click="WindowClose_Click"
|
|||
|
|
Style="{DynamicResource MaterialDesignFlatButton}"
|
|||
|
|
ToolTip="关闭">
|
|||
|
|
<materialDesign:PackIcon
|
|||
|
|
Width="40"
|
|||
|
|
Height="40"
|
|||
|
|
Foreground="White"
|
|||
|
|
Kind="WindowClose" />
|
|||
|
|
</Button>
|
|||
|
|
|
|||
|
|
</StackPanel>
|
|||
|
|
|
|||
|
|
</Grid>
|
|||
|
|
|
|||
|
|
</materialDesign:ColorZone>
|
|||
|
|
<ToolBarTray Height="56">
|
|||
|
|
<ToolBar ClipToBounds="False" Style="{DynamicResource MaterialDesignToolBar}">
|
|||
|
|
<Button Click="BtnOpen_Click" ToolTip="导入车辆限界数据">
|
|||
|
|
<materialDesign:PackIcon Kind="FileImport" />
|
|||
|
|
</Button>
|
|||
|
|
<Button Click="BtnSave_Click" ToolTip="保存已定义的车辆限界数据">
|
|||
|
|
<materialDesign:PackIcon Kind="ContentSave" />
|
|||
|
|
</Button>
|
|||
|
|
<Button Click="BtnSaveGauges_Click" ToolTip="保存直线设备限界数据">
|
|||
|
|
<materialDesign:PackIcon Kind="ContentSaveOutline" />
|
|||
|
|
</Button>
|
|||
|
|
<Button Click="Btnclear_Click" ToolTip="清理数据">
|
|||
|
|
<materialDesign:PackIcon Kind="Broom" />
|
|||
|
|
</Button>
|
|||
|
|
<Separator />
|
|||
|
|
<Button
|
|||
|
|
Command="Copy"
|
|||
|
|
ToolBar.OverflowMode="AsNeeded"
|
|||
|
|
ToolTip="复制内容">
|
|||
|
|
<materialDesign:PackIcon Kind="ContentCopy" />
|
|||
|
|
</Button>
|
|||
|
|
<Button
|
|||
|
|
Command="Paste"
|
|||
|
|
ToolBar.OverflowMode="AsNeeded"
|
|||
|
|
ToolTip="粘贴内容">
|
|||
|
|
<materialDesign:PackIcon Kind="ContentPaste" />
|
|||
|
|
</Button>
|
|||
|
|
<Separator />
|
|||
|
|
<Button
|
|||
|
|
Click="BtnAddRowLast_Click"
|
|||
|
|
ToolBar.OverflowMode="AsNeeded"
|
|||
|
|
ToolTip="添加新行">
|
|||
|
|
<materialDesign:PackIcon Kind="TableRow" />
|
|||
|
|
</Button>
|
|||
|
|
<Button
|
|||
|
|
Click="BtnAddRowBefore_Click"
|
|||
|
|
ToolBar.OverflowMode="AsNeeded"
|
|||
|
|
ToolTip="向前插入行">
|
|||
|
|
<materialDesign:PackIcon Kind="TableRowPlusBefore" />
|
|||
|
|
</Button>
|
|||
|
|
<Button
|
|||
|
|
Click="BtnAddRowAfter_Click"
|
|||
|
|
ToolBar.OverflowMode="AsNeeded"
|
|||
|
|
ToolTip="向后插入行">
|
|||
|
|
<materialDesign:PackIcon Kind="TableRowPlusAfter" />
|
|||
|
|
</Button>
|
|||
|
|
<Button
|
|||
|
|
Click="BtnDeleteRow_Click"
|
|||
|
|
ToolBar.OverflowMode="AsNeeded"
|
|||
|
|
ToolTip="删除选中行">
|
|||
|
|
<materialDesign:PackIcon Kind="TableRowRemove" />
|
|||
|
|
</Button>
|
|||
|
|
<Button
|
|||
|
|
Click="BtnForwardRow_Click"
|
|||
|
|
ToolBar.OverflowMode="AsNeeded"
|
|||
|
|
ToolTip="向上移动行">
|
|||
|
|
<materialDesign:PackIcon Kind="ArrowUp" />
|
|||
|
|
</Button>
|
|||
|
|
<Button
|
|||
|
|
Click="BtnBackwardRow_Click"
|
|||
|
|
ToolBar.OverflowMode="AsNeeded"
|
|||
|
|
ToolTip="向下移动行">
|
|||
|
|
<materialDesign:PackIcon Kind="ArrowDown" />
|
|||
|
|
</Button>
|
|||
|
|
<Separator />
|
|||
|
|
<Button
|
|||
|
|
Click="BtnCalc_Click"
|
|||
|
|
ToolBar.OverflowMode="AsNeeded"
|
|||
|
|
ToolTip="限界计算">
|
|||
|
|
<materialDesign:PackIcon Kind="Calculator" />
|
|||
|
|
</Button>
|
|||
|
|
<Button
|
|||
|
|
Click="BtnPreview_Click"
|
|||
|
|
ToolBar.OverflowMode="AsNeeded"
|
|||
|
|
ToolTip="预览限界">
|
|||
|
|
<materialDesign:PackIcon Kind="PrintPreview" />
|
|||
|
|
</Button>
|
|||
|
|
<Separator />
|
|||
|
|
<Button
|
|||
|
|
Click="BtnExcel_Click"
|
|||
|
|
ToolBar.OverflowMode="AsNeeded"
|
|||
|
|
ToolTip="导出表格">
|
|||
|
|
<materialDesign:PackIcon Kind="FileExcel" />
|
|||
|
|
</Button>
|
|||
|
|
<Button
|
|||
|
|
Click="BtnCAD_Click"
|
|||
|
|
ToolBar.OverflowMode="AsNeeded"
|
|||
|
|
ToolTip="导出限界">
|
|||
|
|
<materialDesign:PackIcon Kind="Metro" />
|
|||
|
|
<!--<TextBlock><Run Text="Vcad"/></TextBlock>-->
|
|||
|
|
</Button>
|
|||
|
|
<Separator />
|
|||
|
|
<ToggleButton
|
|||
|
|
x:Name="TGLock"
|
|||
|
|
IsChecked="True"
|
|||
|
|
Style="{StaticResource MaterialDesignSwitchToggleButton}"
|
|||
|
|
ToolTip="锁定表格">
|
|||
|
|
<materialDesign:ToggleButtonAssist.OnContent>
|
|||
|
|
<materialDesign:PackIcon Kind="Pin" RenderTransformOrigin="0.5,0.45">
|
|||
|
|
<materialDesign:PackIcon.RenderTransform>
|
|||
|
|
<RotateTransform Angle="45" />
|
|||
|
|
</materialDesign:PackIcon.RenderTransform>
|
|||
|
|
</materialDesign:PackIcon>
|
|||
|
|
</materialDesign:ToggleButtonAssist.OnContent>
|
|||
|
|
<materialDesign:PackIcon Kind="Pin" />
|
|||
|
|
</ToggleButton>
|
|||
|
|
</ToolBar>
|
|||
|
|
</ToolBarTray>
|
|||
|
|
<Separator />
|
|||
|
|
|
|||
|
|
<WrapPanel
|
|||
|
|
x:Name="TbWrap"
|
|||
|
|
MaxWidth="1000"
|
|||
|
|
HorizontalAlignment="Left">
|
|||
|
|
<WrapPanel.DataContext>
|
|||
|
|
<Model:LiEquiModel />
|
|||
|
|
</WrapPanel.DataContext>
|
|||
|
|
<materialDesign:ColorZone
|
|||
|
|
Margin="4"
|
|||
|
|
materialDesign:ShadowAssist.ShadowDepth="Depth1"
|
|||
|
|
CornerRadius="5">
|
|||
|
|
<StackPanel Orientation="Horizontal">
|
|||
|
|
<TextBox
|
|||
|
|
x:Name="ΔX_a"
|
|||
|
|
Width="70"
|
|||
|
|
Margin="4"
|
|||
|
|
materialDesign:HintAssist.FloatingScale="0.9"
|
|||
|
|
materialDesign:HintAssist.Hint="受电弓-侧"
|
|||
|
|
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
|||
|
|
Text="{Binding ΔX_a, UpdateSourceTrigger=PropertyChanged}"
|
|||
|
|
TextAlignment="Center"
|
|||
|
|
ToolTip="受电弓侧向安全间距:30mm~50mm" />
|
|||
|
|
<TextBlock
|
|||
|
|
Margin="4"
|
|||
|
|
VerticalAlignment="Bottom"
|
|||
|
|
Text="mm" />
|
|||
|
|
</StackPanel>
|
|||
|
|
</materialDesign:ColorZone>
|
|||
|
|
<materialDesign:ColorZone
|
|||
|
|
Margin="4"
|
|||
|
|
materialDesign:ShadowAssist.ShadowDepth="Depth1"
|
|||
|
|
CornerRadius="5">
|
|||
|
|
<StackPanel Orientation="Horizontal">
|
|||
|
|
<TextBox
|
|||
|
|
x:Name="ΔY_a"
|
|||
|
|
Width="60"
|
|||
|
|
Margin="4"
|
|||
|
|
materialDesign:HintAssist.FloatingScale="0.9"
|
|||
|
|
materialDesign:HintAssist.Hint="受电弓-上"
|
|||
|
|
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
|||
|
|
Text="{Binding ΔY_a, UpdateSourceTrigger=PropertyChanged}"
|
|||
|
|
TextAlignment="Center"
|
|||
|
|
ToolTip="受电弓向上安全间距:不小于30mm" />
|
|||
|
|
<TextBlock
|
|||
|
|
Margin="4"
|
|||
|
|
VerticalAlignment="Bottom"
|
|||
|
|
Text="mm" />
|
|||
|
|
</StackPanel>
|
|||
|
|
</materialDesign:ColorZone>
|
|||
|
|
<materialDesign:ColorZone
|
|||
|
|
Margin="4"
|
|||
|
|
materialDesign:ShadowAssist.ShadowDepth="Depth1"
|
|||
|
|
CornerRadius="5">
|
|||
|
|
<StackPanel Orientation="Horizontal">
|
|||
|
|
<TextBox
|
|||
|
|
x:Name="ΔY_b"
|
|||
|
|
Width="60"
|
|||
|
|
Margin="4"
|
|||
|
|
materialDesign:HintAssist.FloatingScale="0.9"
|
|||
|
|
materialDesign:HintAssist.Hint="车顶-上"
|
|||
|
|
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
|||
|
|
Text="{Binding ΔY_b, UpdateSourceTrigger=PropertyChanged}"
|
|||
|
|
TextAlignment="Center"
|
|||
|
|
ToolTip="车顶向上安全间距:不小于30mm" />
|
|||
|
|
<TextBlock
|
|||
|
|
Margin="4"
|
|||
|
|
VerticalAlignment="Bottom"
|
|||
|
|
Text="mm" />
|
|||
|
|
</StackPanel>
|
|||
|
|
</materialDesign:ColorZone>
|
|||
|
|
<materialDesign:ColorZone
|
|||
|
|
Margin="4"
|
|||
|
|
materialDesign:ShadowAssist.ShadowDepth="Depth1"
|
|||
|
|
CornerRadius="5">
|
|||
|
|
<StackPanel Orientation="Horizontal">
|
|||
|
|
<TextBox
|
|||
|
|
x:Name="ΔX_c"
|
|||
|
|
Width="70"
|
|||
|
|
Margin="4"
|
|||
|
|
materialDesign:HintAssist.FloatingScale="0.9"
|
|||
|
|
materialDesign:HintAssist.Hint="底架边梁-上"
|
|||
|
|
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
|||
|
|
Text="{Binding ΔX_c, UpdateSourceTrigger=PropertyChanged}"
|
|||
|
|
TextAlignment="Center"
|
|||
|
|
ToolTip="车体底架边梁以上区域侧向安全间距:不小于30mm" />
|
|||
|
|
<TextBlock
|
|||
|
|
Margin="4"
|
|||
|
|
VerticalAlignment="Bottom"
|
|||
|
|
Text="mm" />
|
|||
|
|
</StackPanel>
|
|||
|
|
</materialDesign:ColorZone>
|
|||
|
|
<materialDesign:ColorZone
|
|||
|
|
Margin="4"
|
|||
|
|
materialDesign:ShadowAssist.ShadowDepth="Depth1"
|
|||
|
|
CornerRadius="5">
|
|||
|
|
<StackPanel Orientation="Horizontal">
|
|||
|
|
<TextBox
|
|||
|
|
x:Name="ΔX_d"
|
|||
|
|
Width="70"
|
|||
|
|
Margin="4"
|
|||
|
|
materialDesign:HintAssist.FloatingScale="0.9"
|
|||
|
|
materialDesign:HintAssist.Hint="底架边梁-侧"
|
|||
|
|
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
|||
|
|
Text="{Binding ΔX_d, UpdateSourceTrigger=PropertyChanged}"
|
|||
|
|
TextAlignment="Center"
|
|||
|
|
ToolTip="车体底架边梁及以下区域侧向安全间距:不小于20mm" />
|
|||
|
|
<TextBlock
|
|||
|
|
Margin="4"
|
|||
|
|
VerticalAlignment="Bottom"
|
|||
|
|
Text="mm" />
|
|||
|
|
</StackPanel>
|
|||
|
|
</materialDesign:ColorZone>
|
|||
|
|
<materialDesign:ColorZone
|
|||
|
|
Margin="4"
|
|||
|
|
materialDesign:ShadowAssist.ShadowDepth="Depth1"
|
|||
|
|
CornerRadius="5">
|
|||
|
|
<StackPanel Orientation="Horizontal">
|
|||
|
|
<TextBox
|
|||
|
|
x:Name="ΔY_d"
|
|||
|
|
Width="70"
|
|||
|
|
Margin="4"
|
|||
|
|
materialDesign:HintAssist.FloatingScale="0.9"
|
|||
|
|
materialDesign:HintAssist.Hint="底架边梁-下"
|
|||
|
|
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
|||
|
|
Text="{Binding ΔY_d, UpdateSourceTrigger=PropertyChanged}"
|
|||
|
|
TextAlignment="Center"
|
|||
|
|
ToolTip="车体底架边梁及以下区域向下安全间距:不小于20mm" />
|
|||
|
|
<TextBlock
|
|||
|
|
Margin="4"
|
|||
|
|
VerticalAlignment="Bottom"
|
|||
|
|
Text="mm" />
|
|||
|
|
</StackPanel>
|
|||
|
|
</materialDesign:ColorZone>
|
|||
|
|
<materialDesign:ColorZone
|
|||
|
|
Margin="4"
|
|||
|
|
materialDesign:ShadowAssist.ShadowDepth="Depth1"
|
|||
|
|
CornerRadius="5">
|
|||
|
|
<StackPanel Orientation="Horizontal">
|
|||
|
|
<TextBox
|
|||
|
|
x:Name="ΔX_e"
|
|||
|
|
Width="60"
|
|||
|
|
Margin="4"
|
|||
|
|
materialDesign:HintAssist.FloatingScale="0.9"
|
|||
|
|
materialDesign:HintAssist.Hint="转向架-侧"
|
|||
|
|
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
|||
|
|
Text="{Binding ΔX_e, UpdateSourceTrigger=PropertyChanged}"
|
|||
|
|
TextAlignment="Center"
|
|||
|
|
ToolTip="转向架侧向安全间距:10mm~15mm" />
|
|||
|
|
<TextBlock
|
|||
|
|
Margin="4"
|
|||
|
|
VerticalAlignment="Bottom"
|
|||
|
|
Text="mm" />
|
|||
|
|
</StackPanel>
|
|||
|
|
</materialDesign:ColorZone>
|
|||
|
|
<materialDesign:ColorZone
|
|||
|
|
Margin="4"
|
|||
|
|
materialDesign:ShadowAssist.ShadowDepth="Depth1"
|
|||
|
|
CornerRadius="5">
|
|||
|
|
<StackPanel Orientation="Horizontal">
|
|||
|
|
<TextBox
|
|||
|
|
x:Name="ΔY_e"
|
|||
|
|
Width="70"
|
|||
|
|
Margin="4"
|
|||
|
|
materialDesign:HintAssist.FloatingScale="0.9"
|
|||
|
|
materialDesign:HintAssist.Hint="转向架-下"
|
|||
|
|
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
|||
|
|
Text="{Binding ΔY_e, UpdateSourceTrigger=PropertyChanged}"
|
|||
|
|
TextAlignment="Center"
|
|||
|
|
ToolTip="转向架向下安全间距:10mm~15mm" />
|
|||
|
|
<TextBlock
|
|||
|
|
Margin="4"
|
|||
|
|
VerticalAlignment="Bottom"
|
|||
|
|
Text="mm" />
|
|||
|
|
</StackPanel>
|
|||
|
|
</materialDesign:ColorZone>
|
|||
|
|
<materialDesign:ColorZone
|
|||
|
|
Margin="4"
|
|||
|
|
materialDesign:ShadowAssist.ShadowDepth="Depth1"
|
|||
|
|
CornerRadius="5">
|
|||
|
|
<StackPanel Orientation="Horizontal">
|
|||
|
|
<TextBox
|
|||
|
|
x:Name="ΔX_f"
|
|||
|
|
Width="80"
|
|||
|
|
Margin="4"
|
|||
|
|
materialDesign:HintAssist.FloatingScale="0.9"
|
|||
|
|
materialDesign:HintAssist.Hint="车下吊挂物-侧"
|
|||
|
|
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
|||
|
|
Text="{Binding ΔX_f, UpdateSourceTrigger=PropertyChanged}"
|
|||
|
|
TextAlignment="Center"
|
|||
|
|
ToolTip="车下吊挂物侧向安全间距:不小于25mm" />
|
|||
|
|
<TextBlock
|
|||
|
|
Margin="4"
|
|||
|
|
VerticalAlignment="Bottom"
|
|||
|
|
Text="mm" />
|
|||
|
|
</StackPanel>
|
|||
|
|
</materialDesign:ColorZone>
|
|||
|
|
<materialDesign:ColorZone
|
|||
|
|
Margin="4"
|
|||
|
|
materialDesign:ShadowAssist.ShadowDepth="Depth1"
|
|||
|
|
CornerRadius="5">
|
|||
|
|
<StackPanel Orientation="Horizontal">
|
|||
|
|
<TextBox
|
|||
|
|
x:Name="ΔY_f"
|
|||
|
|
Width="80"
|
|||
|
|
Margin="4"
|
|||
|
|
materialDesign:HintAssist.FloatingScale="0.9"
|
|||
|
|
materialDesign:HintAssist.Hint="车下吊挂物-下"
|
|||
|
|
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
|||
|
|
Text="{Binding ΔY_f, UpdateSourceTrigger=PropertyChanged}"
|
|||
|
|
TextAlignment="Center"
|
|||
|
|
ToolTip="车下轨外吊挂物向下安全间距:不小于30mm" />
|
|||
|
|
<TextBlock
|
|||
|
|
Margin="4"
|
|||
|
|
VerticalAlignment="Bottom"
|
|||
|
|
Text="mm" />
|
|||
|
|
</StackPanel>
|
|||
|
|
</materialDesign:ColorZone>
|
|||
|
|
<materialDesign:ColorZone
|
|||
|
|
Margin="4"
|
|||
|
|
materialDesign:ShadowAssist.ShadowDepth="Depth1"
|
|||
|
|
CornerRadius="5">
|
|||
|
|
<StackPanel Orientation="Horizontal">
|
|||
|
|
<TextBox
|
|||
|
|
x:Name="ΔY_g"
|
|||
|
|
Width="80"
|
|||
|
|
Margin="4"
|
|||
|
|
materialDesign:HintAssist.FloatingScale="0.9"
|
|||
|
|
materialDesign:HintAssist.Hint="车下吊挂物-下"
|
|||
|
|
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
|||
|
|
Text="{Binding ΔY_g, UpdateSourceTrigger=PropertyChanged}"
|
|||
|
|
TextAlignment="Center"
|
|||
|
|
ToolTip="车下轨内吊挂物向下安全间距:不小于25mm" />
|
|||
|
|
<TextBlock
|
|||
|
|
Margin="4"
|
|||
|
|
VerticalAlignment="Bottom"
|
|||
|
|
Text="mm" />
|
|||
|
|
</StackPanel>
|
|||
|
|
</materialDesign:ColorZone>
|
|||
|
|
</WrapPanel>
|
|||
|
|
<Separator />
|
|||
|
|
<DataGrid
|
|||
|
|
x:Name="dataGrid"
|
|||
|
|
Margin="10"
|
|||
|
|
materialDesign:DataGridAssist.CellPadding="13 8 8 8"
|
|||
|
|
materialDesign:DataGridAssist.ColumnHeaderPadding="8"
|
|||
|
|
AutoGenerateColumns="False"
|
|||
|
|
CanUserAddRows="False"
|
|||
|
|
CanUserSortColumns="False"
|
|||
|
|
GridLinesVisibility="All"
|
|||
|
|
IsEnabled="{Binding IsChecked, ElementName=TGLock}"
|
|||
|
|
ItemsSource="{Binding Items}"
|
|||
|
|
VerticalGridLinesBrush="#FF757575">
|
|||
|
|
<DataGrid.ContextMenu>
|
|||
|
|
<ContextMenu FlowDirection="RightToLeft" StaysOpen="true">
|
|||
|
|
<MenuItem Click="BtnAddRowLast_Click">
|
|||
|
|
<MenuItem.Header>
|
|||
|
|
<StackPanel Orientation="Horizontal">
|
|||
|
|
<TextBlock Margin="0,0,10,0" Text="添加新行" />
|
|||
|
|
<materialDesign:PackIcon Kind="TableRow" />
|
|||
|
|
</StackPanel>
|
|||
|
|
</MenuItem.Header>
|
|||
|
|
</MenuItem>
|
|||
|
|
<MenuItem Click="BtnAddRowBefore_Click">
|
|||
|
|
<MenuItem.Header>
|
|||
|
|
<StackPanel Orientation="Horizontal">
|
|||
|
|
<TextBlock Margin="0,0,10,0" Text="向前加行" />
|
|||
|
|
<materialDesign:PackIcon Kind="TableRowPlusBefore" />
|
|||
|
|
</StackPanel>
|
|||
|
|
</MenuItem.Header>
|
|||
|
|
</MenuItem>
|
|||
|
|
<MenuItem Click="BtnAddRowAfter_Click">
|
|||
|
|
<MenuItem.Header>
|
|||
|
|
<StackPanel Orientation="Horizontal">
|
|||
|
|
<TextBlock Margin="0,0,10,0" Text="向后加行" />
|
|||
|
|
<materialDesign:PackIcon Kind="TableRowPlusAfter" />
|
|||
|
|
</StackPanel>
|
|||
|
|
</MenuItem.Header>
|
|||
|
|
</MenuItem>
|
|||
|
|
<MenuItem Click="BtnDeleteRow_Click">
|
|||
|
|
<MenuItem.Header>
|
|||
|
|
<StackPanel Orientation="Horizontal">
|
|||
|
|
<TextBlock Margin="0,0,10,0" Text="删除此行" />
|
|||
|
|
<materialDesign:PackIcon Kind="TableRowRemove" />
|
|||
|
|
</StackPanel>
|
|||
|
|
</MenuItem.Header>
|
|||
|
|
</MenuItem>
|
|||
|
|
</ContextMenu>
|
|||
|
|
</DataGrid.ContextMenu>
|
|||
|
|
<DataGrid.Columns>
|
|||
|
|
<materialDesign:MaterialDataGridComboBoxColumn
|
|||
|
|
MinWidth="160"
|
|||
|
|
Header="点位"
|
|||
|
|
ItemsSourceBinding="{Binding DataContext.StrPositions, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type DataGrid}}}"
|
|||
|
|
SelectedValueBinding="{Binding StrPosition, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
|
|||
|
|
<materialDesign:MaterialDataGridComboBoxColumn.HeaderStyle>
|
|||
|
|
<Style BasedOn="{StaticResource MaterialDesignDataGridColumnHeader}" TargetType="{x:Type DataGridColumnHeader}">
|
|||
|
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
|||
|
|
<Setter Property="ContentTemplate">
|
|||
|
|
<Setter.Value>
|
|||
|
|
<DataTemplate>
|
|||
|
|
<TextBlock
|
|||
|
|
Text="{Binding}"
|
|||
|
|
TextAlignment="Center"
|
|||
|
|
TextWrapping="Wrap" />
|
|||
|
|
</DataTemplate>
|
|||
|
|
</Setter.Value>
|
|||
|
|
</Setter>
|
|||
|
|
</Style>
|
|||
|
|
</materialDesign:MaterialDataGridComboBoxColumn.HeaderStyle>
|
|||
|
|
</materialDesign:MaterialDataGridComboBoxColumn>
|
|||
|
|
<materialDesign:MaterialDataGridTextColumn
|
|||
|
|
MinWidth="150"
|
|||
|
|
Binding="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|||
|
|
EditingElementStyle="{StaticResource MaterialDesignDataGridTextColumnEditingStyle}"
|
|||
|
|
Header="点号">
|
|||
|
|
<materialDesign:MaterialDataGridTextColumn.HeaderStyle>
|
|||
|
|
<Style BasedOn="{StaticResource MaterialDesignDataGridColumnHeader}" TargetType="{x:Type DataGridColumnHeader}">
|
|||
|
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
|||
|
|
<Setter Property="ContentTemplate">
|
|||
|
|
<Setter.Value>
|
|||
|
|
<DataTemplate>
|
|||
|
|
<StackPanel>
|
|||
|
|
<TextBlock
|
|||
|
|
Text="{Binding}"
|
|||
|
|
TextAlignment="Center"
|
|||
|
|
TextWrapping="Wrap"
|
|||
|
|
ToolTip="点号" />
|
|||
|
|
</StackPanel>
|
|||
|
|
</DataTemplate>
|
|||
|
|
</Setter.Value>
|
|||
|
|
</Setter>
|
|||
|
|
</Style>
|
|||
|
|
</materialDesign:MaterialDataGridTextColumn.HeaderStyle>
|
|||
|
|
<materialDesign:MaterialDataGridTextColumn.ElementStyle>
|
|||
|
|
<Style TargetType="{x:Type TextBlock}">
|
|||
|
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
|||
|
|
</Style>
|
|||
|
|
</materialDesign:MaterialDataGridTextColumn.ElementStyle>
|
|||
|
|
</materialDesign:MaterialDataGridTextColumn>
|
|||
|
|
<materialDesign:MaterialDataGridTextColumn
|
|||
|
|
MinWidth="150"
|
|||
|
|
Binding="{Binding X, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|||
|
|
EditingElementStyle="{StaticResource MaterialDesignDataGridTextColumnEditingStyle}"
|
|||
|
|
Header="X">
|
|||
|
|
<materialDesign:MaterialDataGridTextColumn.HeaderStyle>
|
|||
|
|
<Style BasedOn="{StaticResource MaterialDesignDataGridColumnHeader}" TargetType="{x:Type DataGridColumnHeader}">
|
|||
|
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
|||
|
|
<Setter Property="ContentTemplate">
|
|||
|
|
<Setter.Value>
|
|||
|
|
<DataTemplate>
|
|||
|
|
<StackPanel>
|
|||
|
|
<TextBlock
|
|||
|
|
Text="{Binding}"
|
|||
|
|
TextAlignment="Center"
|
|||
|
|
TextWrapping="Wrap"
|
|||
|
|
ToolTip="横坐标" />
|
|||
|
|
</StackPanel>
|
|||
|
|
</DataTemplate>
|
|||
|
|
</Setter.Value>
|
|||
|
|
</Setter>
|
|||
|
|
</Style>
|
|||
|
|
</materialDesign:MaterialDataGridTextColumn.HeaderStyle>
|
|||
|
|
<materialDesign:MaterialDataGridTextColumn.ElementStyle>
|
|||
|
|
<Style TargetType="{x:Type TextBlock}">
|
|||
|
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
|||
|
|
</Style>
|
|||
|
|
</materialDesign:MaterialDataGridTextColumn.ElementStyle>
|
|||
|
|
</materialDesign:MaterialDataGridTextColumn>
|
|||
|
|
<!-- if you want to use the pop up style (MaterialDesignDataGridTextColumnPopupEditingStyle), you must use MaterialDataGridTextColumn -->
|
|||
|
|
<materialDesign:MaterialDataGridTextColumn
|
|||
|
|
MinWidth="150"
|
|||
|
|
Binding="{Binding Y, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|||
|
|
EditingElementStyle="{StaticResource MaterialDesignDataGridTextColumnEditingStyle}"
|
|||
|
|
Header="Y">
|
|||
|
|
<materialDesign:MaterialDataGridTextColumn.HeaderStyle>
|
|||
|
|
<Style BasedOn="{StaticResource MaterialDesignDataGridColumnHeader}" TargetType="{x:Type DataGridColumnHeader}">
|
|||
|
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
|||
|
|
<Setter Property="ContentTemplate">
|
|||
|
|
<Setter.Value>
|
|||
|
|
<DataTemplate>
|
|||
|
|
<TextBlock
|
|||
|
|
Text="{Binding}"
|
|||
|
|
TextAlignment="Center"
|
|||
|
|
TextWrapping="Wrap"
|
|||
|
|
ToolTip="纵坐标" />
|
|||
|
|
</DataTemplate>
|
|||
|
|
</Setter.Value>
|
|||
|
|
</Setter>
|
|||
|
|
</Style>
|
|||
|
|
</materialDesign:MaterialDataGridTextColumn.HeaderStyle>
|
|||
|
|
<materialDesign:MaterialDataGridTextColumn.ElementStyle>
|
|||
|
|
<Style TargetType="{x:Type TextBlock}">
|
|||
|
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
|||
|
|
</Style>
|
|||
|
|
</materialDesign:MaterialDataGridTextColumn.ElementStyle>
|
|||
|
|
</materialDesign:MaterialDataGridTextColumn>
|
|||
|
|
<materialDesign:MaterialDataGridTextColumn
|
|||
|
|
MinWidth="150"
|
|||
|
|
Binding="{Binding Xr}"
|
|||
|
|
EditingElementStyle="{StaticResource MaterialDesignDataGridTextColumnEditingStyle}"
|
|||
|
|
Header="Xr"
|
|||
|
|
IsReadOnly="True">
|
|||
|
|
<materialDesign:MaterialDataGridTextColumn.HeaderStyle>
|
|||
|
|
<Style BasedOn="{StaticResource MaterialDesignDataGridColumnHeader}" TargetType="{x:Type DataGridColumnHeader}">
|
|||
|
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
|||
|
|
<Setter Property="ContentTemplate">
|
|||
|
|
<Setter.Value>
|
|||
|
|
<DataTemplate>
|
|||
|
|
<TextBlock
|
|||
|
|
TextAlignment="Center"
|
|||
|
|
TextWrapping="Wrap"
|
|||
|
|
ToolTip="总横向偏移量"><Run Text="X" /><Run
|
|||
|
|
BaselineAlignment="Subscript"
|
|||
|
|
FontSize="10"
|
|||
|
|
Text="r" /></TextBlock>
|
|||
|
|
</DataTemplate>
|
|||
|
|
</Setter.Value>
|
|||
|
|
</Setter>
|
|||
|
|
</Style>
|
|||
|
|
</materialDesign:MaterialDataGridTextColumn.HeaderStyle>
|
|||
|
|
<materialDesign:MaterialDataGridTextColumn.ElementStyle>
|
|||
|
|
<Style TargetType="{x:Type TextBlock}">
|
|||
|
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
|||
|
|
</Style>
|
|||
|
|
</materialDesign:MaterialDataGridTextColumn.ElementStyle>
|
|||
|
|
</materialDesign:MaterialDataGridTextColumn>
|
|||
|
|
<materialDesign:MaterialDataGridTextColumn
|
|||
|
|
MinWidth="150"
|
|||
|
|
Binding="{Binding Yr}"
|
|||
|
|
EditingElementStyle="{StaticResource MaterialDesignDataGridTextColumnEditingStyle}"
|
|||
|
|
Header="Yr"
|
|||
|
|
IsReadOnly="True">
|
|||
|
|
<materialDesign:MaterialDataGridTextColumn.HeaderStyle>
|
|||
|
|
<Style BasedOn="{StaticResource MaterialDesignDataGridColumnHeader}" TargetType="{x:Type DataGridColumnHeader}">
|
|||
|
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
|||
|
|
<Setter Property="ContentTemplate">
|
|||
|
|
<Setter.Value>
|
|||
|
|
<DataTemplate>
|
|||
|
|
<TextBlock
|
|||
|
|
TextAlignment="Center"
|
|||
|
|
TextWrapping="Wrap"
|
|||
|
|
ToolTip="总竖向偏移量"><Run Text="Y" /><Run
|
|||
|
|
BaselineAlignment="Subscript"
|
|||
|
|
FontSize="10"
|
|||
|
|
Text="r" /></TextBlock>
|
|||
|
|
</DataTemplate>
|
|||
|
|
</Setter.Value>
|
|||
|
|
</Setter>
|
|||
|
|
</Style>
|
|||
|
|
</materialDesign:MaterialDataGridTextColumn.HeaderStyle>
|
|||
|
|
<materialDesign:MaterialDataGridTextColumn.ElementStyle>
|
|||
|
|
<Style TargetType="{x:Type TextBlock}">
|
|||
|
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
|||
|
|
</Style>
|
|||
|
|
</materialDesign:MaterialDataGridTextColumn.ElementStyle>
|
|||
|
|
</materialDesign:MaterialDataGridTextColumn>
|
|||
|
|
<materialDesign:MaterialDataGridTextColumn
|
|||
|
|
MinWidth="150"
|
|||
|
|
Binding="{Binding ΔXr}"
|
|||
|
|
EditingElementStyle="{StaticResource MaterialDesignDataGridTextColumnEditingStyle}"
|
|||
|
|
Header="ΔXr"
|
|||
|
|
IsReadOnly="True">
|
|||
|
|
<materialDesign:MaterialDataGridTextColumn.HeaderStyle>
|
|||
|
|
<Style BasedOn="{StaticResource MaterialDesignDataGridColumnHeader}" TargetType="{x:Type DataGridColumnHeader}">
|
|||
|
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
|||
|
|
<Setter Property="ContentTemplate">
|
|||
|
|
<Setter.Value>
|
|||
|
|
<DataTemplate>
|
|||
|
|
<TextBlock
|
|||
|
|
TextAlignment="Center"
|
|||
|
|
TextWrapping="Wrap"
|
|||
|
|
ToolTip="总横向偏移量"><Run Text="ΔX" /></TextBlock>
|
|||
|
|
</DataTemplate>
|
|||
|
|
</Setter.Value>
|
|||
|
|
</Setter>
|
|||
|
|
</Style>
|
|||
|
|
</materialDesign:MaterialDataGridTextColumn.HeaderStyle>
|
|||
|
|
<materialDesign:MaterialDataGridTextColumn.ElementStyle>
|
|||
|
|
<Style TargetType="{x:Type TextBlock}">
|
|||
|
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
|||
|
|
</Style>
|
|||
|
|
</materialDesign:MaterialDataGridTextColumn.ElementStyle>
|
|||
|
|
</materialDesign:MaterialDataGridTextColumn>
|
|||
|
|
<materialDesign:MaterialDataGridTextColumn
|
|||
|
|
MinWidth="150"
|
|||
|
|
Binding="{Binding ΔYr}"
|
|||
|
|
EditingElementStyle="{StaticResource MaterialDesignDataGridTextColumnEditingStyle}"
|
|||
|
|
Header="ΔYr"
|
|||
|
|
IsReadOnly="True">
|
|||
|
|
<materialDesign:MaterialDataGridTextColumn.HeaderStyle>
|
|||
|
|
<Style BasedOn="{StaticResource MaterialDesignDataGridColumnHeader}" TargetType="{x:Type DataGridColumnHeader}">
|
|||
|
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
|||
|
|
<Setter Property="ContentTemplate">
|
|||
|
|
<Setter.Value>
|
|||
|
|
<DataTemplate>
|
|||
|
|
<TextBlock
|
|||
|
|
TextAlignment="Center"
|
|||
|
|
TextWrapping="Wrap"
|
|||
|
|
ToolTip="总竖向偏移量"><Run Text="ΔY" /></TextBlock>
|
|||
|
|
</DataTemplate>
|
|||
|
|
</Setter.Value>
|
|||
|
|
</Setter>
|
|||
|
|
</Style>
|
|||
|
|
</materialDesign:MaterialDataGridTextColumn.HeaderStyle>
|
|||
|
|
<materialDesign:MaterialDataGridTextColumn.ElementStyle>
|
|||
|
|
<Style TargetType="{x:Type TextBlock}">
|
|||
|
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
|||
|
|
</Style>
|
|||
|
|
</materialDesign:MaterialDataGridTextColumn.ElementStyle>
|
|||
|
|
</materialDesign:MaterialDataGridTextColumn>
|
|||
|
|
|
|||
|
|
</DataGrid.Columns>
|
|||
|
|
</DataGrid>
|
|||
|
|
</StackPanel>
|
|||
|
|
<Border Margin="0,655,0,0">
|
|||
|
|
<materialDesign:Snackbar
|
|||
|
|
x:Name="ParaSetBar"
|
|||
|
|
HorizontalAlignment="Stretch"
|
|||
|
|
MessageQueue="{materialDesign:MessageQueue}" />
|
|||
|
|
</Border>
|
|||
|
|
</Grid>
|
|||
|
|
</Window>
|