/// <summary>
        /// BTNSendByMail_Click event
        /// </summary>
        private void BTNSendByMail_Click(object sender, EventArgs e)
        {
            Cursor crs = this.Cursor;

            try
            {
                this.Cursor = Cursors.WaitCursor;
                MMCService.SendKeyByEmail(_email, _upn, this.DisplayKey.Text);
            }
            catch (Exception ex)
            {
                this.Cursor = crs;
                MessageBoxParameters messageBoxParameters = new MessageBoxParameters();
                messageBoxParameters.Text    = ex.Message;
                messageBoxParameters.Buttons = MessageBoxButtons.OK;
                messageBoxParameters.Icon    = MessageBoxIcon.Error;
                userPropertyPage.ParentSheet.ShowDialog(messageBoxParameters);
            }
            finally
            {
                this.Cursor = crs;
                MessageBoxParameters messageBoxParameters = new MessageBoxParameters();
                messageBoxParameters.Text    = string.Format(errors_strings.InfoSendingMailToUser, _email);
                messageBoxParameters.Buttons = MessageBoxButtons.OK;
                messageBoxParameters.Icon    = MessageBoxIcon.Information;
                userPropertyPage.ParentSheet.ShowDialog(messageBoxParameters);
            }
        }
Пример #2
0
        /// <summary>
        /// BTNSendByMail_Click event
        /// </summary>
        private void BTNSendByMail_Click(object sender, EventArgs e)
        {
            Cursor crs = this.Cursor;
            int    cnt = 0;

            try
            {
                this.Cursor = Cursors.WaitCursor;
                RegistrationList lst = userPropertyPage.GetSharedUserData();
                foreach (Registration reg in lst)
                {
                    string secret = MMCService.GetEncodedUserKey(reg.UPN);
                    MMCService.SendKeyByEmail(reg.MailAddress, reg.UPN, secret);
                    cnt++;
                }
            }
            catch (Exception ex)
            {
                this.Cursor = crs;
                MessageBoxParameters messageBoxParameters = new MessageBoxParameters();
                messageBoxParameters.Text    = ex.Message;
                messageBoxParameters.Buttons = MessageBoxButtons.OK;
                messageBoxParameters.Icon    = MessageBoxIcon.Error;
                userPropertyPage.ParentSheet.ShowDialog(messageBoxParameters);
            }
            finally
            {
                this.Cursor = crs;
                MessageBoxParameters messageBoxParameters = new MessageBoxParameters();
                messageBoxParameters.Text    = string.Format(errors_strings.InfosSendingMails, cnt);
                messageBoxParameters.Buttons = MessageBoxButtons.OK;
                messageBoxParameters.Icon    = MessageBoxIcon.Information;
                userPropertyPage.ParentSheet.ShowDialog(messageBoxParameters);
            }
        }
Пример #3
0
        /// <summary>
        /// BTNSendByMail_Click event
        /// </summary>
        private void BTNSendByMail_Click(object sender, EventArgs e)
        {
            Cursor crs = this.Cursor;

            try
            {
                this.Cursor = Cursors.WaitCursor;
                RegistrationList lst = userPropertyPage.GetSharedUserData();
                foreach (Registration reg in lst)
                {
                    string secret = MMCService.GetEncodedUserKey(reg.UPN);
                    MMCService.SendKeyByEmail(reg.MailAddress, reg.UPN, secret);
                }
            }
            finally
            {
                this.Cursor = crs;
            }
        }
 /// <summary>
 /// BTNSendByMail_Click event
 /// </summary>
 private void BTNSendByMail_Click(object sender, EventArgs e)
 {
     MMCService.SendKeyByEmail(_email, _upn, this.DisplayKey.Text);
 }