private void NotifyIcon_MouseDown(object sender, MouseEventArgs e) { // Have to set up this stuff here, because the menu is laid out before Opening() is called on it after mouse-up. if (CurrentTabPanel != null) { bool bCanSyncNow = CurrentTabPanel.CanSyncNow(); bool bCanLaunchEditor = CurrentTabPanel.CanLaunchEditor(); NotifyMenu_SyncNow.Visible = CurrentTabPanel.CanSyncNow(); NotifyMenu_LaunchEditor.Visible = CurrentTabPanel.CanLaunchEditor(); NotifyMenu_ExitSeparator.Visible = bCanSyncNow || bCanLaunchEditor; } }
public bool CanSyncNow() { return(CurrentTabPanel != null && CurrentTabPanel.CanSyncNow()); }