This commit is contained in:
@@ -5,6 +5,48 @@
|
||||
Width="1024" Height="768"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
FontSize="13">
|
||||
|
||||
<Window.Resources>
|
||||
<!-- 计时按钮样式 -->
|
||||
<Style x:Key="TimerButtonStyle" TargetType="Button">
|
||||
<Setter Property="Width" Value="65"/>
|
||||
<Setter Property="Height" Value="35"/>
|
||||
<Setter Property="FontSize" Value="13"/>
|
||||
<Setter Property="FontWeight" Value="Bold"/>
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="Cursor" Value="Hand"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border x:Name="border"
|
||||
CornerRadius="5"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderThickness="0">
|
||||
<ContentPresenter HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="border" Property="Background" Value="#FF1E3C72"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter TargetName="border" Property="Background" Value="#FF0F1F3A"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<!-- 默认背景(渐变) -->
|
||||
<Setter Property="Background">
|
||||
<Setter.Value>
|
||||
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientStop Color="#FF4A90E2" Offset="0.0"/>
|
||||
<GradientStop Color="#FF357ABD" Offset="1.0"/>
|
||||
</LinearGradientBrush>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</Window.Resources>
|
||||
<Grid Margin="5">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
@@ -43,8 +85,8 @@
|
||||
<WrapPanel Margin="0,3,0,0">
|
||||
<TextBlock Text="备注:" VerticalAlignment="Center"/>
|
||||
<TextBox x:Name="txtRemark" Width="300" Margin="5,0,10,0"/>
|
||||
<Button x:Name="btnClearAll" Content="清空所有" Width="80" Margin="5,0" Click="BtnClearAll_Click"/>
|
||||
<Button x:Name="btnLoadExample" Content="加载示例" Width="80" Margin="5,0" Click="BtnLoadExample_Click"/>
|
||||
<Button x:Name="btnClearAll" Content="清空所有" Style="{StaticResource TimerButtonStyle}" Margin="5,0" Click="BtnClearAll_Click"/>
|
||||
<Button x:Name="btnLoadExample" Content="加载示例" Style="{StaticResource TimerButtonStyle}" Margin="5,0" Click="BtnLoadExample_Click"/>
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
@@ -70,36 +112,43 @@
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- 第一行:4个时间输入框 -->
|
||||
<!-- 第1次 -->
|
||||
<StackPanel Grid.Row="0" Grid.Column="0" Margin="5">
|
||||
<TextBlock Text="第1次" FontWeight="Bold"/>
|
||||
<TextBox x:Name="txtTime1" Width="80" Margin="0,2"/>
|
||||
<WrapPanel HorizontalAlignment="Center" Margin="0,2">
|
||||
<Button x:Name="btnStart1" Content="开始" Width="35" Height="20" FontSize="10" Click="BtnStart1_Click"/>
|
||||
<Button x:Name="btnStop1" Content="结束" Width="35" Height="20" FontSize="10" Click="BtnStop1_Click" Margin="5,0,0,0"/>
|
||||
<WrapPanel HorizontalAlignment="Center" Margin="0,4">
|
||||
<Button x:Name="btnStart1" Content="开始" Style="{StaticResource TimerButtonStyle}" Click="BtnStart1_Click"/>
|
||||
<Button x:Name="btnStop1" Content="结束" Style="{StaticResource TimerButtonStyle}" Click="BtnStop1_Click" Margin="8,0,0,0"/>
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
|
||||
<!-- 第2次 -->
|
||||
<StackPanel Grid.Row="0" Grid.Column="1" Margin="5">
|
||||
<TextBlock Text="第2次" FontWeight="Bold"/>
|
||||
<TextBox x:Name="txtTime2" Width="80" Margin="0,2"/>
|
||||
<WrapPanel HorizontalAlignment="Center" Margin="0,2">
|
||||
<Button x:Name="btnStart2" Content="开始" Width="35" Height="20" FontSize="10" Click="BtnStart2_Click"/>
|
||||
<Button x:Name="btnStop2" Content="结束" Width="35" Height="20" FontSize="10" Click="BtnStop2_Click" Margin="5,0,0,0"/>
|
||||
<WrapPanel HorizontalAlignment="Center" Margin="0,4">
|
||||
<Button x:Name="btnStart2" Content="开始" Style="{StaticResource TimerButtonStyle}" Click="BtnStart2_Click"/>
|
||||
<Button x:Name="btnStop2" Content="结束" Style="{StaticResource TimerButtonStyle}" Click="BtnStop2_Click" Margin="8,0,0,0"/>
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
|
||||
<!-- 第3次 -->
|
||||
<StackPanel Grid.Row="0" Grid.Column="2" Margin="5">
|
||||
<TextBlock Text="第3次" FontWeight="Bold"/>
|
||||
<TextBox x:Name="txtTime3" Width="80" Margin="0,2"/>
|
||||
<WrapPanel HorizontalAlignment="Center" Margin="0,2">
|
||||
<Button x:Name="btnStart3" Content="开始" Width="35" Height="20" FontSize="10" Click="BtnStart3_Click"/>
|
||||
<Button x:Name="btnStop3" Content="结束" Width="35" Height="20" FontSize="10" Click="BtnStop3_Click" Margin="5,0,0,0"/>
|
||||
<WrapPanel HorizontalAlignment="Center" Margin="0,4">
|
||||
<Button x:Name="btnStart3" Content="开始" Style="{StaticResource TimerButtonStyle}" FontSize="11" Click="BtnStart3_Click"/>
|
||||
<Button x:Name="btnStop3" Content="结束" Style="{StaticResource TimerButtonStyle}" Click="BtnStop3_Click" Margin="8,0,0,0"/>
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
|
||||
<!-- 第4次 -->
|
||||
<StackPanel Grid.Row="0" Grid.Column="3" Margin="5">
|
||||
<TextBlock Text="第4次" FontWeight="Bold"/>
|
||||
<TextBox x:Name="txtTime4" Width="80" Margin="0,2"/>
|
||||
<WrapPanel HorizontalAlignment="Center" Margin="0,2">
|
||||
<Button x:Name="btnStart4" Content="开始" Width="35" Height="20" FontSize="10" Click="BtnStart4_Click"/>
|
||||
<Button x:Name="btnStop4" Content="结束" Width="35" Height="20" FontSize="10" Click="BtnStop4_Click" Margin="5,0,0,0"/>
|
||||
<WrapPanel HorizontalAlignment="Center" Margin="0,4">
|
||||
<Button x:Name="btnStart4" Content="开始" Style="{StaticResource TimerButtonStyle}" Click="BtnStart4_Click"/>
|
||||
<Button x:Name="btnStop4" Content="结束" Style="{StaticResource TimerButtonStyle}" Click="BtnStop4_Click" Margin="8,0,0,0"/>
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
|
||||
@@ -116,9 +165,9 @@
|
||||
</GroupBox>
|
||||
|
||||
<WrapPanel Margin="0,10,0,10" HorizontalAlignment="Center">
|
||||
<Button x:Name="btnCalcViscosity" Content="计算运动粘度" Width="150" Height="30" Margin="5" Click="BtnCalcViscosity_Click"/>
|
||||
<Button x:Name="btnAddMeasurement" Content="增加一次测量" Width="120" Margin="5" Click="BtnAddMeasurement_Click"/>
|
||||
<Button x:Name="btnClearTimes" Content="清空时间" Width="100" Margin="5" Click="BtnClearTimes_Click"/>
|
||||
<Button x:Name="btnCalcViscosity" Content="计算运动粘度" Style="{StaticResource TimerButtonStyle}" Width="150" Height="30" Margin="5" Click="BtnCalcViscosity_Click"/>
|
||||
<Button x:Name="btnAddMeasurement" Content="增加一次测量" Style="{StaticResource TimerButtonStyle}" Width="120" Margin="5" Click="BtnAddMeasurement_Click"/>
|
||||
<Button x:Name="btnClearTimes" Style="{StaticResource TimerButtonStyle}" Content="清空时间" Width="100" Margin="5" Click="BtnClearTimes_Click"/>
|
||||
</WrapPanel>
|
||||
|
||||
<!-- 计算结果展示 -->
|
||||
@@ -195,9 +244,9 @@
|
||||
</GroupBox>
|
||||
|
||||
<WrapPanel Margin="0,10" HorizontalAlignment="Center">
|
||||
<Button x:Name="btnGenRecord" Content="生成原始记录 (附录样式)" Width="180" Margin="5" Padding="5" Click="BtnGenRecord_Click"/>
|
||||
<Button x:Name="btnGenReport" Content="生成测试报告" Width="150" Margin="5" Padding="5" Click="BtnGenReport_Click"/>
|
||||
<Button x:Name="btnPrintPreview" Content="打印预览" Width="100" Margin="5" Padding="5" Click="BtnPrintPreview_Click"/>
|
||||
<Button x:Name="btnGenRecord" Style="{StaticResource TimerButtonStyle}" Content="生成原始记录 (附录样式)" Width="180" Margin="5" Padding="5" Click="BtnGenRecord_Click"/>
|
||||
<Button x:Name="btnGenReport" Style="{StaticResource TimerButtonStyle}" Content="生成测试报告" Width="150" Margin="5" Padding="5" Click="BtnGenReport_Click"/>
|
||||
<Button x:Name="btnPrintPreview" Style="{StaticResource TimerButtonStyle}" Content="打印预览" Width="100" Margin="5" Padding="5" Click="BtnPrintPreview_Click"/>
|
||||
</WrapPanel>
|
||||
|
||||
<Border BorderBrush="LightBlue" BorderThickness="1" Height="220" CornerRadius="2" Background="WhiteSmoke">
|
||||
|
||||
Reference in New Issue
Block a user