Ejemplo n.º 1
0
 private void notifyIcon_MouseDown(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left)
     {
         if (_controlRecentApplicationsForm != null)
         {
             _controlRecentApplicationsFormClosedAt = DateTime.Now;
             _controlRecentApplicationsForm.Closed -= _controlRecentApplicationsForm_Closed;
             _controlRecentApplicationsForm         = null;
         }
     }
 }
Ejemplo n.º 2
0
 private void notifyIcon_MouseUp(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left)
     {
         if (_controlRecentApplicationsForm == null && _controlRecentApplicationsFormClosedAt.AddMilliseconds(500) < DateTime.Now)
         {
             _controlRecentApplicationsForm         = new ControlRecentApplicationsForm(_config.RecentUsages, Restore);
             _controlRecentApplicationsForm.Closed += _controlRecentApplicationsForm_Closed;
             _controlRecentApplicationsForm.Show();
         }
     }
 }
Ejemplo n.º 3
0
 public MainForm()
 {
     InitializeComponent();
     Text                                  += " (build " + GetBuildTag() + ")";
     _closing                               = false;
     _discardEvents                         = false;
     _selectingApplicationBySet             = false;
     _controlRecentApplicationsForm         = null;
     _controlRecentApplicationsFormClosedAt = DateTime.MinValue;
     _config                                = RegistryHandler.LoadConfiguration();
     ApplicationControl.Configuration       = _config;
     _timer                                 = new Timer()
     {
         Interval = 500
     };
     _timer.Tick += _timer_Tick;
     _timer.Start();
     toolStripMenuItemSystemTrayOptionsStartWithWindows.Checked = _config.StartWithWindows;
     listViewApplications.ListViewItemSorter = new ListViewItemComparer(0, 1);
     FillApplicationList();
 }
Ejemplo n.º 4
0
 private void _controlRecentApplicationsForm_Closed(object sender, EventArgs e)
 {
     _controlRecentApplicationsFormClosedAt = DateTime.Now;
     _controlRecentApplicationsForm.Closed -= _controlRecentApplicationsForm_Closed;
     _controlRecentApplicationsForm         = null;
 }