예제 #1
0
        private void Click_Compare(object sender, EventArgs e)
        {
            this.BtnCompare.Enabled      = false;
            this.BtnUploadFile_1.Enabled = false;
            this.BtnUploadFile_2.Enabled = false;
            MyMessageBox    messa             = Util.ShowMessage(AlarmType.LOADING, "Iniciando Proceso...\n");
            List <Column>   headers_1         = (List <Column>)Combo_1.DataSource;
            List <Column>   headers_2         = (List <Column>)Combo_3.DataSource;
            Column          col_1             = (Column)Combo_1.SelectedItem;
            Column          col_2             = (Column)Combo_2.SelectedItem;
            Column          col_3             = (Column)Combo_3.SelectedItem;
            Column          col_4             = (Column)Combo_4.SelectedItem;
            List <Material> materials_excel_1 = ExcelUtil.CompareExcelInformation(path_1, messa.MyRichTextBox, headers_1, col_1.Name, col_2.Name);

            messa.BringToFront();
            List <Material> materials_excel_2 = ExcelUtil.CompareExcelInformation(path_2, messa.MyRichTextBox, headers_2, col_3.Name, col_4.Name);
            List <Dictionary <List <Material>, Material> > differentList = Util.CompareList(materials_excel_1, materials_excel_2);
            ComparationView comparationView = new ComparationView(differentList, materials_excel_1, materials_excel_2, path_1, path_2);

            comparationView.Show();
            messa.Close();
            CleanForm();
        }
예제 #2
0
        /// <summary>
        /// Method that performs migration..
        /// </summary>
        public bool MigrateFolder()
        {
            /*
             * Check if the destination folder can be an iFolder
             * Copy the folder if needed
             * If yes create the iFolder, else stay at the same page
             * if the folder is to be removed from 2.x domain remove.
             */
            DomainItem domain = this.MigrationIdentityPage.domain;
            bool       shared = this.MigrationIdentityPage.SSL;
            string     encryptionAlgorithm = this.MigrationIdentityPage.Encrypion? "BlowFish" : "";
            string     destination;

            // Migration Option is true if the folder is to be removed from 2.x domain
            try
            {
                if (this.MigrationServerPage.MigrationOption == false)
                {
                    destination = this.MigrationServerPage.HomeLocation;
                    DirectoryInfo dir = new DirectoryInfo(destination);
                    if (dir.Exists == false)
                    {
                        this.verifyPage.CloseWaitDialog();
                        MessageBox.Show(Resource.GetString("ErrDirCreate"));
                        return(false);
                    }

                    // Create the ifolder directory
                    if (this.MigrationServerPage.CopyParentDirectory)
                    {
                        DirectoryInfo di = new DirectoryInfo(this.location);
                        destination = destination + "\\" + di.Name;
                        di          = new DirectoryInfo(destination);
                        if (di.Exists)
                        {
                            this.verifyPage.CloseWaitDialog();
                            MessageBox.Show(Resource.GetString("DirExists") /*"The directory exists already"*/, Resource.GetString("MigrationTitle"), MessageBoxButtons.OK);
                            return(false);
                        }
                        else
                        {
                            try
                            {
                                di.Create();
                            }
                            catch (Exception ex)
                            {
                                this.verifyPage.CloseWaitDialog();
                                MessageBox.Show(ex.ToString(), Resource.GetString("ErrDirCreate"), MessageBoxButtons.OK);
                                return(false);
                            }
                        }
                    }
                    //Check that the final path is already 3.6 ifolder, we don't do a 2.x check here
                    if (ifws.CanBeiFolder(destination) == false)
                    {
                        this.verifyPage.CloseWaitDialog();
                        MessageBox.Show(Resource.GetString("CannotBeiFolder") /*"The folder can not be converted into ifolder"*/, Resource.GetString("MigrationTitle") /*"Error creating iFolder"*/, MessageBoxButtons.OK);
                        return(false);                        // can't be an iFolder
                    }

                    // Copy the contents
                    if (!CopyDirectory(new DirectoryInfo(location), new DirectoryInfo(destination)))
                    {
                        this.verifyPage.CloseWaitDialog();
                        MessageBox.Show(Resource.GetString("CannotCopy") /*"Unable to copy the folder"*/, Resource.GetString("MigrationTitle") /*"Error copying the folder"*/, MessageBoxButtons.OK);
                        return(false);                          // unable to copy..
                    }
                }
                else
                {
                    destination = this.location;
                    if (ifws.CanBeiFolder(destination) == false)                        // Display a message box
                    {
                        this.verifyPage.CloseWaitDialog();
                        MessageBox.Show(Resource.GetString("CannotBeiFolder") /*"The folder can not be converted into ifolder"*/, Resource.GetString("MigrationTitle") /*"Error creating iFolder"*/, MessageBoxButtons.OK);
                        return(false);                        // can't be an iFolder
                    }
                }

                if (shared)
                {
                    if (ifws.CreateiFolderInDomain(destination, domain.ID) == null)
                    {
                        this.verifyPage.CloseWaitDialog();
                        MessageBox.Show(Resource.GetString("MigrationConvert") /*Unable to convert to an iFolder*/, Resource.GetString("MigrationTitle") /*"Error creating iFolder"*/, MessageBoxButtons.OK);
                        return(false);
                    }
                }
                else
                {
                    string passphrase = this.simiasWebService.GetPassPhrase(this.identityPage.domain.ID);
                    if (ifws.CreateiFolderInDomainEncr(destination, domain.ID, false, encryptionAlgorithm, passphrase) == null)
                    {
                        this.verifyPage.CloseWaitDialog();
                        MessageBox.Show(Resource.GetString("MigrationConvert") /*Unable to convert to an iFolder*/, Resource.GetString("MigrationTitle") /*"Error creating iFolder"*/, MessageBoxButtons.OK);
                        return(false);
                    }
                }
            }
            catch (Exception)
            {
                this.verifyPage.CloseWaitDialog();
                MessageBox.Show(Resource.GetString("CannotBeiFolder") /*"The folder can not be converted into ifolder"*/, Resource.GetString("MigrationTitle") /*"Error creating iFolder"*/, MessageBoxButtons.OK);
                return(false);
            }

            if (this.MigrationServerPage.MigrationOption == true)
            {
                //remove the 2.x registry entry for the migarted (not copy) ifolder
                string      iFolderRegistryKey = @"Software\Novell iFolder";
                RegistryKey iFolderKey         = Registry.LocalMachine.OpenSubKey(iFolderRegistryKey, true);
                try
                {
                    iFolderKey.DeleteSubKeyTree(UserName);
                }
                catch (Exception ex)
                {
                    this.verifyPage.CloseWaitDialog();
                    Novell.iFolderCom.MyMessageBox mmb = new MyMessageBox(ex.Message, Resource.GetString("MigrationTitle"), "", MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
                    mmb.ShowDialog();
                    mmb.Close();
                }
            }
            return(true);
        }
예제 #3
0
        /// <summary>
        /// Event Handler for next click event
        /// </summary>
        private void next_Click(object sender, System.EventArgs e)
        {
            // Check if we're on the last page.
            if (currentIndex == (maxPages - 1))
            {
                // Exit
                return;
            }

            System.Resources.ResourceManager resManager = new System.Resources.ResourceManager(typeof(Connecting));

            if (currentIndex == 3)             // Set Passphrase
            {
                if (this.passphrasePage.Passphrase != this.passphrasePage.RetypePassphrase)
                {
                    MessageBox.Show(Resource.GetString("TypeRetypeMisMatch"));
                }
                else
                {
                    string publicKey = "";
                    string ragent    = null;
                    if (this.passphrasePage.RecoveryAgent != null && this.passphrasePage.RecoveryAgent != "None")
                    {
                        // Show the certificate.....
                        byte[] CertificateObj = this.simws.GetRACertificateOnClient(this.identityPage.domain.ID, this.passphrasePage.RecoveryAgent);
                        System.Security.Cryptography.X509Certificates.X509Certificate cert = new System.Security.Cryptography.X509Certificates.X509Certificate(CertificateObj);
                        //	MyMessageBox mmb = new MyMessageBox( "Verify Certificate", "Verify Certificate", cert.ToString(true), MyMessageBoxButtons.YesNo, MyMessageBoxIcon.Question, MyMessageBoxDefaultButton.Button2 );
                        MyMessageBox mmb = new MyMessageBox(string.Format(resManager.GetString("verifyCert"), this.passphrasePage.RecoveryAgent), resManager.GetString("verifyCertTitle"), cert.ToString(true), MyMessageBoxButtons.YesNo, MyMessageBoxIcon.Question, MyMessageBoxDefaultButton.Button2);
                        DialogResult messageDialogResult = mmb.ShowDialog();
                        mmb.Dispose();
                        mmb.Close();
                        if (messageDialogResult != DialogResult.OK)
                        {
                            return;
                        }
                        else
                        {
                            ragent    = this.passphrasePage.RecoveryAgent;
                            publicKey = Convert.ToBase64String(cert.GetPublicKey());
                        }
                    }
                    Status passPhraseStatus = null;
                    try
                    {
                        passPhraseStatus = this.simiasWebService.SetPassPhrase(this.identityPage.domain.ID, this.passphrasePage.Passphrase, null, publicKey);
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(Resource.GetString("IsPassphraseSetException") + ex.Message);
                        return;
                    }
                    if (passPhraseStatus.statusCode == StatusCodes.Success)
                    {
                        this.simiasWebService.StorePassPhrase(this.identityPage.domain.ID, this.passphrasePage.Passphrase, CredentialType.Basic, this.passphrasePage.RememberPassphrase);
                        Novell.iFolderCom.MyMessageBox mmb = new MyMessageBox(Resource.GetString("SetPassphraseSuccess") /*"Successfully set the passphrase"*/, "", "", MyMessageBoxButtons.OK, MyMessageBoxIcon.Information);
                        mmb.ShowDialog();
                        mmb.Dispose();
                        this.Dispose();
                        this.Close();
                    }
                    else
                    {
                        // Unable to set the passphrase
                        Novell.iFolderCom.MyMessageBox mmb = new MyMessageBox(Resource.GetString("IsPassphraseSetException") /*"Unable to set the passphrase"*/, "" /*"Error setting the passphrase"*/, "" /*Resource.GetString("TryAgain")*//*"Please try again"*/, MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
                        mmb.ShowDialog();
                        mmb.Dispose();
                        return;
                    }
                }
            }
            else if (currentIndex == 4)           // Validate passphrase
            {
                Status passPhraseStatus = null;
                try
                {
                    passPhraseStatus = this.simiasWebService.ValidatePassPhrase(this.identityPage.domain.ID, this.passphraseVerifyPage.Passphrase);
                }
                catch (Exception ex)
                {
                    MessageBox.Show(resManager.GetString("ValidatePPError") /*"Unable to validate the Passphrase. {0}"*/, ex.Message);
                    return;
                }
                if (passPhraseStatus != null)
                {
                    if (passPhraseStatus.statusCode == StatusCodes.PassPhraseInvalid)                      // check for invalid passphrase
                    {
                        Novell.iFolderCom.MyMessageBox mmb = new MyMessageBox(Resource.GetString("InvalidPPText") /*"Invalid the passphrase"*/, Resource.GetString("VerifyPP") /*"Passphrase Invalid"*/, "" /*Resource.GetString("TryAgain")*//*"Please try again"*/, MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
                        mmb.ShowDialog();
                        mmb.Dispose();
                        return;
                    }
                    else if (passPhraseStatus.statusCode == StatusCodes.Success)
                    {
                        try
                        {
                            this.simiasWebService.StorePassPhrase(this.identityPage.domain.ID, this.passphraseVerifyPage.Passphrase, CredentialType.Basic, this.passphraseVerifyPage.RememberPassphrase);
                        }
                        catch (Exception)
                        {
                            MessageBox.Show("Unable to store Passphrase");
                            return;
                        }
                    }
                }
            }

            int nextIndex = this.pages[currentIndex].ValidatePage(currentIndex);

            if (nextIndex == 4)
            {
                // Set the passphrase
                nextIndex = 5;
            }
            else if (nextIndex == 3)
            {
                if (this.identityPage.Encrypion == false)
                {
                    // if 2.x is encrypted make a prompt
                    if (this.encryptedOriginal == true)
                    {
                        MyMessageBox mmb1 = new MyMessageBox(Resource.GetString("EncryptTotext"), Resource.GetString("MigrationAlert"), "", MyMessageBoxButtons.YesNo, MyMessageBoxIcon.Warning, MyMessageBoxDefaultButton.Button1);
                        DialogResult res  = mmb1.ShowDialog();
                        if (res == DialogResult.No)
                        {
                            nextIndex = currentIndex;
                        }
                        else
                        {
                            nextIndex = 5;
                        }
                    }
                    else
                    {
                        nextIndex = 5;
                    }
                }
                else                 // encryption selected..
                {
                    try
                    {
                        string passphrasecheck = this.simiasWebService.GetPassPhrase(this.identityPage.domain.ID);
                        if (passphrasecheck != null && passphrasecheck != "")
                        {
                            Status status = this.simiasWebService.ValidatePassPhrase(this.identityPage.domain.ID, passphrasecheck);
                            if (status != null && status.statusCode == StatusCodes.Success)
                            {
                                // Passphrase validated.
                                nextIndex = 5;
                            }
                        }
                        else if (this.simiasWebService.IsPassPhraseSet(this.identityPage.domain.ID) == true)
                        {
                            //MessageBox.Show("passphrase set");
                            nextIndex = 4;
                        }
                    }
                    catch (Exception)
                    {
                        MessageBox.Show("Unable to get passphrase. \nLogin to the domain and try again.");
                        // Stay in the same page
                        nextIndex = currentIndex;
                    }
                }
            }

            if (nextIndex != currentIndex)
            {
                this.pages[currentIndex].DeactivatePage();
                this.pages[nextIndex].ActivatePage(currentIndex);
                if (nextIndex == 5)
                {
                    this.pages[nextIndex].PreviousIndex = 2;
                }

                currentIndex = nextIndex;

                if (currentIndex == (maxPages - 2))
                {
                    next.Text = Resource.GetString("MigrateText");
                    this.verifyPage.UpdateDetails();
                }
                else if (currentIndex == (maxPages - 1))
                {
                    // We're on the completion page ... change the Next
                    // button to a Finish button.
                    next.DialogResult = DialogResult.OK;
                    next.Text         = Resource.GetString("FinishText");            //"&Finish";
                }
            }
        }
예제 #4
0
        /// <summary>
        /// Event handler for OK button click event
        /// </summary>
        private void btnOk_Click(object sender, System.EventArgs e)
        {
            // Check for passphrase

            /*	If passphrase is valid try setting the passphrase.
             *	if successful try storing on local place
             *	if success close dialog.
             *	else show dialog again..
             *
             */
            System.Resources.ResourceManager resManager = new System.Resources.ResourceManager(typeof(Connecting));
            if (this.Passphrase.Text == this.RetypePassphrase.Text)
            {
                string publicKey = null;
                string ragent    = null;
                if (this.RecoveryAgentCombo.SelectedItem != null && (string)this.RecoveryAgentCombo.SelectedItem != TrayApp.Properties.Resources.serverDefaultRA)
                {
                    // Show the certificate.....
                    byte[] CertificateObj = this.simws.GetRACertificateOnClient(this.DomainID, (string)this.RecoveryAgentCombo.SelectedItem);
                    System.Security.Cryptography.X509Certificates.X509Certificate cert = new System.Security.Cryptography.X509Certificates.X509Certificate(CertificateObj);
                    //	MyMessageBox mmb = new MyMessageBox( "Verify Certificate", "Verify Certificate", cert.ToString(true), MyMessageBoxButtons.YesNo, MyMessageBoxIcon.Question, MyMessageBoxDefaultButton.Button2 );
                    MyMessageBox mmb = new MyMessageBox(string.Format(resManager.GetString("verifyCert"), (string)this.RecoveryAgentCombo.SelectedItem), resManager.GetString("verifyCertTitle"), cert.ToString(true), MyMessageBoxButtons.YesNo, MyMessageBoxIcon.Question, MyMessageBoxDefaultButton.Button2);
                    DialogResult messageDialogResult = mmb.ShowDialog();
                    mmb.Dispose();
                    mmb.Close();
                    if (messageDialogResult != DialogResult.Yes)
                    {
                        return;
                    }
                    else
                    {
                        ragent    = (string)this.RecoveryAgentCombo.SelectedItem;
                        publicKey = Convert.ToBase64String(cert.GetPublicKey());
                    }
                    //return;
                }

                /*else	// If recovery agent is not selected...
                 * {
                 *      MyMessageBox mmb = new MyMessageBox( resManager.GetString("NoCertWarning"), resManager.GetString("NoCertTitle"), "", MyMessageBoxButtons.YesNo, MyMessageBoxIcon.Question, MyMessageBoxDefaultButton.Button2);
                 *      DialogResult messageDialogResult = mmb.ShowDialog();
                 *      mmb.Dispose();
                 *      mmb.Close();
                 *      if( messageDialogResult != DialogResult.Yes )
                 *              return;
                 * }*/

                else
                {
                    ragent = "DEFAULT";

                    DomainInformation domainInfo = (DomainInformation)this.simws.GetDomainInformation(this.DomainID);
                    string            memberUID  = domainInfo.MemberUserID;
                    try
                    {
                        publicKey = this.ifws.GetDefaultServerPublicKey(this.DomainID, memberUID);
                    }
                    catch (Exception)
                    {
                        Novell.iFolderCom.MyMessageBox mmb = new MyMessageBox(Resource.GetString("PassStoreErr") /*"Unable to set the passphrase"*/, resourceManager.GetString("$this.Text") /*"Error setting the passphrase"*/, "" /*Resource.GetString("TryAgain")*//*"Please try again"*/, MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
                        mmb.ShowDialog();
                        mmb.Dispose();
                        return;
                    }
                }
                Status passPhraseStatus = null;
                try

                {
                    passPhraseStatus = simws.SetPassPhrase(DomainID, this.Passphrase.Text, ragent, publicKey);
                }
                catch (Exception ex)
                {
                    //MessageBox.Show("Unable to set Passphrase. "+ ex.Message);
                    MessageBox.Show(Resource.GetString("IsPassphraseSetException") + ex.Message);
                }
                if (passPhraseStatus.statusCode == StatusCodes.Success)
                {
                    // Validating Passphrase
                    //passPhraseStatus = simws.ValidatePassPhrase( DomainID, PadString(this.Passphrase.Text, 16));
                    //if(passPhraseStatus.statusCode != StatusCodes.Success)
                    //	MessageBox.Show("Passphrase not validated");
                    simws.StorePassPhrase(DomainID, this.Passphrase.Text, CredentialType.Basic, this.savePassphrase.Checked);
                    //string passphr = simws.GetPassPhrase(DomainID);
                    //MessageBox.Show("Passphrase is set & stored", passphr, MessageBoxButtons.OK);
                    //this.status= simws.IsPassPhraseSet(DomainID);
                    //if( status == true)
                    status = true;
                    Novell.iFolderCom.MyMessageBox mmb = new MyMessageBox(Resource.GetString("SetPassphraseSuccess") /*"Successfully set the passphrase"*/, resourceManager.GetString("$this.Text"), "", MyMessageBoxButtons.OK, MyMessageBoxIcon.Information);
                    mmb.ShowDialog();
                    mmb.Dispose();
                    this.Dispose();
                    this.Close();
                }
                else
                {
                    // Unable to set the passphrase
                    status = false;
                    Novell.iFolderCom.MyMessageBox mmb = new MyMessageBox(Resource.GetString("PassStoreErr") /*"Unable to set the passphrase"*/, resourceManager.GetString("$this.Text") /*"Error setting the passphrase"*/, "" /*Resource.GetString("TryAgain")*//*"Please try again"*/, MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
                    mmb.ShowDialog();
                    mmb.Dispose();
                }
            }
            else
            {
                status = false;
            }
        }
예제 #5
0
 /// <summary>
 /// Window_Closed
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Window_Closed(object sender, System.EventArgs e)
 {
     _messageBox.Close();
 }
예제 #6
0
        /// <summary>
        /// Event handler for Reset button click event
        /// </summary>
        private void btnReset_Click(object sender, System.EventArgs e)
        {
            try
            {
                Cursor.Current = Cursors.WaitCursor;
                DomainItem domainItem = (DomainItem)this.DomainComboBox.SelectedItem;
                this.domainID = domainItem.ID;
                System.Resources.ResourceManager resManager = new System.Resources.ResourceManager(typeof(Connecting));
                string publicKey = null;
                string ragent    = null;

                //Check whether the current/old passphrase is valid before reseting the passphrase
                Status status = null;
                try
                {
                    status = simws.ValidatePassPhrase(this.domainID, this.passPhrase.Text);
                }
                catch (Exception ex)
                {
                    System.Resources.ResourceManager resMgr = new System.Resources.ResourceManager(typeof(VerifyPassphraseDialog));
                    MessageBox.Show(resMgr.GetString("ValidatePPError") /*"Unable to validate the Passphrase. {0}"*/, ex.Message);
                }
                if (status.statusCode == StatusCodes.PassPhraseInvalid)
                {
                    Cursor.Current = Cursors.Default;
                    MessageBox.Show(Resource.GetString("InvalidCurrentPPText") /*"Error resetting passphrase"*/, Resource.GetString("ResetTitle") /*"reset error"*/);
                    this.success = false;
                    return;
                }

                if (status.statusCode == StatusCodes.ServerUnAvailable)
                {
                    Cursor.Current = Cursors.Default;
                    MessageBox.Show(Resource.GetString("NoLoggedInDomainsText") /*"Error resetting passphrase"*/, Resource.GetString("ResetTitle") /*"reset error"*/);
                    this.success = false;
                    return;
                }

                if (this.recoveryAgentCombo.SelectedItem != null && (string)this.recoveryAgentCombo.SelectedItem != TrayApp.Properties.Resources.serverDefaultRA)
                {
                    // Show the certificate.....
                    byte[] CertificateObj = this.simws.GetRACertificateOnClient(this.DomainID, (string)this.recoveryAgentCombo.SelectedItem);
                    System.Security.Cryptography.X509Certificates.X509Certificate cert = new System.Security.Cryptography.X509Certificates.X509Certificate(CertificateObj);
                    MyMessageBox mmb = new MyMessageBox(string.Format(resManager.GetString("verifyCert"), (string)this.recoveryAgentCombo.SelectedItem), resManager.GetString("verifyCertTitle"), cert.ToString(true), MyMessageBoxButtons.YesNo, MyMessageBoxIcon.Question, MyMessageBoxDefaultButton.Button2);
                    DialogResult messageDialogResult = mmb.ShowDialog();
                    mmb.Dispose();
                    mmb.Close();
                    if (messageDialogResult != DialogResult.Yes)
                    {
                        return;
                    }
                    else
                    {
                        ragent    = (string)this.recoveryAgentCombo.SelectedItem;
                        publicKey = Convert.ToBase64String(cert.GetPublicKey());
                    }
                }

                /*else	// If recovery agent is not selected...
                 * {
                 *  MyMessageBox mmb = new MyMessageBox( resManager.GetString("NoCertWarning"), resManager.GetString("NoCertTitle"), "", MyMessageBoxButtons.YesNo, MyMessageBoxIcon.Question, MyMessageBoxDefaultButton.Button2);
                 *  DialogResult messageDialogResult = mmb.ShowDialog();
                 *  mmb.Dispose();
                 *  mmb.Close();
                 *  if( messageDialogResult != DialogResult.Yes )
                 *      return;
                 * }*/

                else
                {
                    ragent = "DEFAULT";
                    //DomainInformation domainInfo = new DomainInformation(this.domainID);
                    DomainInformation domainInfo = (DomainInformation)this.simws.GetDomainInformation(this.DomainID);
                    string            memberUID  = domainInfo.MemberUserID;
                    publicKey = this.ifws.GetDefaultServerPublicKey(this.DomainID, memberUID);
                }

                status = this.simws.ReSetPassPhrase(this.DomainID, this.passPhrase.Text, this.newPassphrase.Text, ragent, publicKey);
                if (status.statusCode == StatusCodes.Success)
                {
                    //clear the values
                    simws.StorePassPhrase(this.DomainID, "", CredentialType.None, false);
                    //set the values
                    simws.StorePassPhrase(this.DomainID, this.newPassphrase.Text, CredentialType.Basic, this.rememberPassphrase.Checked);

                    MyMessageBox mb = new MyMessageBox(string.Format(Resource.GetString("ResetSuccess")), Resource.GetString("ResetTitle"), "", MyMessageBoxButtons.OK, MyMessageBoxIcon.Information);
                    mb.ShowDialog();
                    mb.Dispose();
                    this.success = true;
                    this.Dispose();
                    this.Close();
                }
                else
                {
                    MessageBox.Show(Resource.GetString("ResetError") /*"Error resetting passphrase"*/, Resource.GetString("ResetTitle") /*"reset error"*/);
                    this.success = false;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(Resource.GetString("ResetError") /*"Error resetting passphrase"*/, Resource.GetString(ex.Message) /*"reset error"*/);
                this.success = false;
            }
            Cursor.Current = Cursors.Default;
        }