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 invokeiFolderProperties(TileListViewItem tlvi, int activeTab) { iFolderAdvanced ifolderAdvanced = new iFolderAdvanced(); ifolderAdvanced.CurrentiFolder = ((iFolderObject)tlvi.Tag).iFolderWeb; ifolderAdvanced.DomainName = ((DomainInformation)this.simiasWebService.GetDomainInformation(((iFolderObject)tlvi.Tag).iFolderWeb.DomainID)).Name; ifolderAdvanced.DomainUrl = ((DomainInformation)this.simiasWebService.GetDomainInformation(((iFolderObject)tlvi.Tag).iFolderWeb.DomainID)).HostUrl; ifolderAdvanced.LoadPath = Application.StartupPath; ifolderAdvanced.ActiveTab = activeTab; ifolderAdvanced.EventClient = eventClient; ifolderAdvanced.ShowDialog(); ifolderAdvanced.Dispose(); }
private void invokeiFolderProperties(ListViewItem lvi, int activeTab) { iFolderAdvanced ifolderAdvanced = new iFolderAdvanced(); ifolderAdvanced.CurrentiFolder = ((iFolderObject)lvi.Tag).iFolderWeb; ifolderAdvanced.LoadPath = Application.StartupPath; ifolderAdvanced.ActiveTab = activeTab; ifolderAdvanced.EventClient = eventClient; ifolderAdvanced.ShowDialog(); ifolderAdvanced.Dispose(); }
public void InvokeAdvancedDlg([MarshalAs(UnmanagedType.LPWStr)] string dllPath, [MarshalAs(UnmanagedType.LPWStr)] string path, int tabPage, bool modal) { string windowName = string.Format(resourceManager.GetString("iFolderProperties"), Path.GetFileName(path)); Win32Window win32Window = Win32Util.Win32Window.FindWindow(null, windowName); if (win32Window != null) { win32Window.BringWindowToTop(); } else { try { iFolderAdvanced ifolderAdvanced = new iFolderAdvanced(); ifolderAdvanced.Name = path; ifolderAdvanced.Text = windowName; connectToWebService(); ifolderAdvanced.CurrentiFolder = ifWebService.GetiFolderByLocalPath(path); ifolderAdvanced.LoadPath = dllPath; ifolderAdvanced.ActiveTab = tabPage; if (modal) { ifolderAdvanced.ShowDialog(); } else { ifolderAdvanced.Show(); } } catch (WebException e) { MyMessageBox mmb = new MyMessageBox(resourceManager.GetString("propertiesDialogError"), resourceManager.GetString("propertiesErrorTitle"), e.Message, MyMessageBoxButtons.OK, MyMessageBoxIcon.Error); mmb.ShowDialog(); ifWebService = null; if (e.Status == WebExceptionStatus.ProtocolError) { LocalService.ClearCredentials(); } } catch (Exception e) { MyMessageBox mmb = new MyMessageBox(resourceManager.GetString("propertiesDialogError"), resourceManager.GetString("propertiesErrorTitle"), e.Message, MyMessageBoxButtons.OK, MyMessageBoxIcon.Error); mmb.ShowDialog(); } } }
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; } }