添加项目文件。
This commit is contained in:
118
ToolDetailWindow.xaml
Normal file
118
ToolDetailWindow.xaml
Normal file
@@ -0,0 +1,118 @@
|
||||
<Window x:Class="DrillTools.ToolDetailWindow"
|
||||
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:local="clr-namespace:DrillTools"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
Title="{Binding WindowTitle}"
|
||||
Width="600"
|
||||
Height="700"
|
||||
ResizeMode="NoResize"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<Window.DataContext>
|
||||
<local:ToolDetailViewModel />
|
||||
</Window.DataContext>
|
||||
|
||||
<Grid Margin="15">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- 基本信息 -->
|
||||
<GroupBox Grid.Row="0" Header="基本信息" Margin="0,0,0,10">
|
||||
<Grid Margin="10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="100" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="刀具编号:" VerticalAlignment="Center" />
|
||||
<TextBox Grid.Row="0" Grid.Column="1" IsReadOnly="True" Text="{Binding Tool.ToolNumber, StringFormat=T{0:D2}, Mode=OneWay}" Margin="5" />
|
||||
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="孔径(mm):" VerticalAlignment="Center" />
|
||||
<TextBox Grid.Row="1" Grid.Column="1" IsReadOnly="True" Text="{Binding Tool.Diameter, StringFormat=F3, Mode=OneWay}" Margin="5" />
|
||||
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" Text="刀具类型:" VerticalAlignment="Center" />
|
||||
<TextBox Grid.Row="2" Grid.Column="1" IsReadOnly="True" Text="{Binding Tool.ToolTypeDisplay, Mode=OneWay}" Margin="5" />
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<!-- 分类信息 -->
|
||||
<GroupBox Grid.Row="1" Header="分类信息" Margin="0,0,0,10">
|
||||
<Grid Margin="10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="100" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="尾号类型:" VerticalAlignment="Center" />
|
||||
<TextBox Grid.Row="0" Grid.Column="1" IsReadOnly="True" Text="{Binding Tool.ToolSuffixTypeDisplay, Mode=OneWay}" Margin="5" />
|
||||
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="刀具大类:" VerticalAlignment="Center" />
|
||||
<TextBox Grid.Row="1" Grid.Column="1" IsReadOnly="True" Text="{Binding Tool.ToolCategoryDisplay, Mode=OneWay}" Margin="5" />
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<!-- 机台码信息 (仅当刀具类型为机台码时显示) -->
|
||||
<GroupBox Grid.Row="2"
|
||||
Header="机台码信息"
|
||||
Margin="0,0,0,10"
|
||||
Visibility="{Binding IsMachineCodeTool, Converter={StaticResource BooleanToVisibilityConverter}}">
|
||||
<Grid Margin="10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="100" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="机台码类型:" VerticalAlignment="Center" />
|
||||
<TextBox Grid.Row="0" Grid.Column="1" IsReadOnly="True" Text="{Binding Tool.MachineCodeType, Mode=OneWay}" Margin="5" />
|
||||
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="机台码命令:" VerticalAlignment="Center" />
|
||||
<TextBox Grid.Row="1" Grid.Column="1" IsReadOnly="True" Text="{Binding Tool.MachineCodeCommand, Mode=OneWay}" Margin="5" />
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<!-- 孔位信息 -->
|
||||
<GroupBox Grid.Row="3" Header="{Binding HoleLocationsHeader}">
|
||||
<TextBox IsReadOnly="True"
|
||||
Text="{Binding FormattedHoleLocations, Mode=OneWay}"
|
||||
FontFamily="{StaticResource CodeFontFamily}"
|
||||
FontSize="{StaticResource CodeFontSize}"
|
||||
VerticalScrollBarVisibility="Auto"
|
||||
HorizontalScrollBarVisibility="Auto"
|
||||
TextWrapping="NoWrap"
|
||||
Margin="5" />
|
||||
</GroupBox>
|
||||
|
||||
<!-- 关闭按钮 -->
|
||||
<StackPanel Grid.Row="4"
|
||||
HorizontalAlignment="Right"
|
||||
Orientation="Horizontal"
|
||||
Margin="0,15,0,0">
|
||||
<Button Width="80"
|
||||
Height="30"
|
||||
Content="关闭"
|
||||
IsCancel="True"
|
||||
Click="CloseButton_Click" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Window>
|
||||
Reference in New Issue
Block a user