small code refactoring

This commit is contained in:
Schedel Pascal
2024-06-19 08:10:16 +02:00
parent 20770bed31
commit c9216ac79b
93 changed files with 2753 additions and 5835 deletions

View File

@@ -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;
}
}