mirror of
https://github.com/proxysu/ProxySU.git
synced 2024-11-22 13:16:09 +03:00
修改UI界面
This commit is contained in:
parent
387163367d
commit
209e7ce9bb
@ -33,7 +33,7 @@
|
|||||||
<TextBox x:Name="TextBoxHost" Text="192.168.200.200" Margin="5" Grid.Column="1" Grid.Row="0"></TextBox>
|
<TextBox x:Name="TextBoxHost" Text="192.168.200.200" Margin="5" Grid.Column="1" Grid.Row="0"></TextBox>
|
||||||
<TextBox x:Name="TextBoxPort" CommandManager.PreviewExecuted="TextBoxPort_PreviewExecuted" Text="22" Margin="5" Grid.Column="3" Grid.Row="0" PreviewTextInput="TextBoxPort_PreviewTextInput"/>
|
<TextBox x:Name="TextBoxPort" CommandManager.PreviewExecuted="TextBoxPort_PreviewExecuted" Text="22" Margin="5" Grid.Column="3" Grid.Row="0" PreviewTextInput="TextBoxPort_PreviewTextInput"/>
|
||||||
<TextBlock Text="用户名:" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="5" Grid.Column="0" Grid.Row="1"></TextBlock>
|
<TextBlock Text="用户名:" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="5" Grid.Column="0" Grid.Row="1"></TextBlock>
|
||||||
<TextBlock Text="密码:" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="5" Grid.Column="2" Grid.Row="1"></TextBlock>
|
<TextBlock x:Name="TextBlockPassword" Text="密码:" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="5" Grid.Column="2" Grid.Row="1"></TextBlock>
|
||||||
<TextBox x:Name="TextBoxUserName" Text="root" Margin="5" Grid.Column="1" Grid.Row="1"></TextBox>
|
<TextBox x:Name="TextBoxUserName" Text="root" Margin="5" Grid.Column="1" Grid.Row="1"></TextBox>
|
||||||
<PasswordBox x:Name="PasswordBoxHostPassword" Password="Tianlong71605" Margin="5" Grid.Column="3" Grid.Row="1"></PasswordBox>
|
<PasswordBox x:Name="PasswordBoxHostPassword" Password="Tianlong71605" Margin="5" Grid.Column="3" Grid.Row="1"></PasswordBox>
|
||||||
<RadioButton x:Name="RadioButtonPasswordLogin" GroupName="CertIsYesNo" Content="密码登录" Grid.Column="0" Grid.Row="2" Checked="RadioButtonPasswordLogin_Checked"></RadioButton>
|
<RadioButton x:Name="RadioButtonPasswordLogin" GroupName="CertIsYesNo" Content="密码登录" Grid.Column="0" Grid.Row="2" Checked="RadioButtonPasswordLogin_Checked"></RadioButton>
|
||||||
@ -41,7 +41,7 @@
|
|||||||
<Button x:Name="ButtonOpenFileDialog" Content="浏览..." Margin="8" Grid.Column="2" Grid.Row="2" Click="ButtonOpenFileDialog_Click"></Button>
|
<Button x:Name="ButtonOpenFileDialog" Content="浏览..." Margin="8" Grid.Column="2" Grid.Row="2" Click="ButtonOpenFileDialog_Click"></Button>
|
||||||
<TextBox x:Name="TextBoxCertFilePath" Text="" Margin="10" Grid.Column="3" Grid.Row="2"></TextBox>
|
<TextBox x:Name="TextBoxCertFilePath" Text="" Margin="10" Grid.Column="3" Grid.Row="2"></TextBox>
|
||||||
<!--代理设置-->
|
<!--代理设置-->
|
||||||
<RadioButton x:Name="RadioButtonNoProxy" GroupName="ProxyIsYesNo" Content="NoProxy" Grid.Column="0" Grid.Row="3" Height="30" VerticalAlignment="Top" Checked="RadioButtonNoProxy_Checked" Unchecked="RadioButtonNoProxy_Unchecked"/>
|
<RadioButton x:Name="RadioButtonNoProxy" GroupName="ProxyIsYesNo" Content="无代理" Grid.Column="0" Grid.Row="3" Height="30" VerticalAlignment="Top" Checked="RadioButtonNoProxy_Checked" Unchecked="RadioButtonNoProxy_Unchecked"/>
|
||||||
<RadioButton x:Name="RadioButtonHttp" GroupName="ProxyIsYesNo" Content="Http" Grid.Column="1" Grid.Row="3"/>
|
<RadioButton x:Name="RadioButtonHttp" GroupName="ProxyIsYesNo" Content="Http" Grid.Column="1" Grid.Row="3"/>
|
||||||
<RadioButton x:Name="RadioButtonSocks4" GroupName="ProxyIsYesNo" Content="Socks4" Grid.Column="2" Grid.Row="3" Grid.ColumnSpan="2" Height="30" Margin="0.333,0,226.333,0" VerticalAlignment="Bottom"/>
|
<RadioButton x:Name="RadioButtonSocks4" GroupName="ProxyIsYesNo" Content="Socks4" Grid.Column="2" Grid.Row="3" Grid.ColumnSpan="2" Height="30" Margin="0.333,0,226.333,0" VerticalAlignment="Bottom"/>
|
||||||
<RadioButton x:Name="RadioButtonSocks5" GroupName="ProxyIsYesNo" Content="Socks5" Grid.Column="3" Grid.Row="3"/>
|
<RadioButton x:Name="RadioButtonSocks5" GroupName="ProxyIsYesNo" Content="Socks5" Grid.Column="3" Grid.Row="3"/>
|
||||||
|
@ -217,69 +217,111 @@ namespace ProxySU
|
|||||||
private void RadioButtonNoProxy_Checked(object sender, RoutedEventArgs e)
|
private void RadioButtonNoProxy_Checked(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
TextBlockProxyHost.IsEnabled = false;
|
TextBlockProxyHost.IsEnabled = false;
|
||||||
|
TextBlockProxyHost.Visibility = Visibility.Collapsed;
|
||||||
TextBoxProxyHost.IsEnabled = false;
|
TextBoxProxyHost.IsEnabled = false;
|
||||||
|
TextBoxProxyHost.Visibility = Visibility.Collapsed;
|
||||||
TextBlockProxyPort.IsEnabled = false;
|
TextBlockProxyPort.IsEnabled = false;
|
||||||
|
TextBlockProxyPort.Visibility = Visibility.Collapsed;
|
||||||
TextBoxProxyPort.IsEnabled = false;
|
TextBoxProxyPort.IsEnabled = false;
|
||||||
|
TextBoxProxyPort.Visibility = Visibility.Collapsed;
|
||||||
RadioButtonProxyNoLogin.IsEnabled = false;
|
RadioButtonProxyNoLogin.IsEnabled = false;
|
||||||
|
RadioButtonProxyNoLogin.Visibility = Visibility.Collapsed;
|
||||||
RadiobuttonProxyYesLogin.IsEnabled = false;
|
RadiobuttonProxyYesLogin.IsEnabled = false;
|
||||||
|
RadiobuttonProxyYesLogin.Visibility = Visibility.Collapsed;
|
||||||
TextBlockProxyUser.IsEnabled = false;
|
TextBlockProxyUser.IsEnabled = false;
|
||||||
|
TextBlockProxyUser.Visibility = Visibility.Collapsed;
|
||||||
TextBoxProxyUserName.IsEnabled = false;
|
TextBoxProxyUserName.IsEnabled = false;
|
||||||
|
TextBoxProxyUserName.Visibility = Visibility.Collapsed;
|
||||||
TextBlockProxyPassword.IsEnabled = false;
|
TextBlockProxyPassword.IsEnabled = false;
|
||||||
|
TextBlockProxyPassword.Visibility = Visibility.Collapsed;
|
||||||
PasswordBoxProxyPassword.IsEnabled = false;
|
PasswordBoxProxyPassword.IsEnabled = false;
|
||||||
|
PasswordBoxProxyPassword.Visibility = Visibility.Collapsed;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RadioButtonNoProxy_Unchecked(object sender, RoutedEventArgs e)
|
private void RadioButtonNoProxy_Unchecked(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
TextBlockProxyHost.IsEnabled = true;
|
TextBlockProxyHost.IsEnabled = true;
|
||||||
|
TextBlockProxyHost.Visibility = Visibility.Visible;
|
||||||
TextBoxProxyHost.IsEnabled = true;
|
TextBoxProxyHost.IsEnabled = true;
|
||||||
|
TextBoxProxyHost.Visibility = Visibility.Visible;
|
||||||
TextBlockProxyPort.IsEnabled = true;
|
TextBlockProxyPort.IsEnabled = true;
|
||||||
|
TextBlockProxyPort.Visibility = Visibility.Visible;
|
||||||
TextBoxProxyPort.IsEnabled = true;
|
TextBoxProxyPort.IsEnabled = true;
|
||||||
|
TextBoxProxyPort.Visibility = Visibility.Visible;
|
||||||
RadioButtonProxyNoLogin.IsEnabled = true;
|
RadioButtonProxyNoLogin.IsEnabled = true;
|
||||||
|
RadioButtonProxyNoLogin.Visibility = Visibility.Visible;
|
||||||
RadiobuttonProxyYesLogin.IsEnabled = true;
|
RadiobuttonProxyYesLogin.IsEnabled = true;
|
||||||
|
RadiobuttonProxyYesLogin.Visibility = Visibility.Visible;
|
||||||
if (RadioButtonProxyNoLogin.IsChecked == true)
|
if (RadioButtonProxyNoLogin.IsChecked == true)
|
||||||
{
|
{
|
||||||
TextBlockProxyUser.IsEnabled = false;
|
TextBlockProxyUser.IsEnabled = false;
|
||||||
|
TextBlockProxyUser.Visibility = Visibility.Collapsed;
|
||||||
TextBlockProxyPassword.IsEnabled = false;
|
TextBlockProxyPassword.IsEnabled = false;
|
||||||
|
TextBlockProxyPassword.Visibility = Visibility.Collapsed;
|
||||||
TextBoxProxyUserName.IsEnabled = false;
|
TextBoxProxyUserName.IsEnabled = false;
|
||||||
|
TextBoxProxyUserName.Visibility = Visibility.Collapsed;
|
||||||
PasswordBoxProxyPassword.IsEnabled = false;
|
PasswordBoxProxyPassword.IsEnabled = false;
|
||||||
|
PasswordBoxProxyPassword.Visibility = Visibility.Collapsed;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TextBlockProxyUser.IsEnabled = true;
|
TextBlockProxyUser.IsEnabled = true;
|
||||||
|
TextBlockProxyUser.Visibility = Visibility.Visible;
|
||||||
TextBoxProxyUserName.IsEnabled = true;
|
TextBoxProxyUserName.IsEnabled = true;
|
||||||
|
TextBoxProxyUserName.Visibility = Visibility.Visible;
|
||||||
TextBlockProxyPassword.IsEnabled = true;
|
TextBlockProxyPassword.IsEnabled = true;
|
||||||
|
TextBlockProxyPassword.Visibility = Visibility.Visible;
|
||||||
PasswordBoxProxyPassword.IsEnabled = true;
|
PasswordBoxProxyPassword.IsEnabled = true;
|
||||||
|
PasswordBoxProxyPassword.Visibility = Visibility.Visible;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RadioButtonPasswordLogin_Checked(object sender, RoutedEventArgs e)
|
private void RadioButtonPasswordLogin_Checked(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
ButtonOpenFileDialog.IsEnabled = false;
|
ButtonOpenFileDialog.IsEnabled = false;
|
||||||
|
ButtonOpenFileDialog.Visibility = Visibility.Collapsed;
|
||||||
TextBoxCertFilePath.IsEnabled = false;
|
TextBoxCertFilePath.IsEnabled = false;
|
||||||
|
TextBoxCertFilePath.Visibility = Visibility.Collapsed;
|
||||||
|
TextBlockPassword.Text = "密码:";
|
||||||
|
//TextBlockPassword.Visibility = Visibility.Visible;
|
||||||
PasswordBoxHostPassword.IsEnabled = true;
|
PasswordBoxHostPassword.IsEnabled = true;
|
||||||
|
PasswordBoxHostPassword.Visibility = Visibility.Visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RadioButtonCertLogin_Checked(object sender, RoutedEventArgs e)
|
private void RadioButtonCertLogin_Checked(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
TextBlockPassword.Text = "密钥:";
|
||||||
|
//TextBlockPassword.Visibility = Visibility.Collapsed;
|
||||||
PasswordBoxHostPassword.IsEnabled = false;
|
PasswordBoxHostPassword.IsEnabled = false;
|
||||||
|
PasswordBoxHostPassword.Visibility = Visibility.Collapsed;
|
||||||
ButtonOpenFileDialog.IsEnabled = true;
|
ButtonOpenFileDialog.IsEnabled = true;
|
||||||
|
ButtonOpenFileDialog.Visibility = Visibility.Visible;
|
||||||
TextBoxCertFilePath.IsEnabled = true;
|
TextBoxCertFilePath.IsEnabled = true;
|
||||||
|
TextBoxCertFilePath.Visibility = Visibility.Visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RadioButtonProxyNoLogin_Checked(object sender, RoutedEventArgs e)
|
private void RadioButtonProxyNoLogin_Checked(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
TextBlockProxyUser.IsEnabled = false;
|
TextBlockProxyUser.IsEnabled = false;
|
||||||
|
TextBlockProxyUser.Visibility = Visibility.Collapsed;
|
||||||
TextBlockProxyPassword.IsEnabled = false;
|
TextBlockProxyPassword.IsEnabled = false;
|
||||||
|
TextBlockProxyPassword.Visibility = Visibility.Collapsed;
|
||||||
TextBoxProxyUserName.IsEnabled = false;
|
TextBoxProxyUserName.IsEnabled = false;
|
||||||
|
TextBoxProxyUserName.Visibility = Visibility.Collapsed;
|
||||||
PasswordBoxProxyPassword.IsEnabled = false;
|
PasswordBoxProxyPassword.IsEnabled = false;
|
||||||
|
PasswordBoxProxyPassword.Visibility = Visibility.Collapsed;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RadiobuttonProxyYesLogin_Checked(object sender, RoutedEventArgs e)
|
private void RadiobuttonProxyYesLogin_Checked(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
TextBlockProxyUser.IsEnabled = true;
|
TextBlockProxyUser.IsEnabled = true;
|
||||||
|
TextBlockProxyUser.Visibility = Visibility.Visible;
|
||||||
TextBlockProxyPassword.IsEnabled = true;
|
TextBlockProxyPassword.IsEnabled = true;
|
||||||
|
TextBlockProxyPassword.Visibility = Visibility.Visible;
|
||||||
TextBoxProxyUserName.IsEnabled = true;
|
TextBoxProxyUserName.IsEnabled = true;
|
||||||
|
TextBoxProxyUserName.Visibility = Visibility.Visible;
|
||||||
PasswordBoxProxyPassword.IsEnabled = true;
|
PasswordBoxProxyPassword.IsEnabled = true;
|
||||||
|
PasswordBoxProxyPassword.Visibility = Visibility.Visible;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user