99 lines
5.9 KiB
XML
99 lines
5.9 KiB
XML
<UserControl x:Class="FujianEarthquake.Views.UserControls.ProSettingView"
|
|
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="ProVoltageTB" 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="ProVoltageTB_PreviewTextInput"
|
|
InputMethod.IsInputMethodEnabled="False" CaretBrush="White"
|
|
Text="{Binding ProVoltage, 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="ProCurrentTB" 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="ProCurrentTB_PreviewTextInput"
|
|
InputMethod.IsInputMethodEnabled="False" CaretBrush="White"
|
|
Text="{Binding ProCurrent, 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="ProSettingBtn" Width="140" Height="38" Background="#2614273A" Foreground="White"
|
|
Content="设 置" FontSize="19" HorizontalAlignment="Center" VerticalAlignment="Bottom"
|
|
Command="{Binding SubProSettingCommand}" Visibility="{Binding ProSettingBtnIsEnabled}"
|
|
Style="{StaticResource ButtonStyle}">
|
|
<Button.Resources>
|
|
<Style TargetType="{x:Type Border}">
|
|
<Setter Property="CornerRadius" Value="8"/>
|
|
</Style>
|
|
</Button.Resources>
|
|
</Button>
|
|
<TextBlock Grid.Row="2" Name="ProSettingMsg" Text="{Binding ProSettingMsg}"
|
|
FontSize="14" Foreground="{Binding ProSettingMsgForeground}"
|
|
HorizontalAlignment="Right" Visibility="{Binding ProSettingMsgVisibility}"
|
|
VerticalAlignment="Bottom"/>
|
|
</Grid>
|
|
|
|
</Grid>
|
|
</UserControl>
|