private void menuAccept_Click(object sender, System.EventArgs e)
 {
     ListViewItem lvi = iFolderView.SelectedItems[0];
        iFolderWeb ifolder = ((iFolderObject)lvi.Tag).iFolderWeb;
        AcceptInvitation acceptInvitation = new AcceptInvitation(ifWebService, ifolder);
        acceptInvitation.ShowDialog();
 }
Example #2
0
 private void shellNotifyIcon_BalloonClick(object sender, EventArgs e)
 {
     switch (notifyType)
        {
     case NotifyType.Collision:
      ConflictResolver conflictResolver = new ConflictResolver();
      conflictResolver.StartPosition = FormStartPosition.CenterScreen;
      conflictResolver.iFolder = ifolderFromNotify;
      conflictResolver.iFolderWebService = ifWebService;
      conflictResolver.LoadPath = Application.StartupPath;
      conflictResolver.CreateControl();
      ShellNotifyIcon.SetForegroundWindow(conflictResolver.Handle);
      conflictResolver.Show();
      break;
     case NotifyType.NewMember:
      iFolderAdvanced ifolderAdvanced = new iFolderAdvanced();
      ifolderAdvanced.StartPosition = FormStartPosition.CenterScreen;
      ifolderAdvanced.CurrentiFolder = ifolderFromNotify;
      ifolderAdvanced.LoadPath = Application.StartupPath;
      ifolderAdvanced.ActiveTab = 1;
      ifolderAdvanced.EventClient = eventClient;
      ifolderAdvanced.CreateControl();
      ShellNotifyIcon.SetForegroundWindow(ifolderAdvanced.Handle);
      ifolderAdvanced.ShowDialog();
      ifolderAdvanced.Dispose();
      break;
     case NotifyType.Subscription:
      AcceptInvitation acceptInvitation = new AcceptInvitation(ifWebService, ifolderFromNotify);
      acceptInvitation.StartPosition = FormStartPosition.CenterScreen;
      acceptInvitation.Visible = false;
      acceptInvitation.CreateControl();
      ShellNotifyIcon.SetForegroundWindow(acceptInvitation.Handle);
      acceptInvitation.ShowDialog();
      acceptInvitation.Dispose();
      break;
     case NotifyType.SyncError:
      syncLog.Show();
      break;
     case NotifyType.CreateAccount:
      if (preferences.Visible)
      {
       preferences.Activate();
      }
      else
      {
       preferences.Show();
      }
      preferences.SelectAccounts(true);
      break;
        }
 }