Browse Source

Updated BGWC

Tig 1 year ago
parent
commit
78a71feb59
2 changed files with 11 additions and 14 deletions
  1. 11 13
      UICatalog/Scenarios/BackgroundWorkerCollection.cs
  2. 0 1
      UICatalog/UICatalog.cs

+ 11 - 13
UICatalog/Scenarios/BackgroundWorkerCollection.cs

@@ -88,25 +88,23 @@ public class BackgroundWorkerCollection : Scenario
             ;
             _menu.MenuOpening += Menu_MenuOpening;
             Add (_menu);
-#if V2_STATUSBAR
             var statusBar = new StatusBar (
                                            new []
                                            {
-                                               new StatusItem (Application.QuitKey, $"{Application.QuitKey} to Quit", () => Quit ()),
-                                               new StatusItem (
-                                                               KeyCode.CtrlMask | KeyCode.R,
-                                                               "~^R~ Run Worker",
-                                                               () => _workerApp.RunWorker ()
-                                                              ),
-                                               new StatusItem (
-                                                               KeyCode.CtrlMask | KeyCode.C,
-                                                               "~^C~ Cancel Worker",
-                                                               () => _workerApp.CancelWorker ()
-                                                              )
+                                               new Shortcut (Application.QuitKey, $"Quit", Quit),
+                                               new Shortcut (
+                                                             Key.R.WithCtrl,
+                                                             "Run Worker",
+                                                             () => _workerApp.RunWorker ()
+                                                            ),
+                                               new Shortcut (
+                                                             Key.C.WithCtrl,
+                                                             "Cancel Worker",
+                                                             () => _workerApp.CancelWorker ()
+                                                            )
                                            }
                                           );
             Add (statusBar);
-#endif
             Ready += OverlappedMain_Ready;
             Activate += OverlappedMain_Activate;
             Deactivate += OverlappedMain_Deactivate;

+ 0 - 1
UICatalog/UICatalog.cs

@@ -347,7 +347,6 @@ internal class UICatalogApp
         // 'app' closed cleanly.
         foreach (Responder? inst in Responder.Instances)
         {
-            
             Debug.Assert (inst.WasDisposed);
         }