small code refactoring
This commit is contained in:
@@ -1,38 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Telerik.WinControls.UI;
|
||||
|
||||
namespace Pilz.Updating.Administration.GUI
|
||||
namespace Pilz.Updating.Administration.GUI;
|
||||
|
||||
public partial class ProxyConfigEditor : RadForm
|
||||
{
|
||||
public partial class ProxyConfigEditor : RadForm
|
||||
private readonly ProxyConfiguration config = null;
|
||||
|
||||
public ProxyConfigEditor(ProxyConfiguration config)
|
||||
{
|
||||
private readonly ProxyConfiguration config = null;
|
||||
this.config = config;
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public ProxyConfigEditor(ProxyConfiguration config)
|
||||
{
|
||||
this.config = config;
|
||||
InitializeComponent();
|
||||
}
|
||||
private void UpdateServerInfoEditor_Shown(object sender, EventArgs e)
|
||||
{
|
||||
radToggleSwitch_UserProxy.Value = config.UseProxyAuth;
|
||||
radTextBoxControl_Username.Text = config.Username;
|
||||
radTextBoxControl_Password.Text = config.Password ?? string.Empty;
|
||||
}
|
||||
|
||||
private void UpdateServerInfoEditor_Shown(object sender, EventArgs e)
|
||||
{
|
||||
radToggleSwitch_UserProxy.Value = config.UseProxyAuth;
|
||||
radTextBoxControl_Username.Text = config.Username;
|
||||
radTextBoxControl_Password.Text = config.Password ?? string.Empty;
|
||||
}
|
||||
|
||||
private void ButtonX_OK_Click(object sender, EventArgs e)
|
||||
{
|
||||
config.UseProxyAuth = radToggleSwitch_UserProxy.Value;
|
||||
config.Username = radTextBoxControl_Username.Text.Trim();
|
||||
config.Password = radTextBoxControl_Password.Text;
|
||||
}
|
||||
private void ButtonX_OK_Click(object sender, EventArgs e)
|
||||
{
|
||||
config.UseProxyAuth = radToggleSwitch_UserProxy.Value;
|
||||
config.Username = radTextBoxControl_Username.Text.Trim();
|
||||
config.Password = radTextBoxControl_Password.Text;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user