コード例 #1
0
        /// <summary>
        /// newkeyBtn_Click event
        /// </summary>
        private void newkeyBtn_Click(object sender, EventArgs e)
        {
            Cursor crs = this.Cursor;

            try
            {
                MMCService.NewUserKey(_upn);
                _secretkey              = MMCService.GetEncodedUserKey(_upn);
                this.DisplayKey.Text    = _secretkey;
                this.qrCodeGraphic.Text = MMCService.GetQRCodeValue(_upn, this.DisplayKey.Text);
                if (!SyncDisabled)
                {
                    userPropertyPage.SyncSharedUserData(this, true);
                }
            }
            catch (Exception ex)
            {
                this.Cursor = crs;
                MessageBoxParameters messageBoxParameters = new MessageBoxParameters
                {
                    Text    = ex.Message,
                    Buttons = MessageBoxButtons.OK,
                    Icon    = MessageBoxIcon.Error
                };
                userPropertyPage.ParentSheet.ShowDialog(messageBoxParameters);
            }
            finally
            {
                this.Cursor = crs;
            }
        }
コード例 #2
0
 /// <summary>
 /// newkeyBtn_Click event
 /// </summary>
 private void newkeyBtn_Click(object sender, EventArgs e)
 {
     MMCService.NewUserKey(_upn);
     _secretkey              = MMCService.GetEncodedUserKey(_upn);
     this.DisplayKey.Text    = _secretkey;
     this.qrCodeGraphic.Text = MMCService.GetQRCodeValue(_upn, this.DisplayKey.Text);
     if (!SyncDisabled)
     {
         userPropertyPage.SyncSharedUserData(this, true);
     }
 }
        /// <summary>
        /// BTNReinit_Click event
        /// </summary>
        private void BTNReinit_Click(object sender, EventArgs e)
        {
            MFAUserList lst = userPropertyPage.GetSharedUserData();

            foreach (MFAUser reg in lst)
            {
                MMCService.NewUserKey(reg.UPN);
            }
            if (!SyncDisabled)
            {
                userPropertyPage.SyncSharedUserData(this, true);
            }
        }