Example #1
0
 private void AddProcessToWinList()
 {
     try
     {
         bool           optionChecked = false;
         WindowListItem selProc       = (WindowListItem)lbProcList.SelectedItem;
         ProcessOptions options       = new ProcessOptions();
         if (chkIgnoreWinTitle.IsChecked == true)
         {
             options.IgnoreProcessTitle = true;
             optionChecked = true;
         }
         uDebugLogAdd($"Adding process to window list, {selProc.Display}");
         if (optionChecked)
         {
             Toolbox.settings.AddWindow(WindowItem.Create(selProc.Process, selProc.Handle, options, selProc.Title));
         }
         else
         {
             Toolbox.settings.AddWindow(WindowItem.Create(selProc.Process, selProc.Handle, null, selProc.Title));
         }
         uDebugLogAdd("Added process to window list");
         SendUserUpdateNotification($"Added entry for this process: {selProc.Display} ");
         //lbProcList.Items.Remove(selProc);
         //uDebugLogAdd("Removed existing selected item from the window list");
     }
     catch (Exception ex)
     {
         LogException(ex);
     }
 }
Example #2
0
 private void MoveProcessOutline(Process proc)
 {
     try
     {
         processOutline.UpdateLocation(WindowItem.Create(proc));
     }
     catch (Exception ex)
     {
         LogException(ex);
     }
 }
Example #3
0
 private void ShowProcessOutline(Process proc)
 {
     try
     {
         WindowItem windowItem = WindowItem.Create(proc);
         if (processOutline == null)
         {
             processOutline = new ProcessOutline(windowItem);
             processOutline.Show();
         }
     }
     catch (Exception ex)
     {
         LogException(ex);
     }
 }