137 lines
7.7 KiB
XML
137 lines
7.7 KiB
XML
<UserControl x:Class="JiangsuEarthquake.Views.UserControls.FTPConnectSstView"
|
|
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:JiangsuEarthquake.Views.UserControls"
|
|
xmlns:hc="https://handyorg.github.io/handycontrol"
|
|
xmlns:converters="clr-namespace:JiangsuEarthquake.Common"
|
|
mc:Ignorable="d"
|
|
Background="{DynamicResource RegionBrush}"
|
|
FontFamily="{StaticResource DigitalDisplay}"
|
|
Height="300" Width="420">
|
|
<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="3*"/>
|
|
<RowDefinition Height="0.8*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock Text="FTP连接设置" 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,15,2" Command="hc:ControlCommands.Close"/>
|
|
|
|
<Grid Grid.Row="1">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="2*"/>
|
|
<ColumnDefinition Width="0.3*"/>
|
|
<ColumnDefinition Width="3*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<UniformGrid Rows="4" Grid.Column="0">
|
|
<TextBlock Text="IP:" FontSize="17" Foreground="White" HorizontalAlignment="Right"
|
|
VerticalAlignment="Center"/>
|
|
<TextBlock Text="Port:" FontSize="17" Foreground="White" HorizontalAlignment="Right"
|
|
VerticalAlignment="Center"/>
|
|
<TextBlock Text="UserName:" FontSize="17" Foreground="White" HorizontalAlignment="Right"
|
|
VerticalAlignment="Center"/>
|
|
<TextBlock Text="Password:" FontSize="17" Foreground="White" HorizontalAlignment="Right"
|
|
VerticalAlignment="Center"/>
|
|
</UniformGrid>
|
|
|
|
<UniformGrid Rows="4" Grid.Column="2">
|
|
<TextBox Name="FTPIPText" Width="140" FontSize="17" VerticalAlignment="Center"
|
|
HorizontalAlignment="Left" Foreground="White" Background="Transparent"
|
|
HorizontalContentAlignment="Center" BorderThickness="0,0,0,1"
|
|
BorderBrush="#50A0A0A0"
|
|
InputMethod.IsInputMethodEnabled="False" CaretBrush="White">
|
|
<TextBox.Text>
|
|
<Binding NotifyOnValidationError="True" Path="ftpcon.IP"
|
|
UpdateSourceTrigger="PropertyChanged">
|
|
<Binding.ValidationRules>
|
|
<converters:CustomValidationRule ValidateType="IP"/>
|
|
</Binding.ValidationRules>
|
|
</Binding>
|
|
</TextBox.Text>
|
|
</TextBox>
|
|
<TextBox Name="FTPPortText" Width="140" FontSize="17" VerticalAlignment="Center"
|
|
HorizontalAlignment="Left" Foreground="White" Background="Transparent"
|
|
HorizontalContentAlignment="Center" BorderThickness="0,0,0,1"
|
|
BorderBrush="#50A0A0A0"
|
|
InputMethod.IsInputMethodEnabled="False" CaretBrush="White">
|
|
<TextBox.Text>
|
|
<Binding NotifyOnValidationError="True" Path="ftpcon.Port"
|
|
UpdateSourceTrigger="PropertyChanged">
|
|
<Binding.ValidationRules>
|
|
<converters:CustomValidationRule ValidateType="Port"/>
|
|
</Binding.ValidationRules>
|
|
</Binding>
|
|
</TextBox.Text>
|
|
</TextBox>
|
|
<TextBox Name="FTPUserNameText" Width="140" FontSize="17" VerticalAlignment="Center"
|
|
HorizontalAlignment="Left" Foreground="White" Background="Transparent"
|
|
HorizontalContentAlignment="Center" BorderThickness="0,0,0,1"
|
|
BorderBrush="#50A0A0A0"
|
|
InputMethod.IsInputMethodEnabled="False" CaretBrush="White">
|
|
<TextBox.Text>
|
|
<Binding NotifyOnValidationError="True" Path="ftpcon.UserName"
|
|
UpdateSourceTrigger="PropertyChanged">
|
|
<Binding.ValidationRules>
|
|
<converters:CustomValidationRule ValidateType="UserName"/>
|
|
</Binding.ValidationRules>
|
|
</Binding>
|
|
</TextBox.Text>
|
|
</TextBox>
|
|
<TextBox Name="FTPPasswordText" Width="140" FontSize="17" VerticalAlignment="Center"
|
|
HorizontalAlignment="Left" Foreground="White" Background="Transparent"
|
|
HorizontalContentAlignment="Center" BorderThickness="0,0,0,1"
|
|
BorderBrush="#50A0A0A0"
|
|
InputMethod.IsInputMethodEnabled="False" CaretBrush="White">
|
|
<TextBox.Text>
|
|
<Binding NotifyOnValidationError="True" Path="ftpcon.PassWord"
|
|
UpdateSourceTrigger="PropertyChanged">
|
|
<Binding.ValidationRules>
|
|
<converters:CustomValidationRule ValidateType="PassWord"/>
|
|
</Binding.ValidationRules>
|
|
</Binding>
|
|
</TextBox.Text>
|
|
</TextBox>
|
|
</UniformGrid>
|
|
</Grid>
|
|
|
|
<Button Grid.Row="2" Name="FTPConnectSetBtn" Width="140" Height="38" Background="#2614273A" Foreground="White"
|
|
Content="设 置" FontSize="19" HorizontalAlignment="Center" VerticalAlignment="Bottom"
|
|
Command="{Binding FTPConnectSetCommand}" Click="FTPConnectSetBtn_Click"
|
|
Style="{StaticResource ButtonStyle}" Margin="0,0,0,5">
|
|
<Button.Resources>
|
|
<Style TargetType="{x:Type Border}">
|
|
<Setter Property="CornerRadius" Value="8"/>
|
|
</Style>
|
|
</Button.Resources>
|
|
</Button>
|
|
</Grid>
|
|
</UserControl>
|