private void shellNotifyIcon_BalloonClick(object sender, EventArgs e)
 {
     bool added;
        switch (notifyType)
        {
     case NotifyType.Collision:
             if ( !GlobalProperties.AdvancedConflictResolver(ifWebService, ifolderFromNotify))
             {
                 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.DomainName = (simiasWebService.GetDomainInformation(ifolderFromNotify.DomainID)).Name;
             ifolderAdvanced.DomainUrl = (simiasWebService.GetDomainInformation(ifolderFromNotify.DomainID)).HostUrl;
      ifolderAdvanced.CreateControl();
      ShellNotifyIcon.SetForegroundWindow(ifolderAdvanced.Handle);
      ifolderAdvanced.ShowDialog();
      ifolderAdvanced.Dispose();
      break;
     case NotifyType.Subscription:
             if(ifolderFromNotify != null)
      globalProperties.AcceptiFolder( ifolderFromNotify, out added);
      break;
     case NotifyType.SyncError:
             if (infolog.Visible)
                 infolog.Activate();
             else
                 syncLog.Show();
             break;
        }
 }
 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;
        }
 }