涨缩完成后将模式与系数写入 %LocalAppData%\DrillTools\scaling.ini,涨缩窗口新增"载入上次系数"按钮实时读取回填。每次完成涨缩覆盖更新,只保留最新一条记录(含源文件名追溯)。ini 使用 UTF-8 无 BOM,损坏时容错返回空。
105 lines
3.9 KiB
XML
105 lines
3.9 KiB
XML
<Window x:Class="DrillTools.DrillScalingWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
Title="钻带二钻涨缩"
|
|
Width="350"
|
|
SizeToContent="Height"
|
|
ResizeMode="NoResize"
|
|
Topmost="True"
|
|
WindowStartupLocation="CenterScreen">
|
|
<Grid Margin="15">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- 模式选择 -->
|
|
<GroupBox Grid.Row="0" Header="输入模式" Margin="0,0,0,10">
|
|
<StackPanel>
|
|
<RadioButton Name="RatioRadioButton"
|
|
Content="倍率模式"
|
|
IsChecked="True"
|
|
Margin="0,5,0,5"
|
|
Checked="ModeRadioButton_Changed" />
|
|
<RadioButton Name="PpmRadioButton"
|
|
Content="PPM 模式"
|
|
Margin="0,0,0,5"
|
|
Checked="ModeRadioButton_Changed" />
|
|
<TextBlock Text="{Binding ModeDescription}"
|
|
Foreground="Gray"
|
|
FontSize="11"
|
|
Margin="20,0,0,5" />
|
|
</StackPanel>
|
|
</GroupBox>
|
|
|
|
<!-- X 方向参数 -->
|
|
<Grid Grid.Row="1" Margin="0,0,0,8">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Grid.Column="0"
|
|
Text="{Binding ModeLabelX}"
|
|
VerticalAlignment="Center"
|
|
Margin="0,0,10,0" />
|
|
<TextBox Grid.Column="1"
|
|
Text="{Binding InputX, UpdateSourceTrigger=PropertyChanged}"
|
|
Padding="4,6"
|
|
FontSize="14"
|
|
MinHeight="34" />
|
|
</Grid>
|
|
|
|
<!-- Y 方向参数 -->
|
|
<Grid Grid.Row="2" Margin="0,0,0,8">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Grid.Column="0"
|
|
Text="{Binding ModeLabelY}"
|
|
VerticalAlignment="Center"
|
|
Margin="0,0,10,0" />
|
|
<TextBox Grid.Column="1"
|
|
Text="{Binding InputY, UpdateSourceTrigger=PropertyChanged}"
|
|
Padding="4,6"
|
|
FontSize="14"
|
|
MinHeight="34" />
|
|
</Grid>
|
|
|
|
<!-- 提示信息 -->
|
|
<TextBlock Grid.Row="3"
|
|
Name="ErrorText"
|
|
Foreground="Red"
|
|
FontSize="11"
|
|
Text=""
|
|
Margin="0,0,0,10"
|
|
Visibility="Collapsed" />
|
|
|
|
<!-- 按钮区域 -->
|
|
<StackPanel Grid.Row="4"
|
|
HorizontalAlignment="Right"
|
|
Orientation="Horizontal">
|
|
<Button Name="LoadLastButton"
|
|
Width="110"
|
|
Height="30"
|
|
Content="载入上次系数"
|
|
Margin="0,0,10,0"
|
|
Click="LoadLastButton_Click" />
|
|
<Button Width="80"
|
|
Height="30"
|
|
Content="取消"
|
|
IsCancel="True"
|
|
Margin="0,0,10,0"
|
|
Click="CancelButton_Click" />
|
|
<Button Width="80"
|
|
Height="30"
|
|
Content="执行"
|
|
IsDefault="True"
|
|
Click="ExecuteButton_Click" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</Window>
|