当前位置: 首页>>代码示例>>C#>>正文


C# MyMessageBox.Close方法代码示例

本文整理汇总了C#中Novell.iFolderCom.MyMessageBox.Close方法的典型用法代码示例。如果您正苦于以下问题:C# MyMessageBox.Close方法的具体用法?C# MyMessageBox.Close怎么用?C# MyMessageBox.Close使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Novell.iFolderCom.MyMessageBox的用法示例。


在下文中一共展示了MyMessageBox.Close方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: btnOk_Click

 private void btnOk_Click(object sender, System.EventArgs e)
 {
     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 != Resource.GetString("NoneText"))
     {
      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
     {
      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;
     }
     Status passPhraseStatus = null;
     try
     {
      passPhraseStatus = simws.SetPassPhrase( DomainID, this.Passphrase.Text, ragent, publicKey);
     }
     catch(Exception ex)
     {
      MessageBox.Show( Resource.GetString("IsPassphraseSetException")+ex.Message);
     }
     if(passPhraseStatus.statusCode == StatusCodes.Success)
     {
      simws.StorePassPhrase( DomainID, this.Passphrase.Text, CredentialType.Basic, this.savePassphrase.Checked);
             status = true;
      Novell.iFolderCom.MyMessageBox mmb = new MyMessageBox(Resource.GetString("SetPassphraseSuccess"), resourceManager.GetString("$this.Text"), "", MyMessageBoxButtons.OK, MyMessageBoxIcon.Information);
      mmb.ShowDialog();
      mmb.Dispose();
      this.Dispose();
      this.Close();
     }
     else
     {
      status = false;
      Novell.iFolderCom.MyMessageBox mmb = new MyMessageBox(Resource.GetString("IsPassphraseSetException"), resourceManager.GetString("$this.Text"), "", MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
      mmb.ShowDialog();
      mmb.Dispose();
     }
        }
        else
        {
     status = false;
        }
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:64,代码来源:EnterPassphraseDialog.cs

示例2: btnReset_Click

 private void btnReset_Click(object sender, System.EventArgs e)
 {
     try
        {
     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;
         Status status = null;
         try
         {
             status = simws.ValidatePassPhrase(this.domainID, this.passPhrase.Text);
       if(status.statusCode == StatusCodes.PassPhraseInvalid)
       {
     status = simws.ValidatePassPhrase(this.domainID, this.newPassphrase.Text);
       }
         }
         catch (Exception ex)
         {
             System.Resources.ResourceManager resMgr = new System.Resources.ResourceManager(typeof(VerifyPassphraseDialog));
             MessageBox.Show(resMgr.GetString("ValidatePPError"), ex.Message);
         }
         if (status.statusCode == StatusCodes.PassPhraseInvalid)
         {
             MessageBox.Show(Resource.GetString("InvalidCurrentPPText") , Resource.GetString("ResetTitle") );
             this.success = false;
             return;
         }
         if (this.recoveryAgentCombo.SelectedItem != null && (string)this.recoveryAgentCombo.SelectedItem != TrayApp.Properties.Resources.serverDefaultRA)
         {
             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
         {
             ragent = "DEFAULT";
             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)
     {
      simws.StorePassPhrase(this.DomainID, "", CredentialType.None, false);
      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") , Resource.GetString("ResetTitle") );
      this.success = false;
     }
        }
        catch(Exception ex)
        {
     MessageBox.Show(Resource.GetString("ResetError") , Resource.GetString(ex.Message) );
     this.success = false;
        }
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:76,代码来源:ResetPassphrase.cs

示例3: next_Click

 private void next_Click(object sender, System.EventArgs e)
 {
     if (currentIndex == (maxPages - 1))
        {
     return;
        }
        System.Resources.ResourceManager resManager = new System.Resources.ResourceManager(typeof(Connecting));
        if( currentIndex == 3 )
        {
     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")
      {
       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( 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"), "", "", MyMessageBoxButtons.OK, MyMessageBoxIcon.Information);
       mmb.ShowDialog();
       mmb.Dispose();
       this.Dispose();
       this.Close();
      }
      else
      {
       Novell.iFolderCom.MyMessageBox mmb = new MyMessageBox(Resource.GetString("IsPassphraseSetException"), "", "", MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
       mmb.ShowDialog();
       mmb.Dispose();
       return;
      }
     }
        }
        else if(currentIndex == 4)
        {
     Status passPhraseStatus = null;
     try
     {
      passPhraseStatus = this.simiasWebService.ValidatePassPhrase(this.identityPage.domain.ID, this.passphraseVerifyPage.Passphrase);
     }
     catch(Exception ex)
     {
      MessageBox.Show(resManager.GetString("ValidatePPError"), ex.Message);
      return;
     }
     if( passPhraseStatus != null)
     {
      if( passPhraseStatus.statusCode == StatusCodes.PassPhraseInvalid)
      {
       Novell.iFolderCom.MyMessageBox mmb = new MyMessageBox(Resource.GetString("InvalidPPText"), Resource.GetString("VerifyPP"), "", 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 ex)
       {
        MessageBox.Show("Unable to store Passphrase");
        return;
       }
      }
     }
        }
        int nextIndex = this.pages[currentIndex].ValidatePage(currentIndex);
        if( nextIndex == 4 )
        {
     nextIndex = 5;
//.........这里部分代码省略.........
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:101,代码来源:MigrationWizard.cs

示例4: btnOk_Click

 private void btnOk_Click(object sender, System.EventArgs e)
 {
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(CreateiFolder));
        if( this.Passphrase.Text == this.RetypePassphrase.Text)
        {
     string publicKey = null;
     string ragent = null;
         if (this.RecoveryAgentCombo.SelectedItem != null && (string)this.RecoveryAgentCombo.SelectedItem != resources.GetString("serverDefaultRA"))
         {
             byte[] CertificateObj = this.simws.GetRACertificateOnClient(DomainID, (string)this.RecoveryAgentCombo.SelectedItem);
             System.Security.Cryptography.X509Certificates.X509Certificate cert = new System.Security.Cryptography.X509Certificates.X509Certificate(CertificateObj);
             MyMessageBox mmb = new MyMessageBox(string.Format(resources.GetString("verifyCert"), (string)this.RecoveryAgentCombo.SelectedItem), resources.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 = this.RecoveryAgentCombo.SelectedText;
                 publicKey = Convert.ToBase64String(cert.GetPublicKey());
             }
         }
         else
         {
             ragent = "DEFAULT";
             DomainInformation domainInfo = (DomainInformation)this.simws.GetDomainInformation(this.DomainID);
             string memberUID = domainInfo.MemberUserID;
             publicKey = this.ifws.GetDefaultServerPublicKey(this.DomainID, memberUID);
         }
     Status passPhraseStatus = null;
     try
     {
      passPhraseStatus = simws.SetPassPhrase( DomainID, this.Passphrase.Text, ragent, publicKey);
     }
     catch(Exception ex)
     {
      MessageBox.Show(resources.GetString("ErrorSetPP") + ex.Message);
     }
     if(passPhraseStatus.statusCode == StatusCodes.Success)
     {
      simws.StorePassPhrase( DomainID, this.Passphrase.Text, CredentialType.Basic, this.savePassphrase.Checked);
      string passphr = simws.GetPassPhrase(DomainID);
      this.status= simws.IsPassPhraseSet(DomainID);
      if( status == true)
      {
       Novell.iFolderCom.MyMessageBox mmb = new MyMessageBox(resources.GetString("SetPPSuccess") , resources.GetString("EnterPPTitle") , "",MyMessageBoxButtons.OK, MyMessageBoxIcon.Information);
       mmb.ShowDialog();
       mmb.Dispose();
       this.Dispose();
       this.Close();
      }
     }
     else
     {
      status = false;
      Novell.iFolderCom.MyMessageBox mmb = new MyMessageBox(resources.GetString("ErrorSetPP") , resources.GetString("EnterPPTitle") , resources.GetString("TryAgain") , MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
      mmb.ShowDialog();
      mmb.Dispose();
     }
        }
        else
        {
     MessageBox.Show(resources.GetString("PPSDontMatch") );
     status = false;
        }
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:67,代码来源:CreateiFolder.cs

示例5: MigrateFolder

 public bool MigrateFolder()
 {
     DomainItem domain = this.MigrationIdentityPage.domain;
        bool shared = this.MigrationIdentityPage.SSL;
        string encryptionAlgorithm = (this.MigrationIdentityPage.Encrypion) ? "BlowFish" : "" ;
        string destination;
        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;
      }
      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"), 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;
        }
       }
      }
      if(ifws.CanBeiFolder(destination)== false)
      {
       this.verifyPage.CloseWaitDialog();
       MessageBox.Show(Resource.GetString("CannotBeiFolder"),Resource.GetString("MigrationTitle"),MessageBoxButtons.OK);
       return false;
      }
      if(!CopyDirectory(new DirectoryInfo(location), new DirectoryInfo(destination)))
      {
       this.verifyPage.CloseWaitDialog();
       MessageBox.Show(Resource.GetString("CannotCopy"), Resource.GetString("MigrationTitle"), MessageBoxButtons.OK);
       return false;
      }
     }
     else
     {
      destination = this.location;
      if(ifws.CanBeiFolder(destination)== false)
      {
       this.verifyPage.CloseWaitDialog();
       MessageBox.Show(Resource.GetString("CannotBeiFolder"),Resource.GetString("MigrationTitle"),MessageBoxButtons.OK);
       return false;
      }
     }
     if(shared)
     {
      if( ifws.CreateiFolderInDomain(destination, domain.ID) == null)
      {
       this.verifyPage.CloseWaitDialog();
       MessageBox.Show(Resource.GetString("MigrationConvert"), Resource.GetString("MigrationTitle"), 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"), Resource.GetString("MigrationTitle"), MessageBoxButtons.OK);
       return false;
      }
     }
        }
        catch(Exception ex)
        {
     this.verifyPage.CloseWaitDialog();
     MessageBox.Show(Resource.GetString("CannotBeiFolder"),Resource.GetString("MigrationTitle"),MessageBoxButtons.OK);
     return false;
        }
        if(this.MigrationServerPage.MigrationOption == true)
        {
     string iFolderRegistryKey = @"Software\Novell iFolder";
     RegistryKey iFolderKey = Registry.LocalMachine.OpenSubKey(iFolderRegistryKey, true);
     try
     {
      iFolderKey.DeleteSubKeyTree(UserName);
     }
//.........这里部分代码省略.........
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:101,代码来源:MigrationWizard.cs


注:本文中的Novell.iFolderCom.MyMessageBox.Close方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。