private void btnCredential_Click(object sender, EventArgs e) { Ensure.ArgumentNotNullOrEmptyString(txtUsername.Text, "Username"); Ensure.ArgumentNotNullOrEmptyString(txtPassword.Text, "Password"); try { Ensure.ArgumentNotNull(Machine, "Machine"); } catch (Exception) { Machine = new MachineBase(); } Machine.Username = txtUsername.Text; Machine.Password = txtPassword.Text; updateBehaviour("SAVECREDENTIAL"); }
public NetworkInfo() { InitializeComponent(); Machine = new MachineBase(); updateBehaviour("LOAD"); }