94 lines
5.5 KiB
Plaintext
94 lines
5.5 KiB
Plaintext
|
|
<UserControl x:Class="FujianEarthquake.Views.UserControls.ParaSettingView"
|
||
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||
|
|
xmlns:local="clr-namespace:FujianEarthquake.Views.UserControls"
|
||
|
|
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||
|
|
mc:Ignorable="d"
|
||
|
|
Background="{DynamicResource RegionBrush}"
|
||
|
|
FontFamily="{StaticResource DigitalDisplay}"
|
||
|
|
Height="240" Width="380">
|
||
|
|
<UserControl.Resources>
|
||
|
|
<Style TargetType="TextBox">
|
||
|
|
<Setter Property="Template">
|
||
|
|
<Setter.Value>
|
||
|
|
<ControlTemplate TargetType="TextBox" >
|
||
|
|
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}"
|
||
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||
|
|
Background="{TemplateBinding Background}" CornerRadius="0"
|
||
|
|
SnapsToDevicePixels="True">
|
||
|
|
<ScrollViewer x:Name="PART_ContentHost" Focusable="False"
|
||
|
|
HorizontalScrollBarVisibility="Hidden"
|
||
|
|
VerticalScrollBarVisibility="Hidden"/>
|
||
|
|
</Border>
|
||
|
|
</ControlTemplate>
|
||
|
|
</Setter.Value>
|
||
|
|
</Setter>
|
||
|
|
</Style>
|
||
|
|
</UserControl.Resources>
|
||
|
|
|
||
|
|
<Grid>
|
||
|
|
<Grid.RowDefinitions>
|
||
|
|
<RowDefinition Height="1*"/>
|
||
|
|
<RowDefinition Height="4*"/>
|
||
|
|
</Grid.RowDefinitions>
|
||
|
|
|
||
|
|
<TextBlock Text="参 数 设 置" FontSize="20" Foreground="White" Background="Transparent"
|
||
|
|
HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||
|
|
<hc:Divider VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0,0,0,4"
|
||
|
|
Width="400"/>
|
||
|
|
<Button Width="22" Height="22" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource PrimaryBrush}"
|
||
|
|
hc:IconElement.Geometry="{StaticResource ErrorGeometry}" Padding="0" HorizontalAlignment="Right"
|
||
|
|
VerticalAlignment="Center" Margin="0,0,10,2" Command="hc:ControlCommands.Close"/>
|
||
|
|
|
||
|
|
<Grid Grid.Row="1">
|
||
|
|
<Grid.RowDefinitions>
|
||
|
|
<RowDefinition/>
|
||
|
|
<RowDefinition/>
|
||
|
|
<RowDefinition/>
|
||
|
|
<RowDefinition Height="0.3*"/>
|
||
|
|
</Grid.RowDefinitions>
|
||
|
|
|
||
|
|
<StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Center"
|
||
|
|
VerticalAlignment="Bottom">
|
||
|
|
<TextBlock Text="电压设置值:" FontSize="17" Foreground="White" Background="Transparent"
|
||
|
|
HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||
|
|
<TextBox Name="SetVoltageTB" Width="140" FontSize="17" VerticalAlignment="Center"
|
||
|
|
HorizontalAlignment="Center" Foreground="White" Background="Transparent"
|
||
|
|
Margin="10,0,0,0" HorizontalContentAlignment="Center" BorderThickness="0,0,0,1"
|
||
|
|
BorderBrush="#50A0A0A0" PreviewTextInput="SetVoltageTB_PreviewTextInput"
|
||
|
|
InputMethod.IsInputMethodEnabled="False" CaretBrush="White"
|
||
|
|
Text="{Binding SetVoltage, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
|
||
|
|
<TextBlock Background="Transparent" Foreground="White" HorizontalAlignment="Right"
|
||
|
|
VerticalAlignment="Center" Text=" V" FontSize="13" Margin="10,0,0,0"/>
|
||
|
|
</StackPanel>
|
||
|
|
|
||
|
|
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center"
|
||
|
|
VerticalAlignment="Bottom">
|
||
|
|
<TextBlock Text="电流设置值:" FontSize="17" Foreground="White" Background="Transparent"
|
||
|
|
HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||
|
|
<TextBox Name="SetCurrentTB" Width="140" FontSize="17" VerticalAlignment="Center"
|
||
|
|
HorizontalAlignment="Center" Foreground="White" Background="Transparent"
|
||
|
|
Margin="10,0,0,0" HorizontalContentAlignment="Center" BorderThickness="0,0,0,1"
|
||
|
|
BorderBrush="#50A0A0A0" PreviewTextInput="SetCurrentTB_PreviewTextInput"
|
||
|
|
InputMethod.IsInputMethodEnabled="False" CaretBrush="White"
|
||
|
|
Text="{Binding SetCurrent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
|
||
|
|
<TextBlock Background="Transparent" Foreground="White" HorizontalAlignment="Right"
|
||
|
|
VerticalAlignment="Center" Text=" A" FontSize="13" Margin="10,0,0,0"/>
|
||
|
|
</StackPanel>
|
||
|
|
|
||
|
|
<Button Grid.Row="2" Name="ParaSettingBtn" Width="140" Height="38" Background="#2614273A" Foreground="White"
|
||
|
|
Content="设 置" FontSize="19" HorizontalAlignment="Center" VerticalAlignment="Bottom"
|
||
|
|
Command="{Binding SubParaSettingCommand}"
|
||
|
|
Style="{StaticResource ButtonStyle}">
|
||
|
|
<Button.Resources>
|
||
|
|
<Style TargetType="{x:Type Border}">
|
||
|
|
<Setter Property="CornerRadius" Value="8"/>
|
||
|
|
</Style>
|
||
|
|
</Button.Resources>
|
||
|
|
</Button>
|
||
|
|
</Grid>
|
||
|
|
</Grid>
|
||
|
|
</UserControl>
|