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


C# MyMessageBox.ShowDialog方法代码示例

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


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

示例1: updateDiskQuotaDisplay

 private void updateDiskQuotaDisplay()
 {
     try
        {
     connectToWebService();
     DiskSpace diskSpace = ifWebService.GetiFolderDiskSpace(currentiFolder.ID);
     double usedSpace = Math.Round(diskSpace.UsedSpace/megaByte, 2);
     used.Text = usedSpace.ToString();
     if (diskSpace.Limit != 0)
     {
      limitEdit.Text = limit.Text = ((double)Math.Round(diskSpace.Limit/megaByte, 2)).ToString();
      setLimit.Checked = true;
      available.Text = ((double)Math.Round(diskSpace.AvailableSpace/megaByte, 2)).ToString();
      gaugeChart.MaxValue = diskSpace.Limit / megaByte;
      gaugeChart.Used = usedSpace;
      gaugeChart.BarColor = SystemColors.ActiveCaption;
     }
     else
     {
      setLimit.Checked = false;
      available.Text = limit.Text = limitEdit.Text = "";
      gaugeChart.Used = 0;
     }
        }
        catch (Exception ex)
        {
     MyMessageBox mmb = new MyMessageBox(resourceManager.GetString("diskQuotaReadError"), resourceManager.GetString("errorTitle"), ex.Message, MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
     mmb.ShowDialog();
     setLimit.Checked = false;
     used.Text = available.Text = limit.Text = "";
     gaugeChart.Used = 0;
        }
        gaugeChart.Invalidate(true);
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:34,代码来源:iFolderAdvanced.cs

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

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

 public void refreshiFolders(string search)
 {
     if (search == null) search = "";
     search = this.toolStripBtnFilter.Text;
        Cursor.Current = Cursors.WaitCursor;
        Hashtable oldHt = new Hashtable();
     Hashtable tempHt = new Hashtable();
        lock(ht)
        {
     foreach ( TileListViewItem tlvi in ht.Values )
     {
      iFolderObject ifolderObject = (iFolderObject)tlvi.Tag;
      tempHt.Add( ifolderObject.ID, ifolderObject.iFolderState );
     }
        }
        try
        {
     panel2.SuspendLayout();
         if (selectedItem != null)
             updateMenus((iFolderObject)selectedItem.Tag);
         else
             updateMenus(null);
     foreach (iFolderWeb ifolder in ifolderArray)
     {
      if( search != null && ((String)ifolder.Name).ToLower().IndexOf(search.ToLower(),
                 0, ((String)ifolder.Name).Length) < 0)
       continue;
      iFolderState state = iFolderState.Normal;
        if (tempHt.Contains(ifolder.ID))
              {
                 state = (iFolderState)tempHt[ifolder.ID];
              }
             else
              {
                 iFolderObject ifobj = new iFolderObject(ifolder, state);
                 addiFolderToListView(ifobj);
                 ifobj = null;
               }
               oldHt.Add(ifolder.ID, state);
               if (this.acceptedFolders.Contains(ifolder.ID))
               {
                   this.acceptedFolders.Remove(ifolder.ID);
               }
         }
     foreach( System.Object obj in this.acceptedFolders.Values)
     {
      TileListViewItem tlv = (TileListViewItem)obj;
      iFolderObject ifobj = (iFolderObject)tlv.Tag;
      if( search != null && ((String)ifobj.iFolderWeb.Name).ToLower().IndexOf(search.ToLower(),
                 0, ((String)ifobj.iFolderWeb.Name).Length) < 0)
       continue;
      ifobj.iFolderWeb.IsSubscription = false;
      ifobj.iFolderState = iFolderState.Initial;
      addiFolderToListView( ifobj );
             oldHt.Add(ifobj.ID, ifobj.iFolderState);
     }
         string[] ifolders = new string[ht.Count];
         ht.Keys.CopyTo(ifolders, 0);
         foreach (string ifolderid in ifolders)
         {
            if (oldHt.ContainsKey(ifolderid) == false)
             {
                 removeTileListViewItem((TileListViewItem)ht[ifolderid]);
             }
         }
        }
        catch (Exception ex)
        {
     Novell.iFolderCom.MyMessageBox mmb =
             new MyMessageBox(TrayApp.Properties.Resources.iFolderError,
             TrayApp.Properties.Resources.iFolderErrorTitle,
             ex.Message, MyMessageBoxButtons.OK,
             MyMessageBoxIcon.Information);
     mmb.ShowDialog();
     mmb.Dispose();
        }
        iFolderView.Items.Sort();
        foreach (iFoldersListView ifListView in iFolderListViews.Values)
        {
     ifListView.FinalizeUpdate();
        }
        updateView();
        panel2.ResumeLayout();
     DomainsListUpdate();
     DomainsListUpdateComboBox();
        inRefresh = false;
     oldHt = null;
        Cursor.Current = Cursors.Default;
     if (!thumbnailView)
     {
         showiFolderinListView();
     }
        this.refreshTimer.Start();
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:94,代码来源: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: 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

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

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

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

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

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

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

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

示例14: add_Click

 private void add_Click(object sender, System.EventArgs e)
 {
     bool SharingIsDisabled = ifWebService.GetDisableSharingPolicy(currentUser.UserID, currentiFolder.ID, currentiFolder.OwnerID, currentiFolder.DomainID);
        if( SharingIsDisabled == true)
        {
     Picker picker = new Picker();
     picker.LoadPath = loadPath;
     picker.iFolderWebService = ifWebService;
     picker.Ht = userIDHT;
     picker.CurrentUser = currentUser;
     picker.DomainID = currentiFolder.DomainID;
     if (ownerLvi != null)
     {
      picker.CurrentOwner = newOwnerLvi == null ? ((ShareListMember)ownerLvi.Tag).iFolderUser : ((ShareListMember)newOwnerLvi.Tag).iFolderUser;
     }
     picker.CreateControl();
     DialogResult result = picker.ShowDialog();
     if (result == DialogResult.OK)
     {
      Cursor.Current = Cursors.WaitCursor;
      shareWith.SelectedItems.Clear();
      apply.Enabled = true;
      foreach (ListViewItem lvi in picker.AddedUsers)
      {
       iFolderUser user = picker.GetiFolderUserFromListViewItem(lvi);
       ListViewItem lvitem;
       lock (userIDHT)
       {
        lvitem = (ListViewItem)userIDHT[user.UserID];
       }
       if (lvitem == null)
       {
                     user.Rights = "ReadOnly";
        user.State = inviting;
        addiFolderUserToListView(user);
       }
      }
      foreach (iFolderUser ifUser in picker.RemovedList)
      {
       lock (subscrHT)
       {
        ListViewItem lvi = (ListViewItem)subscrHT[ifUser.ID];
        if (lvi != null)
        {
     if (removedList == null)
     {
      removedList = new ArrayList();
     }
     removedList.Add(lvi.Tag);
     lvi.Remove();
     subscrHT.Remove(ifUser.ID);
        }
        else
        {
     lock (userIDHT)
     {
      lvi = (ListViewItem)userIDHT[ifUser.UserID];
      if (lvi != null)
      {
       lvi.Remove();
      }
     }
        }
       }
       lock (userIDHT)
       {
        userIDHT.Remove(ifUser.UserID);
       }
      }
      Cursor.Current = Cursors.Default;
     }
        }
        else
        {
     MyMessageBox mmb = new MyMessageBox(resourceManager.GetString("DisableSharingError"), resourceManager.GetString("PolicyViolation"), string.Empty, MyMessageBoxButtons.OK, MyMessageBoxIcon.Information);
     mmb.ShowDialog();
        }
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:78,代码来源:iFolderAdvanced.cs

示例15: menuRemove_Click

 private void menuRemove_Click(object sender, System.EventArgs e)
 {
     if ( selectedItem != null )
        {
     iFolderWeb ifolder = ((iFolderObject)selectedItem.Tag).iFolderWeb;
     MyMessageBox mmb = null;
     if( ifolder.CurrentUserID == ifolder.OwnerID)
     {
      mmb = new Novell.iFolderCom.MyMessageBox(
       string.Format( TrayApp.Properties.Resources.deleteiFolder, ifolder.Name ),
       TrayApp.Properties.Resources.removeTitle,
       string.Empty,
       MyMessageBoxButtons.YesNo,
       MyMessageBoxIcon.Question,
       MyMessageBoxDefaultButton.Button2);
     }
     else
     {
      mmb = new Novell.iFolderCom.MyMessageBox(
        TrayApp.Properties.Resources.RemoveMembershipMesg,
       string.Format(TrayApp.Properties.Resources.RemoveMembershipTitle, ifolder.Name ),
       string.Empty,
       MyMessageBoxButtons.YesNo,
       MyMessageBoxIcon.Question,
       MyMessageBoxDefaultButton.Button2);
     }
     if (mmb.ShowDialog() == DialogResult.Yes)
         {
      try
      {
                 Invalidate();
                 Update();
       if( ifolder.CurrentUserID == ifolder.OwnerID)
       {
        ifWebService.DeleteiFolder(ifolder.DomainID, ifolder.ID);
       }
       ifWebService.DeclineiFolderInvitation(ifolder.DomainID, ifolder.ID);
       lock (ht)
       {
        removeTileListViewItem( selectedItem );
       }
      }
      catch (Exception ex)
      {
       mmb = new MyMessageBox(TrayApp.Properties.Resources.declineError, TrayApp.Properties.Resources.errorTitle, ex.Message, MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
       mmb.ShowDialog();
      }
     }
        mmb.Dispose();
        }
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:51,代码来源:GlobalProperties.cs


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