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

            try
            {
                _secretkey              = string.Empty;
                this.DisplayKey.Text    = string.Empty;
                this.qrCodeGraphic.Text = string.Empty;
                MMCService.RemoveUserKey(_upn);
                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;
            }
        }