private void btnSetupPassword_Click(object sender, EventArgs e) { Forms.AssignPasswordForm apForm = new CallButler.Manager.Forms.AssignPasswordForm(); if (apForm.ShowDialog(this) == DialogResult.OK) { string hashedPassword = ""; if (apForm.Password.Length > 0) { hashedPassword = WOSI.Utilities.CryptoUtils.CreateMD5Hash(apForm.Password); } ManagementInterfaceClient.ManagementInterface.SetManagementPassword(ManagementInterfaceClient.AuthInfo, hashedPassword); ManagementInterfaceClient.AuthInfo.Password = hashedPassword; if (apForm.SavePassword) { Properties.Settings.Default.ManagementPassword = hashedPassword; Properties.Settings.Default.Save(); ManagementInterfaceClient.Connect(ManagementInterfaceClient.CurrentServer, Properties.Settings.Default.TcpManagementPort, hashedPassword); } } }
private void btnSetupPassword_Click(object sender, EventArgs e) { Forms.AssignPasswordForm apForm = new CallButler.Manager.Forms.AssignPasswordForm(); if (apForm.ShowDialog(this) == DialogResult.OK) { string hashedPassword = ""; if(apForm.Password.Length > 0) hashedPassword = WOSI.Utilities.CryptoUtils.CreateMD5Hash(apForm.Password); ManagementInterfaceClient.ManagementInterface.SetManagementPassword(ManagementInterfaceClient.AuthInfo, hashedPassword); ManagementInterfaceClient.AuthInfo.Password = hashedPassword; if (apForm.SavePassword) { Properties.Settings.Default.ManagementPassword = hashedPassword; Properties.Settings.Default.Save(); ManagementInterfaceClient.Connect(ManagementInterfaceClient.CurrentServer, Properties.Settings.Default.TcpManagementPort, hashedPassword); } } }