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


C# MyMessageBox.Dispose方法代码示例

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


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

示例1: menuOpen_Click

 private void menuOpen_Click(object sender, System.EventArgs e)
 {
     if ( selectedItem != null )
        {
     iFolderWeb ifolder = ((iFolderObject)selectedItem.Tag).iFolderWeb;
     try
     {
      Process.Start(ifolder.UnManagedPath);
     }
     catch (Exception ex)
     {
      Novell.iFolderCom.MyMessageBox mmb =
                 new MyMessageBox(string.Format(TrayApp.Properties.Resources.iFolderOpenError, ifolder.Name),
                     TrayApp.Properties.Resources.openErrorTitle,
                     ex.Message,
                     MyMessageBoxButtons.OK,
                     MyMessageBoxIcon.Error);
      mmb.ShowDialog();
      mmb.Dispose();
     }
        }
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:22,代码来源:GlobalProperties.cs

示例2: menuRecoverKeys_Click

 private void menuRecoverKeys_Click(object sender, EventArgs e)
 {
     KeyRecoveryWizard kr = new KeyRecoveryWizard(this.ifWebService, this.simiasWebService, this.simiasManager);
     if (kr.GetLoggedInDomains() == true)
     {
         kr.ShowDialog();
     }
     else
     {
         System.Resources.ResourceManager Resource =
             new System.Resources.ResourceManager(typeof(FormsTrayApp));
         Novell.iFolderCom.MyMessageBox mmb =
             new MyMessageBox(Resource.GetString("NoLoggedInDomainsText"),
                 Resource.GetString("ResetError"),
                 "",
                 MyMessageBoxButtons.OK,
                 MyMessageBoxIcon.Error);
         mmb.ShowDialog();
         mmb.Dispose();
     }
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:21,代码来源:GlobalProperties.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: menuImportKeys_Select

 private void menuImportKeys_Select(object sender, EventArgs e)
 {
     ImportKeysDialog importKeys = new ImportKeysDialog(this.simiasWebService,this.ifWebService);
        if( importKeys.DomainCount > 0)
     importKeys.ShowDialog();
        else
        {
     System.Resources.ResourceManager Resource = new System.Resources.ResourceManager(typeof(FormsTrayApp));
     Novell.iFolderCom.MyMessageBox mmb = new MyMessageBox(Resource.GetString("NoLoggedInDomainsTextForImport"), Resource.GetString("ImportKeysError"), "", MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
     mmb.ShowDialog();
     mmb.Dispose();
        }
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:13,代码来源:GlobalProperties.cs

示例5: 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

示例6: processChanges

 private bool processChanges()
 {
     bool result = true;
     Cursor.Current = Cursors.WaitCursor;
     if (autoStart.Checked != IsRunEnabled())
     {
         setAutoRunValue(!autoStart.Checked);
     }
     NotifyShareEnabled = notifyShared.Checked;
     NotifyCollisionEnabled = notifyCollisions.Checked;
     NotifyJoinEnabled = notifyJoins.Checked;
     HideiFolderInTray = startInTrayIcon.Checked;
     HideSyncLogWindow = hideSyncLog.Checked;
     HidePolicyVoilationNotification = hidenotification.Checked;
     iFolderComponent.DisplayConfirmationEnabled = displayConfirmation.Checked;
     iFolderComponent.DisplayTrayIconEnabled = !(displayTrayIcon.Checked);
     if (displayTrayIcon.Checked)
         FormsTrayApp.SetTrayIconStatus(false);
     else
         FormsTrayApp.SetTrayIconStatus(true);
     try
     {
         ListBox.SelectedIndexCollection selectedIndex = policylistbox.SelectedIndices;
         if (notifyCheckbox.Checked)
         {
             NotifyPolicyQouta = false;
             NotifyPolicySize = false;
             NotifyPolicyType = false;
             NotifyDiskFull = false;
             NotifyIOPermission = false;
             NotifyPathLong = false;
             foreach (int index in selectedIndex)
             {
                 switch (index)
                 {
                     case (int)policyVoilation.QuotaVoliation:
                         NotifyPolicyQouta = true;
                         break;
                     case (int)policyVoilation.FileSizeVoilation:
                         NotifyPolicySize = true;
                         break;
                     case (int)policyVoilation.FileTypeVoilation:
                         NotifyPolicyType = true;
                         break;
                     case (int)policyVoilation.DiskFullVoilation:
                         NotifyDiskFull = true;
                         break;
                     case (int)policyVoilation.PremissionUnavailable:
                         NotifyIOPermission = true;
                         break;
                     case (int)policyVoilation.LongPath:
                         NotifyPathLong = true;
                         break;
                     default:
                         FormsTrayApp.log.Debug("invalid index");
                         break;
                 }
             }
         }
         decimal syncValueInSeconds;
         if (((string)timeUnit.SelectedItem).Equals(resourceManager.GetString("days")))
         {
             syncValueInSeconds = defaultInterval.Value * 86400;
         }
         else if (((string)timeUnit.SelectedItem).Equals(resourceManager.GetString("hours")))
         {
             syncValueInSeconds = defaultInterval.Value * 3600;
         }
         else if (((string)timeUnit.SelectedItem).Equals(resourceManager.GetString("minutes")))
         {
             syncValueInSeconds = defaultInterval.Value * 60;
         }
         else
         {
             syncValueInSeconds = defaultInterval.Value;
         }
         int currentInterval = ifWebService.GetDefaultSyncInterval();
         if ((!syncValueInSeconds.Equals((decimal)currentInterval)) ||
             (autoSync.Checked != (currentInterval != System.Threading.Timeout.Infinite)))
         {
             try
             {
                 ifWebService.SetDefaultSyncInterval(autoSync.Checked ? (int)syncValueInSeconds : System.Threading.Timeout.Infinite);
                 if (autoSync.Checked)
                 {
                     displaySyncInterval((int)syncValueInSeconds);
                 }
             }
             catch (Exception ex)
             {
                 result = false;
                 Novell.iFolderCom.MyMessageBox mmb = new MyMessageBox(resourceManager.GetString("saveSyncError"), resourceManager.GetString("PreferencesErrorTitle"), ex.Message, MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
                 mmb.ShowDialog();
                 mmb.Dispose();
             }
         }
     }
     catch (Exception ex)
     {
         result = false;
//.........这里部分代码省略.........
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:101,代码来源:Preferences.cs

示例7: processChanges

 private bool processChanges()
 {
     bool result = true;
     Cursor.Current = Cursors.WaitCursor;
     if (autoStart.Checked != IsRunEnabled())
     {
         setAutoRunValue(!autoStart.Checked);
     }
     NotifyShareEnabled = notifyShared.Checked;
     NotifyCollisionEnabled = notifyCollisions.Checked;
     NotifyJoinEnabled = notifyJoins.Checked;
     HideiFolderInTray = startInTrayIcon.Checked;
     iFolderComponent.DisplayConfirmationEnabled = displayConfirmation.Checked;
     iFolderComponent.DisplayTrayIconEnabled = !(displayTrayIcon.Checked);
     if (displayTrayIcon.Checked)
         FormsTrayApp.SetTrayIconStatus(false);
     else
         FormsTrayApp.SetTrayIconStatus(true);
     try
     {
         decimal syncValueInSeconds;
         if (((string)timeUnit.SelectedItem).Equals(resourceManager.GetString("days")))
         {
             syncValueInSeconds = defaultInterval.Value * 86400;
         }
         else if (((string)timeUnit.SelectedItem).Equals(resourceManager.GetString("hours")))
         {
             syncValueInSeconds = defaultInterval.Value * 3600;
         }
         else if (((string)timeUnit.SelectedItem).Equals(resourceManager.GetString("minutes")))
         {
             syncValueInSeconds = defaultInterval.Value * 60;
         }
         else
         {
             syncValueInSeconds = defaultInterval.Value;
         }
         int currentInterval = ifWebService.GetDefaultSyncInterval();
         if ((!syncValueInSeconds.Equals((decimal)currentInterval)) ||
             (autoSync.Checked != (currentInterval != System.Threading.Timeout.Infinite)))
         {
             try
             {
                 ifWebService.SetDefaultSyncInterval(autoSync.Checked ? (int)syncValueInSeconds : System.Threading.Timeout.Infinite);
                 if (autoSync.Checked)
                 {
                     displaySyncInterval((int)syncValueInSeconds);
                 }
             }
             catch (Exception ex)
             {
                 result = false;
                 Novell.iFolderCom.MyMessageBox mmb = new MyMessageBox(resourceManager.GetString("saveSyncError"), resourceManager.GetString("PreferencesErrorTitle"), ex.Message, MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
                 mmb.ShowDialog();
                 mmb.Dispose();
             }
         }
     }
     catch (Exception ex)
     {
         result = false;
         Novell.iFolderCom.MyMessageBox mmb = new MyMessageBox(resourceManager.GetString("readSyncError"), resourceManager.GetString("PreferencesErrorTitle"), ex.Message, MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
         mmb.ShowDialog();
         mmb.Dispose();
     }
     Cursor.Current = Cursors.Default;
     return result;
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:68,代码来源:Preferences.cs

示例8: synciFolder

 private void synciFolder(string iFolderID)
 {
     try
        {
     ifWebService.SynciFolderNow(iFolderID);
        }
        catch (Exception ex)
        {
     Novell.iFolderCom.MyMessageBox mmb = new
             MyMessageBox(TrayApp.Properties.Resources.syncError,
             TrayApp.Properties.Resources.syncErrorTitle,
             ex.Message, MyMessageBoxButtons.OK,
             MyMessageBoxIcon.Error);
     mmb.ShowDialog();
     mmb.Dispose();
        }
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:17,代码来源:GlobalProperties.cs

示例9: btnOk_Click

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

示例10: Preferences_VisibleChanged

 private void Preferences_VisibleChanged(object sender, System.EventArgs e)
 {
     if (this.Visible)
     {
         accounts.Items.Clear();
         successful = true;
         DomainInformation[] domains;
         try
         {
             domains = simiasWebService.GetDomains(true);
             foreach (DomainInformation di in domains)
             {
                 AddDomainToList(di);
             }
         }
         catch (Exception ex)
         {
             Novell.iFolderCom.MyMessageBox mmb = new MyMessageBox(resourceManager.GetString("readAccountsError"), resourceManager.GetString("accountErrorTitle"), ex.Message, MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
             mmb.ShowDialog();
             mmb.Dispose();
         }
         apply.Enabled = false;
         autoStart.Checked = IsRunEnabled();
         notifyShared.Checked = NotifyShareEnabled;
         notifyCollisions.Checked = NotifyCollisionEnabled;
         notifyJoins.Checked = NotifyJoinEnabled;
         startInTrayIcon.Checked = HideiFolderInTray;
         displayConfirmation.Checked = iFolderComponent.DisplayConfirmationEnabled;
         displayTrayIcon.Checked = !(iFolderComponent.DisplayTrayIconEnabled);
         try
         {
             int syncInterval = ifWebService.GetDefaultSyncInterval();
             minimumSeconds = (!syncInterval.Equals(System.Threading.Timeout.Infinite) &&
                 (syncInterval < (int)defaultMinimumSeconds)) ? (decimal)syncInterval : defaultMinimumSeconds;
             displaySyncInterval(syncInterval);
         }
         catch (Exception ex)
         {
             Novell.iFolderCom.MyMessageBox mmb = new MyMessageBox(resourceManager.GetString("readSyncError"), resourceManager.GetString("PreferencesErrorTitle"), ex.Message, MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
             mmb.ShowDialog();
             mmb.Dispose();
         }
         Activate();
     }
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:45,代码来源:Preferences.cs

示例11: RevertToNormal

 public void RevertToNormal([MarshalAs(UnmanagedType.LPWStr)] string path)
 {
     Cursor.Current = Cursors.WaitCursor;
     try
     {
         connectToWebService();
         RevertiFolder revertiFolder = new RevertiFolder();
         iFolderWeb ifolder = ifWebService.GetiFolderByLocalPath(path);
         bool IsMaster = (ifolder.CurrentUserID == ifolder.OwnerID);
         if (!IsMaster)
             revertiFolder.removeFromServer.Text = resourceManager.GetString("AlsoRemoveMembership");
         revertiFolder.removeFromServer.Enabled = simws.GetDomainInformation(ifolder.DomainID).Authenticated;
         if (revertiFolder.ShowDialog() == DialogResult.Yes)
         {
             Cursor.Current = Cursors.WaitCursor;
             if (ifWebService != null && ifolder != null)
             {
                 ifWebService.RevertiFolder(ifolder.ID);
                 if(revertiFolder.RemoveFromServer)
                 {
                     if (IsMaster)
                     {
                         ifWebService.DeleteiFolder(ifolder.DomainID, ifolder.ID);
                     }
                     else
                     {
                         ifWebService.DeclineiFolderInvitation(ifolder.DomainID, ifolder.ID);
                     }
                 }
             }
         }
         revertiFolder.Dispose();
     }
     catch (WebException e)
     {
         ifWebService = null;
         if (e.Status == WebExceptionStatus.ProtocolError)
         {
             LocalService.ClearCredentials();
         }
     }
     catch (Exception e)
     {
         Cursor.Current = Cursors.Default;
         Novell.iFolderCom.MyMessageBox mmb = new MyMessageBox(resourceManager.GetString("iFolderRevertError"),
             resourceManager.GetString("revertErrorTitle"), e.Message, MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
         mmb.ShowDialog();
         mmb.Dispose();
     }
     Cursor.Current = Cursors.Default;
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:51,代码来源:iFolderComponent.cs

示例12: btnOk_Click

 private void btnOk_Click(object sender, System.EventArgs e)
 {
     Status passPhraseStatus = simws.ValidatePassPhrase(this.DomainID, this.Passphrase.Text);
        System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(CreateiFolder));
        if( passPhraseStatus != null)
        {
     if( passPhraseStatus.statusCode == StatusCodes.PassPhraseInvalid)
     {
      Novell.iFolderCom.MyMessageBox mmb = new MyMessageBox(resources.GetString("ValidatePPError") , resources.GetString("VerifyPPTitle") , resources.GetString("TryAgain") , MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
      mmb.ShowDialog();
      mmb.Dispose();
     }
     else if(passPhraseStatus.statusCode == StatusCodes.Success)
     {
      try
      {
       simws.StorePassPhrase( DomainID, this.Passphrase.Text, CredentialType.Basic, this.savePassphrase.Checked);
       status = true;
       this.Dispose();
       this.Close();
      }
      catch
      {
       status = false;
      }
     }
        }
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:28,代码来源:CreateiFolder.cs

示例13: 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

示例14: menuResetPassword_Click

 void menuResetPassword_Click(object sender, EventArgs e)
 {
     ResetPassword resetPasswordWindow = new ResetPassword(this.simiasWebService, this.ifWebService);
     if (resetPasswordWindow.DomainCount > 0)
         resetPasswordWindow.ShowDialog();
     else
     {
         System.Resources.ResourceManager Resource = new System.Resources.ResourceManager(typeof(FormsTrayApp));
         Novell.iFolderCom.MyMessageBox mmb =
             new MyMessageBox(Resource.GetString("NoLoggedInDomainsPasswordText"),
                 Resource.GetString("ResetPasswordError"),
                 "",
                 MyMessageBoxButtons.OK,
                 MyMessageBoxIcon.Error);
         mmb.ShowDialog();
         mmb.Dispose();
     }
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:18,代码来源:GlobalProperties.cs

示例15: menuRevert_Click

 private void menuRevert_Click(object sender, System.EventArgs e)
 {
     Cursor.Current = Cursors.WaitCursor;
        try
        {
     iFolderWeb ifolder = ((iFolderObject)selectedItem.Tag).iFolderWeb;
     bool IsMaster = (ifolder.CurrentUserID == ifolder.OwnerID);
     RevertiFolder revertiFolder = new RevertiFolder();
     if( !IsMaster )
      revertiFolder.removeFromServer.Text = TrayApp.Properties.Resources.AlsoRemoveMembership;
     if ( revertiFolder.ShowDialog() == DialogResult.Yes )
     {
      Invalidate();
      Update();
      Cursor.Current = Cursors.WaitCursor;
      iFolderWeb newiFolder = ifWebService.RevertiFolder(ifolder.ID);
      Win32Window.ShChangeNotify(Win32Window.SHCNE_UPDATEITEM, Win32Window.SHCNF_PATHW, ifolder.UnManagedPath, IntPtr.Zero);
      if (newiFolder != null)
      {
       acceptedFolders.Remove(newiFolder.ID);
       if ( revertiFolder.RemoveFromServer )
       {
        if( IsMaster )
        {
     string defaultiFolderID = this.simiasWebService.GetDefaultiFolder( newiFolder.DomainID );
     if( defaultiFolderID == newiFolder.ID)
     {
      this.simiasWebService.DefaultAccount( newiFolder.DomainID, null );
     }
     ifWebService.DeleteiFolder(newiFolder.DomainID, newiFolder.ID);
        }
        ifWebService.DeclineiFolderInvitation( newiFolder.DomainID, newiFolder.ID );
       }
       else
       {
        {
                         this.removeTileListViewItem((TileListViewItem)ht[newiFolder.ID]);
                         iFolderObject ifolderobj = new iFolderObject(newiFolder, iFolderState.Normal);
                         addiFolderToListView(ifolderobj);
        }
       }
      }
      lock (ht)
      {
       removeTileListViewItem( selectedItem );
      }
     }
         refreshAll();
     updateView();
     revertiFolder.Dispose();
        }
        catch (Exception ex)
        {
     Cursor.Current = Cursors.Default;
     Novell.iFolderCom.MyMessageBox mmb = new MyMessageBox(TrayApp.Properties.Resources.iFolderRevertError, TrayApp.Properties.Resources.revertErrorTitle, ex.Message, MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
     mmb.ShowDialog();
     mmb.Dispose();
        }
        Cursor.Current = Cursors.Default;
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:60,代码来源:GlobalProperties.cs


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