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


C# iFolderCom.MyMessageBox类代码示例

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


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

示例1: apply_Click

 private void apply_Click(object sender, System.EventArgs e)
 {
     this.processChanges();
        try
        {
     connectToWebService();
     string id = currentiFolder.ID;
     currentiFolder = null;
     currentiFolder = ifWebService.GetiFolder(id);
        }
        catch (Exception ex)
        {
     MyMessageBox mmb = new MyMessageBox(resourceManager.GetString("iFolderReadError"), resourceManager.GetString("errorTitle"), ex.Message, MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
     mmb.ShowDialog();
        }
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:16,代码来源:iFolderAdvanced.cs

示例2: removeAccount_Click

 private void removeAccount_Click(object sender, System.EventArgs e)
 {
     ListViewItem lvi = accounts.SelectedItems[0];
     Domain domain = (Domain)lvi.Tag;
     if (domain == null)
     {
         newAccountLvi = null;
         lvi.Remove();
         updatePassword = updateEnabled = updateHost = false;
         addAccount.Enabled = true;
     }
     else
     {
         RemoveAccount removeAccount = new RemoveAccount(domain.DomainInfo);
         if (removeAccount.ShowDialog() == DialogResult.Yes)
         {
             try
             {
                 simiasWebService.LeaveDomain(domain.ID, !removeAccount.RemoveAll);
                 lvi.Remove();
                 string defaultDomainID = null;
                 if (domain.Equals(currentDefaultDomain))
                 {
                     defaultDomainID = simiasWebService.GetDefaultDomainID();
                 }
                 if (RemoveDomain != null)
                 {
                     RemoveDomain(this, new DomainRemoveEventArgs(domain.DomainInfo, defaultDomainID));
                 }
                 if (defaultDomainID != null)
                 {
                     foreach (ListViewItem item in accounts.Items)
                     {
                         Domain d = (Domain)item.Tag;
                         if (d.ID.Equals(defaultDomainID))
                         {
                             currentDefaultDomain = d;
                             break;
                         }
                     }
                 }
                 updatePassword = updateEnabled = updateHost = false;
             }
             catch (Exception ex)
             {
                 MyMessageBox mmb = new MyMessageBox(resourceManager.GetString("removeAccountError"), resourceManager.GetString("accountErrorTitle"), ex.Message, MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
                 mmb.ShowDialog();
                 mmb.Dispose();
             }
         }
         DomainInformation[] domains;
         System.Threading.Thread.Sleep(2000);
         domains = this.simiasWebService.GetDomains(false);
         if (domains.Length.Equals(0))
         {
             if (((GlobalProperties)FormsTrayApp.globalProp()).Visible)
                 ((GlobalProperties)FormsTrayApp.globalProp()).Hide();
         }
         removeAccount.Dispose();
     }
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:61,代码来源:Preferences.cs

示例3: ShutdownTrayApp

 private void ShutdownTrayApp(Exception ex)
 {
     if (preferences != null)
     preferences.Hide();
        if (globalProperties != null)
     globalProperties.Hide();
        if (syncLog != null)
     syncLog.Hide();
     if (infolog != null)
         infolog.Hide();
        Cursor.Current = Cursors.WaitCursor;
        if (shellNotifyIcon != null)
        {
     shellNotifyIcon.Text = resourceManager.GetString("iFolderServicesStopping");
     shellNotifyIcon.Icon = shutdownIcon;
        }
        if (ex != null)
        {
     Novell.iFolderCom.MyMessageBox mmb = new MyMessageBox(resourceManager.GetString("fatalErrorMessage"), resourceManager.GetString("fatalErrorTitle"), ex.Message, MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
     mmb.ShowDialog();
        }
        simiasRunning = false;
     iFolderComponent.SimiasRunning = false;
        try
        {
     if (eventClient != null)
     {
      eventClient.Deregister();
     }
     if(this.MachineShutdown() == false && globalProperties.MachineShutdown() == false && preferences.MachineShutdown() == false && syncLog.MachineShutdown() == false)
     {
      simiasManager.Stop();
     }
     if ((worker != null) && worker.IsAlive)
     {
      worker.Abort();
     }
        }
        catch
        {
        }
        Cursor.Current = Cursors.Default;
        Application.Exit();
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:44,代码来源:FormsTrayApp.cs

示例4: acceptiFolder

 private bool acceptiFolder(iFolderWeb ifolder, string path, out bool added, bool mergeFolder)
 {
     bool download = false;
     bool result = true;
     bool repeatFlag = false;
     added = true;
     if (GetDriveType(Path.GetPathRoot(path)) == DRIVE_FIXED)
     {
         if (Win32Security.AccessAllowed(path))
         {
             try
             {
                 if (ifolder.encryptionAlgorithm == null || ifolder.encryptionAlgorithm == "")
                 {
                     download = true;
                 }
                 else
                 {
                     string passphrasecheck = null;
                     passphrasecheck = simiasWebService.GetPassPhrase(ifolder.DomainID);
                     if (passphrasecheck == null || passphrasecheck == "")
                     {
                         VerifyPassphraseDialog vpd = new VerifyPassphraseDialog(ifolder.DomainID, simiasWebService);
                         vpd.ShowDialog();
                         download = vpd.PassphraseStatus;
                     }
                     else
                     {
                         download = true;
                     }
                 }
                 if (download)
                 {
                     Cursor = Cursors.WaitCursor;
                     if (mergeFolder == true)
                     {
             string mergediFolder = path;
             if(System.IO.Path.GetFileName(mergediFolder) != ifolder.Name)
             {
              throw new Exception("FolderDoesNotExist");
             }
                         if (Directory.Exists(mergediFolder) == false)
                         {
                             throw new Exception("PathDoesNotExist");
                         }
                         if (ifWebService.IsiFolder(mergediFolder) == true)
                         {
                             throw new Exception("AtOrInsideCollectionPath");
                         }
                         ifWebService.MergeiFolder(ifolder.DomainID, ifolder.ID, mergediFolder);
                         Cursor = Cursors.Default;
                     }
                     else
                     {
                          DirectoryInfo di = new DirectoryInfo(path);
                         if (di.Name == ifolder.Name)
                         {
                             path = Directory.GetParent(path).ToString();
                         }
                         if( System.IO.Directory.Exists( Path.Combine(path,ifolder.Name)) )
                         {
                             MyMessageBox mmb = new MyMessageBox(Resources.OkMergeCancel,Resources.Folderexists, String.Empty, MyMessageBoxButtons.OKCancel, MyMessageBoxIcon.Question, MyMessageBoxDefaultButton.Button1);
                       if (mmb.ShowDialog() == DialogResult.OK)
                 {
                                 ifWebService.MergeiFolder(ifolder.DomainID, ifolder.ID, Path.Combine(path, ifolder.Name));
                             }
                             else
                                 return false;
                }
                   else
                       ifWebService.AcceptiFolderInvitation(ifolder.DomainID, ifolder.ID, path);
                         Cursor = Cursors.Default;
                     }
                 }
                 else
                 {
                     result = true;
                     added = false;
                 }
             }
             catch (Exception ex)
             {
                 Cursor = Cursors.Default;
                 added = false;
                 MyMessageBox mmb;
                 if (ex.Message.IndexOf("260") != -1)
                 {
                     mmb = new MyMessageBox("The iFolder path is too long for the File System. Download failed", "Path Too Long", string.Empty, MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
                     mmb.ShowDialog();
                     repeatFlag = true;
                 }
                 else if (ex.Message.IndexOf("PathExists") != -1)
                 {
                     mmb = new MyMessageBox(TrayApp.Properties.Resources.pathExistsError, TrayApp.Properties.Resources.pathInvalidErrorTitle, string.Empty, MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
                     mmb.ShowDialog();
                 }
                 else if (ex.Message.IndexOf("AtOrInsideStorePath") != -1)
                 {
                     mmb = new MyMessageBox(TrayApp.Properties.Resources.pathInStoreError, TrayApp.Properties.Resources.pathInvalidErrorTitle, string.Empty, MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
                     mmb.ShowDialog();
//.........这里部分代码省略.........
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:101,代码来源:GlobalProperties.cs

示例5: 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;
         hideSyncLog.Checked = HideSyncLogWindow;
         hidenotification.Checked = HidePolicyVoilationNotification;
         displayConfirmation.Checked = iFolderComponent.DisplayConfirmationEnabled;
         displayTrayIcon.Checked = !(iFolderComponent.DisplayTrayIconEnabled);
         notifyCheckbox.Checked = false;
         policylistbox.ClearSelected();
         if (NotifyPolicyQouta)
             policylistbox.SelectedIndex = (int)policyVoilation.QuotaVoliation;
         if (NotifyPolicySize)
             policylistbox.SelectedIndex = (int)policyVoilation.FileSizeVoilation;
         if (NotifyPolicyType)
             policylistbox.SelectedIndex = (int)policyVoilation.FileTypeVoilation;
         if (NotifyPathLong)
             policylistbox.SelectedIndex = (int)policyVoilation.LongPath;
         if (NotifyIOPermission)
             policylistbox.SelectedIndex = (int)policyVoilation.PremissionUnavailable;
         if (NotifyDiskFull)
             policylistbox.SelectedIndex = (int)policyVoilation.DiskFullVoilation;
         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,代码行数:61,代码来源:Preferences.cs

示例6: MoreInitialization

 void MoreInitialization()
 {
     this.fileExitDlg = new MyMessageBox(TrayApp.Properties.Resources.exitMessage,
         TrayApp.Properties.Resources.exitTitle,
         string.Empty,
         MyMessageBoxButtons.YesNo,
         MyMessageBoxIcon.Question);
     try
     {
         smallImageList = new ImageList();
         smallImageList.ImageSize = new Size(32, 32);
         smallImageList.ColorDepth = ColorDepth.Depth32Bit;
         smallImageList.TransparentColor = Color.Black;
         smallImageList.Images.Add(Bitmap.FromFile(Path.Combine(Application.StartupPath, @"res\newifolder32.png")));
         smallImageList.Images.Add(Bitmap.FromFile(Path.Combine(Application.StartupPath, @"res\ifolder-sync32.png")));
         smallImageList.Images.Add(Bitmap.FromFile(Path.Combine(Application.StartupPath, @"res\ifolder-download32.png")));
         smallImageList.Images.Add(Bitmap.FromFile(Path.Combine(Application.StartupPath, @"res\ifolder-upload32.png")));
         smallImageList.Images.Add(Bitmap.FromFile(Path.Combine(Application.StartupPath, @"res\ifolder-waiting32.png")));
         smallImageList.Images.Add(Bitmap.FromFile(Path.Combine(Application.StartupPath, @"res\ifolder-conflict32.png")));
         smallImageList.Images.Add(Bitmap.FromFile(Path.Combine(Application.StartupPath, @"res\ifolder-error32.png")));
         smallImageList.Images.Add(Bitmap.FromFile(Path.Combine(Application.StartupPath, @"res\encrypt-ilock32.png")));
         smallImageList.Images.Add(Bitmap.FromFile(Path.Combine(Application.StartupPath, @"res\ifolder_user_32.png")));
         smallImageList.Images.Add(Bitmap.FromFile(Path.Combine(Application.StartupPath, @"res\ifolder-warning32.png")));
         toolStripBtnCreate.Image = Bitmap.FromFile(Path.Combine(Application.StartupPath, @"res\ifolder48.png"));
         toolStripBtnDelete.Image = Bitmap.FromFile(Path.Combine(Application.StartupPath, @"res\delete_48.png"));
         toolStripBtnDownload.Image = Bitmap.FromFile(Path.Combine(Application.StartupPath, @"res\ifolder-download48.png"));
         toolStripBtnMerge.Image = Bitmap.FromFile(Path.Combine(Application.StartupPath, @"res\merge48.png"));
         toolStripBtnResolve.Image = Bitmap.FromFile(Path.Combine(Application.StartupPath, @"res\ifolder-conflict48.png"));
         toolStripBtnRevert.Image = Bitmap.FromFile(Path.Combine(Application.StartupPath, @"res\revert48.png"));
         toolStripBtnShare.Image = Bitmap.FromFile(Path.Combine(Application.StartupPath, @"res\share48.png"));
         toolStripBtnSyncNow.Image = Bitmap.FromFile(Path.Combine(Application.StartupPath, @"res\ifolder-sync48.png"));
         toolStipBtnChangeView.Image = Bitmap.FromFile(Path.Combine(Application.StartupPath, @"res\change_view_48.png"));
     }
     catch { }
     listView1.LargeImageList = largeImageList;
     listView1.SmallImageList = smallImageList;
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GlobalProperties));
     this.ApplyResources1(resources, this.menuAction, "menuAction");
     this.ApplyResources1(resources, this.menuActionCreate, "menuActionCreate");
     this.ApplyResources1(resources, this.menuActionAccept, "menuActionAccept");
     this.ApplyResources1(resources, this.menuActionMerge, "menuActionMerge");
     this.ApplyResources1(resources, this.menuActionRemove, "menuActionRemove");
     this.ApplyResources1(resources, this.menuItem7, "menuItem7");
     this.ApplyResources1(resources, this.menuActionOpen, "menuActionOpen");
     this.ApplyResources1(resources, this.menuActionShare, "menuActionShare");
     this.ApplyResources1(resources, this.menuActionResolve, "menuActionResolve");
     this.ApplyResources1(resources, this.menuActionSync, "menuActionSync");
     this.ApplyResources1(resources, this.menuActionRevert, "menuActionRevert");
     this.ApplyResources1(resources, this.menuActionProperties, "menuActionProperties");
     this.ApplyResources1(resources, this.menuItem4, "menuItem4");
     this.ApplyResources1(resources, this.migrationMenuItem, "migrationMenuItem");
     this.ApplyResources1(resources, this.migrationMenuSubItem, "migrationMenuSubItem");
     this.ApplyResources1(resources, this.menuSeparator, "menuSeparator");
     this.ApplyResources1(resources, this.menuActionClose, "menuActionClose");
     this.ApplyResources1(resources, this.menuActionExit, "menuActionExit");
     this.ApplyResources1(resources, this.menuEdit, "menuEdit");
     this.ApplyResources1(resources, this.menuViewAccounts, "menuViewAccounts");
     this.ApplyResources1(resources, this.menuEditPrefs, "menuEditPrefs");
     this.ApplyResources1(resources, this.menuView, "menuView");
     this.ApplyResources1(resources, this.menuViewRefresh, "menuViewRefresh");
     this.ApplyResources1(resources, this.menuItem1, "menuItem1");
     this.ApplyResources1(resources, this.menuViewLog, "menuViewLog");
     this.ApplyResources1(resources, this.menuItem3, "menuItem3");
     this.ApplyResources1(resources, this.menuViewAvailable, "menuViewAvailable");
     this.ApplyResources1(resources, this.menuSecurity, "menuSecurity");
     this.ApplyResources1(resources, this.menuRecoverKeys, "menuRecoverKeys");
     this.ApplyResources1(resources, this.menuResetPassphrase, "menuResetPassphrase");
     this.ApplyResources1(resources, this.menuResetPassword, "menuResetPassword");
     this.ApplyResources1(resources, this.menuHelp, "menuHelp");
     this.ApplyResources1(resources, this.menuHelpHelp, "menuHelpHelp");
     this.ApplyResources1(resources, this.menuHelpAbout, "menuHelpAbout");
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:72,代码来源:GlobalProperties.cs

示例7: AcceptiFolder

 public bool AcceptiFolder(iFolderWeb ifolder, out bool added, bool mergeFolder)
 {
     bool result = false;
     added = false;
     if (ifolder.MigratediFolder > 0)
     {
         if (MigrationWindow.OldiFoldersPresent() == true)
         {
             System.Resources.ResourceManager resManager = new System.Resources.ResourceManager(typeof(FormsTrayApp));
             MyMessageBox mmb = new MyMessageBox(resManager.GetString("MigrationMergePrompt.Text"), resManager.GetString("MigrationAlert"), "", MyMessageBoxButtons.OKCancel, MyMessageBoxIcon.Question);
             DialogResult res = mmb.ShowDialog();
             if (res == DialogResult.OK)
             {
                 Novell.FormsTrayApp.MigrationWindow migrationWindow = new MigrationWindow(this.ifWebService, this.simiasWebService);
                 migrationWindow.Merge = true;
                 migrationWindow.iFolderName = ifolder.Name;
                 migrationWindow.ShowDialog();
                 string loc = migrationWindow.iFolderLocation;
                 string uName = migrationWindow.UserName;
                 if (loc == null || uName == null)
                 {
                     return false;
                 }
                 else
                 {
                     result = acceptiFolder(ifolder, loc, out added, true);
                     if (result == true)
                     {
                         MigrationWindow.RemoveRegistryForUser(uName);
                     }
                 }
                 return result;
             }
         }
     }
        string selectedPath = string.Empty;
        FolderBrowserDialog browserDialog = new FolderBrowserDialog();
        Cursor.Current = Cursors.WaitCursor;
        while (true)
        {
     browserDialog.ShowNewFolderButton = true;
     browserDialog.SelectedPath = selectedPath;
         if (!mergeFolder)
         {
             browserDialog.Description = string.Format(TrayApp.Properties.Resources.acceptDescription, ifolder.Name);
         }
         else
         {
             browserDialog.Description = string.Format(TrayApp.Properties.Resources.mergeDescription, ifolder.Name);
         }
     DialogResult dialogResult = browserDialog.ShowDialog();
     if ( dialogResult == DialogResult.OK )
     {
      browserDialog.Dispose();
      Invalidate();
      Update();
             result = acceptiFolder(ifolder, browserDialog.SelectedPath, out added, mergeFolder);
             if (result && !added)
             {
                 break;
             }
      else if ( result )
      {
                 if (!mergeFolder)
                     DownloadPath = browserDialog.SelectedPath + ifolder.Name;
                 else
                     DownloadPath = browserDialog.SelectedPath;
       break;
      }
     }
     else
     {
      browserDialog.Dispose();
      break;
     }
        }
        Cursor.Current = Cursors.Default;
     refreshAll();
        return result;
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:80,代码来源:GlobalProperties.cs

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

示例9: ValidatePage

 internal override int ValidatePage(int currentIndex)
 {
     bool status = false;
     System.Resources.ResourceManager resourceManager = new System.Resources.ResourceManager(typeof(CreateiFolder));
        if( this.CreateDefault.Checked == false)
     status = true;
        else if( upload )
        {
         if (ifws.GetLimitPolicyStatus(domainInfo.ID) == 1)
         {
             iFolderWeb ifolder = null;
             ifolder = CreateDefaultiFolder(this.sslCheckButton.Checked);
             if (ifolder != null)
             {
                 status = true;
                 this.simws.DefaultAccount(domainInfo.ID, ifolder.ID);
             }
         }
         else
         {
             MyMessageBox mmb = new MyMessageBox(resourceManager.GetString("ifolderlimiterror"), resourceManager.GetString("errorTitle"), string.Empty, MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
             mmb.ShowDialog();
             status = true;
         }
        }
        else
        {
     iFolderWeb ifolder= this.ifws.GetMinimaliFolder( this.defaultiFolderID, 1 );
     if( ifolder != null)
     {
      status = DownloadiFolder(ifolder);
     }
     else
     {
      status = false;
     }
        }
        if( status == true)
     return base.ValidatePage (currentIndex);
        else
     return currentIndex;
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:42,代码来源:DefaultiFolderPage.cs

示例10: btnReset_Click

 private void btnReset_Click(object sender, System.EventArgs e)
 {
     string title;
     string message;
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(ResetPassword));
     if( this.newPassword.Text != this.confirmPassword.Text )
     {
         title = resources.GetString("Errorchangingpassword");
         message = resources.GetString("PasswordsDoesNotMatch");
         MyMessageBox mb1 = new MyMessageBox(message, title, "", MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
         mb1.ShowDialog();
         mb1.Dispose();
         this.success = false;
         return;
     }
     else if (this.newPassword.Text == this.oldpassword.Text)
     {
         title = resources.GetString("Errorchangingpassword");
         message = resources.GetString("PasswordsSame");
         MyMessageBox mb1 = new MyMessageBox(message, title, "", MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
         mb1.ShowDialog();
         mb1.Dispose();
         this.success = false;
         return;
     }
        try
        {
     DomainItem domainItem = (DomainItem)this.DomainComboBox.SelectedItem;
     this.domainID = domainItem.ID;
     System.Resources.ResourceManager resManager = new System.Resources.ResourceManager(typeof(Connecting));
         this.PerformResetPassword(this.domainID, this.oldpassword.Text, this.newPassword.Text);
        }
        catch(Exception ex)
        {
     MessageBox.Show(Resource.GetString("ResetError") , Resource.GetString("ResetTitle") );
     this.success = false;
        }
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:38,代码来源:ResetPassword.cs

示例11: PerformResetPassword

 private void PerformResetPassword(string domainid, string oldpassword, string newpassword)
 {
     string title = null;
     string message = null;
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(ResetPassword));
     int result = this.ifws.ChangePassword(domainid, oldpassword, newpassword);
     if (result == 0)
     {
         try
         {
             if (this.rememberPassword.Checked == true)
             {
                 this.simiasWebservice.SetDomainCredentials(domainid, newpassword, CredentialType.Basic);
             }
             else
             {
                 this.simiasWebservice.SetDomainCredentials(domainid, null, CredentialType.None);
             }
         }
         catch { }
         title = resources.GetString("ResetPasswordTitle");
         message = resources.GetString("Resetpasswordsuccess");
         MyMessageBox mb = new MyMessageBox(message, title, "", MyMessageBoxButtons.OK, MyMessageBoxIcon.Information);
         mb.ShowDialog();
         mb.Dispose();
         this.success = true;
         this.Dispose();
         this.Close();
         return;
     }
     title = resources.GetString("Errorchangingpassword");
     switch (result)
     {
         case 1:
             message = resources.GetString("IncorrectOldPassword");
             break;
         case 2:
             message = resources.GetString("Failedtoresetpassword");
             break;
         case 3:
             message = resources.GetString("LoginDisabled");
             break;
         case 4:
             message = resources.GetString("Useraccountexpired");
             break;
         case 5:
             message = resources.GetString("Usercannotchangepassword");
             break;
         case 6:
             message = resources.GetString("Userpasswordexpired");
             break;
         case 7:
             message = resources.GetString("Minimumpasswordlengthrestrictionnotmet");
             break;
         case 8:
             message = resources.GetString("Usernotfoundinsimias");
             break;
         default:
             message = resources.GetString("Errorchangingpassword");
             break;
     }
     message = resources.GetString("Couldnotchangepassword") + message;
     MyMessageBox mb1 = new MyMessageBox(message, title, "", MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
     mb1.ShowDialog();
     mb1.Dispose();
     this.success = false;
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:67,代码来源:ResetPassword.cs

示例12: Import_func

 private bool Import_func()
 {
     try
     {
         string onetimepp = null;
         this.simiasWebService.ImportiFoldersCryptoKeys(selectedDomain.ID, this.newPassphrase.Text, onetimepp, this.outputFilePath);
         bool rememberOption = this.simiasWebService.GetRememberOption(selectedDomain.ID);
         this.simiasWebService.StorePassPhrase(selectedDomain.ID, "", CredentialType.None, false);
         this.simiasWebService.StorePassPhrase(selectedDomain.ID, this.newPassphrase.Text, CredentialType.Basic, rememberOption);
     }
     catch (Exception ex)
     {
         MyMessageBox mmb = new MyMessageBox(TrayApp.Properties.Resources.importErrorMesg, TrayApp.Properties.Resources.wizardText, null, MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
         mmb.ShowDialog();
         return false;
     }
     return true;
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:18,代码来源:SinglePageWizard.cs

示例13: Export_func

 private bool Export_func()
 {
     try
     {
         GetDefaultPath(selectedDomain.Name);
         this.simiasWebService.ExportiFoldersCryptoKeys(selectedDomain.ID, inputFilePath);
     }
     catch (Exception ex)
     {
         MyMessageBox mmb = new MyMessageBox(TrayApp.Properties.Resources.unableToExportMesg, TrayApp.Properties.Resources.wizardText, null, MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
         mmb.ShowDialog();
         return false;
     }
     return true;
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:15,代码来源:SinglePageWizard.cs

示例14: iFolderAdvanced_Load

 private void iFolderAdvanced_Load(object sender, EventArgs e)
 {
     string helpFile = Path.Combine(Path.Combine(Path.Combine(loadPath, "help"), GetLanguageDirectory()), @"sharewith.html");
        if (!File.Exists(helpFile))
        {
     helpFile = Path.Combine(loadPath, @"help\en\sharewith.html");
        }
        if (File.Exists(helpFile))
        {
     helpProvider1.HelpNamespace = helpFile;
        }
        try
        {
     shareWith.SmallImageList = new ImageList();
     string basePath = loadPath != null ? Path.Combine(loadPath, "res") : Path.Combine(Application.StartupPath, "res");
     shareWith.SmallImageList.Images.Add(new Icon(Path.Combine(basePath, "ifolder_me_card.ico")));
     shareWith.SmallImageList.Images.Add(new Icon(Path.Combine(basePath, "ifolder_contact_card.ico")));
     shareWith.SmallImageList.Images.Add(new Icon(Path.Combine(basePath, "inviteduser.ico")));
         this.Text = this.currentiFolder.Name + " " + resourceManager.GetString("properties");
     this.Icon = new Icon(Path.Combine(basePath, @"ifolder_16.ico"));
     this.pictureBox1.Image = Image.FromFile(System.IO.Path.Combine(loadPath, @"res\ifolder48.png"));
         this.iFolderName.Text = this.currentiFolder.Name;
         if (this.currentiFolder.Name.Length > 20)
             this.iFolderName.Text = this.currentiFolder.Name.Substring(0,20) + "...";
         if (this.currentiFolder.UnManagedPath.ToString().Length > 30)
     this.iFolderLocation.Text = ((string)this.currentiFolder.UnManagedPath).Substring(0,30);
         else
             this.iFolderLocation.Text = ((string)this.currentiFolder.UnManagedPath).ToString();
     this.iFolderOwner.Text = this.currentiFolder.Owner;
     this.iFolderAccount.Text = this.domainName;
         this.ssl.Checked = this.currentiFolder.ssl;
        }
        catch {}
        subscrHT = new Hashtable();
        userIDHT = new Hashtable();
        if (eventClient == null)
        {
     eventClient = new IProcEventClient(new IProcEventError(errorHandler), null);
     existingEventClient = false;
     eventClient.Register();
        }
        if (!eventError)
        {
     eventClient.SetEvent(IProcEventAction.AddNodeChanged, new IProcEventHandler(nodeEventHandler));
     eventClient.SetEvent(IProcEventAction.AddNodeCreated, new IProcEventHandler(nodeEventHandler));
     eventClient.SetEvent(IProcEventAction.AddNodeDeleted, new IProcEventHandler(nodeEventHandler));
     eventClient.SetEvent(IProcEventAction.AddCollectionSync, new IProcEventHandler(collectionSyncHandler));
     eventClient.SetEvent(IProcEventAction.AddFileSync, new IProcEventHandler(fileSyncHandler));
        }
        try
        {
     connectToWebService();
     refreshData();
        }
        catch (WebException ex)
        {
     MyMessageBox mmb = new MyMessageBox(resourceManager.GetString("iFolderReadError"), resourceManager.GetString("errorTitle"), ex.Message, MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
     mmb.ShowDialog();
     if (ex.Status == WebExceptionStatus.ConnectFailure)
     {
      ifWebService = null;
     }
        }
        catch (Exception ex)
        {
     MyMessageBox mmb = new MyMessageBox(resourceManager.GetString("iFolderReadError"), resourceManager.GetString("errorTitle"), ex.Message, MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
     mmb.ShowDialog();
        }
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:69,代码来源:iFolderAdvanced.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);
         IsDomainMaster = IsMaster;
     RevertiFolder revertiFolder = new RevertiFolder();
     if( !IsMaster )
      revertiFolder.removeFromServer.Text = TrayApp.Properties.Resources.AlsoRemoveMembership;
         revertiFolder.removeFromServer.Enabled = simiasWebService.GetDomainInformation(ifolder.DomainID).Authenticated;
         if ( revertiFolder.ShowDialog() == DialogResult.Yes )
     {
      Invalidate();
      Update();
      Cursor.Current = Cursors.WaitCursor;
             if (revertiFolder.RemoveFromServer)
                  ((iFolderObject)selectedItem.Tag).iFolderState = iFolderState.RevertAndDelete;
      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 )
       {
                     selectediFolderID = newiFolder.ID;
                     selectedDomainID = newiFolder.DomainID;
            Thread revertiFolderThread;
            revertiFolderThread = new Thread(new ThreadStart(RemoveiFolderFromServer));
            revertiFolderThread.Name = "RevertAndDeleteiFolder";
            revertiFolderThread.CurrentUICulture = Thread.CurrentThread.CurrentUICulture;
            revertiFolderThread.IsBackground = true;
            revertiFolderThread.Priority = ThreadPriority.BelowNormal;
                     revertiFolderThread.Start();
       }
       else
       {
        {
                         this.removeTileListViewItem((TileListViewItem)ht[newiFolder.ID]);
                         iFolderObject ifolderobj = new iFolderObject(newiFolder, iFolderState.Normal);
                         addiFolderToListView(ifolderobj);
                         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,代码行数:63,代码来源:GlobalProperties.cs


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