示例#1
0
 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");
 }
示例#2
0
 public NetworkInfo()
 {
     InitializeComponent();
     Machine = new MachineBase();
     updateBehaviour("LOAD");
 }