/// <summary> /// newkeyBtn_Click event /// </summary> private void newkeyBtn_Click(object sender, EventArgs e) { KeysManager.NewKey(_upn); _secretkey = KeysManager.EncodedKey(_upn); this.DisplayKey.Text = _secretkey; this.qrCodeGraphic.Text = ManagementAdminService.GetQRCodeValue(_upn, this.DisplayKey.Text); if (!SyncDisabled) { userPropertyPage.SyncSharedUserData(this, true); } }
/// <summary> /// SetUserControlData method implmentation /// </summary> public void SetUserControlData(MMCRegistrationList lst, bool disablesync) { SyncDisabled = disablesync; try { MMCRegistration obj = ((MMCRegistrationList)lst)[0]; _secretkey = KeysManager.EncodedKey(((MMCRegistration)obj).UPN); _upn = ((MMCRegistration)obj).UPN; _email = ((MMCRegistration)obj).MailAddress; if (string.IsNullOrEmpty(_email)) { this.EmailPrompt.Text = "Adresse email : "; _emailnotset = true; } else { this.EmailPrompt.Text = string.Format("Adresse email : {0}", _email); _emailnotset = false; } if (!string.IsNullOrEmpty(_secretkey)) { this.DisplayKey.Text = _secretkey; if (!string.IsNullOrEmpty(_upn)) { this.qrCodeGraphic.Text = ManagementAdminService.GetQRCodeValue(_upn, this.DisplayKey.Text); } else { this.qrCodeGraphic.Text = string.Empty; } } else { userPropertyPage.Dirty = true; } UpdateControlsEnabled(); } finally { SyncDisabled = false; } }