فهرست منبع

Add GetQuitKeyAndName helper method.

BDisp 1 سال پیش
والد
کامیت
f925625baa
55فایلهای تغییر یافته به همراه59 افزوده شده و 55 حذف شده
  1. 5 1
      UICatalog/Scenario.cs
  2. 1 1
      UICatalog/Scenarios/Adornments.cs
  3. 1 1
      UICatalog/Scenarios/AllViewsTester.cs
  4. 1 1
      UICatalog/Scenarios/AnimationScenario.cs
  5. 1 1
      UICatalog/Scenarios/Bars.cs
  6. 1 1
      UICatalog/Scenarios/BasicColors.cs
  7. 1 1
      UICatalog/Scenarios/Buttons.cs
  8. 1 1
      UICatalog/Scenarios/ChineseUI.cs
  9. 1 1
      UICatalog/Scenarios/Clipping.cs
  10. 1 1
      UICatalog/Scenarios/ColorPicker.cs
  11. 1 1
      UICatalog/Scenarios/ComboBoxIteration.cs
  12. 1 1
      UICatalog/Scenarios/ComputedLayout.cs
  13. 1 1
      UICatalog/Scenarios/ContentScrolling.cs
  14. 1 1
      UICatalog/Scenarios/ContextMenus.cs
  15. 1 1
      UICatalog/Scenarios/DatePickers.cs
  16. 1 1
      UICatalog/Scenarios/Dialogs.cs
  17. 1 1
      UICatalog/Scenarios/DimAutoDemo.cs
  18. 1 1
      UICatalog/Scenarios/DynamicMenuBar.cs
  19. 1 1
      UICatalog/Scenarios/Editor.cs
  20. 1 1
      UICatalog/Scenarios/FileDialogExamples.cs
  21. 1 1
      UICatalog/Scenarios/Generic.cs
  22. 1 1
      UICatalog/Scenarios/HotKeys.cs
  23. 1 1
      UICatalog/Scenarios/InvertColors.cs
  24. 1 1
      UICatalog/Scenarios/KeyBindings.cs
  25. 1 1
      UICatalog/Scenarios/Keys.cs
  26. 1 1
      UICatalog/Scenarios/LineCanvasExperiment.cs
  27. 1 1
      UICatalog/Scenarios/LineDrawing.cs
  28. 1 1
      UICatalog/Scenarios/ListColumns.cs
  29. 1 1
      UICatalog/Scenarios/ListViewWithSelection.cs
  30. 1 1
      UICatalog/Scenarios/ListsAndCombos.cs
  31. 1 1
      UICatalog/Scenarios/Localization.cs
  32. 1 1
      UICatalog/Scenarios/MenuBarScenario.cs
  33. 1 1
      UICatalog/Scenarios/MessageBoxes.cs
  34. 1 1
      UICatalog/Scenarios/Mouse.cs
  35. 1 1
      UICatalog/Scenarios/MultiColouredTable.cs
  36. 1 1
      UICatalog/Scenarios/Progress.cs
  37. 1 1
      UICatalog/Scenarios/ProgressBarStyles.cs
  38. 1 1
      UICatalog/Scenarios/Scrolling.cs
  39. 1 1
      UICatalog/Scenarios/SendKeys.cs
  40. 1 1
      UICatalog/Scenarios/ShadowStyles.cs
  41. 1 1
      UICatalog/Scenarios/Shortcuts.cs
  42. 1 1
      UICatalog/Scenarios/Sliders.cs
  43. 1 1
      UICatalog/Scenarios/Snake.cs
  44. 1 1
      UICatalog/Scenarios/SpinnerStyles.cs
  45. 1 1
      UICatalog/Scenarios/Text.cs
  46. 1 1
      UICatalog/Scenarios/TextAlignmentAndDirection.cs
  47. 1 1
      UICatalog/Scenarios/TextFormatterDemo.cs
  48. 1 1
      UICatalog/Scenarios/Threading.cs
  49. 1 1
      UICatalog/Scenarios/TimeAndDate.cs
  50. 1 1
      UICatalog/Scenarios/TrueColors.cs
  51. 1 1
      UICatalog/Scenarios/Unicode.cs
  52. 1 1
      UICatalog/Scenarios/ViewExperiments.cs
  53. 1 1
      UICatalog/Scenarios/VkeyPacketSimulator.cs
  54. 1 1
      UICatalog/Scenarios/WindowsAndFrameViews.cs
  55. 1 1
      UICatalog/Scenarios/Wizards.cs

+ 5 - 1
UICatalog/Scenario.cs

@@ -93,6 +93,10 @@ public class Scenario : IDisposable
     /// <returns></returns>
     /// <returns></returns>
     public string GetName () { return ScenarioMetadata.GetName (GetType ()); }
     public string GetName () { return ScenarioMetadata.GetName (GetType ()); }
 
 
+    /// <summary>Helper to get the <see cref="Application.QuitKey"/> and the <see cref="Scenario"/> Name (defined in <see cref="ScenarioMetadata"/>)</summary>
+    /// <returns></returns>
+    public string GetQuitKeyAndName () { return $"{Application.QuitKey} to Quit - Scenario: {GetName ()}"; }
+
     /// <summary>
     /// <summary>
     ///     Returns a list of all <see cref="Scenario"/> instanaces defined in the project, sorted by
     ///     Returns a list of all <see cref="Scenario"/> instanaces defined in the project, sorted by
     ///     <see cref="ScenarioMetadata.Name"/>.
     ///     <see cref="ScenarioMetadata.Name"/>.
@@ -165,7 +169,7 @@ public class Scenario : IDisposable
 
 
         Win = new ()
         Win = new ()
         {
         {
-            Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}",
+            Title = GetQuitKeyAndName (),
             X = 0,
             X = 0,
             Y = 0,
             Y = 0,
             Width = Dim.Fill (),
             Width = Dim.Fill (),

+ 1 - 1
UICatalog/Scenarios/Adornments.cs

@@ -13,7 +13,7 @@ public class Adornments : Scenario
 
 
         Window app = new ()
         Window app = new ()
         {
         {
-            Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}"
+            Title = GetQuitKeyAndName ()
         };
         };
 
 
         var editor = new AdornmentsEditor
         var editor = new AdornmentsEditor

+ 1 - 1
UICatalog/Scenarios/AllViewsTester.cs

@@ -53,7 +53,7 @@ public class AllViewsTester : Scenario
 
 
         var app = new Window
         var app = new Window
         {
         {
-            Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}",
+            Title = GetQuitKeyAndName (),
             ColorScheme = Colors.ColorSchemes ["TopLevel"]
             ColorScheme = Colors.ColorSchemes ["TopLevel"]
         };
         };
 
 

+ 1 - 1
UICatalog/Scenarios/AnimationScenario.cs

@@ -23,7 +23,7 @@ public class AnimationScenario : Scenario
 
 
         var win = new Window
         var win = new Window
         {
         {
-            Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}",
+            Title = GetQuitKeyAndName (),
             X = 0,
             X = 0,
             Y = 0,
             Y = 0,
             Width = Dim.Fill (),
             Width = Dim.Fill (),

+ 1 - 1
UICatalog/Scenarios/Bars.cs

@@ -28,7 +28,7 @@ public class Bars : Scenario
     // QuitKey and it only sticks if changed after init
     // QuitKey and it only sticks if changed after init
     private void App_Loaded (object sender, EventArgs e)
     private void App_Loaded (object sender, EventArgs e)
     {
     {
-        Application.Top.Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}";
+        Application.Top.Title = GetQuitKeyAndName ();
 
 
         ObservableCollection<string> eventSource = new ();
         ObservableCollection<string> eventSource = new ();
         ListView eventLog = new ListView ()
         ListView eventLog = new ListView ()

+ 1 - 1
UICatalog/Scenarios/BasicColors.cs

@@ -14,7 +14,7 @@ public class BasicColors : Scenario
 
 
         Window app = new ()
         Window app = new ()
         {
         {
-            Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}",
+            Title = GetQuitKeyAndName (),
         };
         };
 
 
         var vx = 30;
         var vx = 30;

+ 1 - 1
UICatalog/Scenarios/Buttons.cs

@@ -18,7 +18,7 @@ public class Buttons : Scenario
 
 
         Window main = new ()
         Window main = new ()
         {
         {
-            Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}"
+            Title = GetQuitKeyAndName ()
         };
         };
 
 
         // Add a label & text field so we can demo IsDefault
         // Add a label & text field so we can demo IsDefault

+ 1 - 1
UICatalog/Scenarios/ChineseUI.cs

@@ -12,7 +12,7 @@ public class ChineseUI : Scenario
 
 
         var win = new Window
         var win = new Window
         {
         {
-            Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}",
+            Title = GetQuitKeyAndName (),
             X = 0,
             X = 0,
             Y = 0,
             Y = 0,
             Width = Dim.Fill (),
             Width = Dim.Fill (),

+ 1 - 1
UICatalog/Scenarios/Clipping.cs

@@ -11,7 +11,7 @@ public class Clipping : Scenario
     public override void Main ()
     public override void Main ()
     {
     {
         Application.Init ();
         Application.Init ();
-        var win = new Window { Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}" };
+        var win = new Window { Title = GetQuitKeyAndName () };
 
 
         var label = new Label
         var label = new Label
         {
         {

+ 1 - 1
UICatalog/Scenarios/ColorPicker.cs

@@ -30,7 +30,7 @@ public class ColorPickers : Scenario
 
 
         Window app = new ()
         Window app = new ()
         {
         {
-            Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}",
+            Title = GetQuitKeyAndName (),
         };
         };
 
 
         // Foreground ColorPicker.
         // Foreground ColorPicker.

+ 1 - 1
UICatalog/Scenarios/ComboBoxIteration.cs

@@ -14,7 +14,7 @@ public class ComboBoxIteration : Scenario
         Application.Init ();
         Application.Init ();
         ObservableCollection<string> items = ["one", "two", "three"];
         ObservableCollection<string> items = ["one", "two", "three"];
 
 
-        var win = new Window { Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}" };
+        var win = new Window { Title = GetQuitKeyAndName () };
         var lbListView = new Label { Width = 10, Height = 1 };
         var lbListView = new Label { Width = 10, Height = 1 };
         win.Add (lbListView);
         win.Add (lbListView);
 
 

+ 1 - 1
UICatalog/Scenarios/ComputedLayout.cs

@@ -20,7 +20,7 @@ public class ComputedLayout : Scenario
 
 
         Window app = new ()
         Window app = new ()
         {
         {
-            Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}",
+            Title = GetQuitKeyAndName (),
         };
         };
 
 
         // Demonstrate using Dim to create a horizontal ruler that always measures the parent window's width
         // Demonstrate using Dim to create a horizontal ruler that always measures the parent window's width

+ 1 - 1
UICatalog/Scenarios/ContentScrolling.cs

@@ -104,7 +104,7 @@ public class ContentScrolling : Scenario
 
 
         Window app = new ()
         Window app = new ()
         {
         {
-            Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}",
+            Title = GetQuitKeyAndName (),
 
 
             // Use a different colorscheme so ViewSettings.ClearContentOnly is obvious
             // Use a different colorscheme so ViewSettings.ClearContentOnly is obvious
             ColorScheme = Colors.ColorSchemes ["Toplevel"]
             ColorScheme = Colors.ColorSchemes ["Toplevel"]

+ 1 - 1
UICatalog/Scenarios/ContextMenus.cs

@@ -25,7 +25,7 @@ public class ContextMenus : Scenario
         // Setup - Create a top-level application window and configure it.
         // Setup - Create a top-level application window and configure it.
         Window appWindow = new ()
         Window appWindow = new ()
         {
         {
-            Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}"
+            Title = GetQuitKeyAndName ()
         };
         };
 
 
         var text = "Context Menu";
         var text = "Context Menu";

+ 1 - 1
UICatalog/Scenarios/DatePickers.cs

@@ -13,7 +13,7 @@ public class DatePickers : Scenario
 
 
         Window app = new ()
         Window app = new ()
         {
         {
-            Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}"
+            Title = GetQuitKeyAndName ()
         };
         };
 
 
         var datePicker = new DatePicker { Y = Pos.Center (), X = Pos.Center () };
         var datePicker = new DatePicker { Y = Pos.Center (), X = Pos.Center () };

+ 1 - 1
UICatalog/Scenarios/Dialogs.cs

@@ -17,7 +17,7 @@ public class Dialogs : Scenario
 
 
         Window app = new ()
         Window app = new ()
         {
         {
-            Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}"
+            Title = GetQuitKeyAndName ()
         };
         };
 
 
         var frame = new FrameView
         var frame = new FrameView

+ 1 - 1
UICatalog/Scenarios/DimAutoDemo.cs

@@ -15,7 +15,7 @@ public class DimAutoDemo : Scenario
         // Setup - Create a top-level application window and configure it.
         // Setup - Create a top-level application window and configure it.
         Window appWindow = new ()
         Window appWindow = new ()
         {
         {
-            Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}",
+            Title = GetQuitKeyAndName (),
         };
         };
 
 
         // For diagnostics
         // For diagnostics

+ 1 - 1
UICatalog/Scenarios/DynamicMenuBar.cs

@@ -21,7 +21,7 @@ public class DynamicMenuBar : Scenario
         // Setup - Create a top-level application window and configure it.
         // Setup - Create a top-level application window and configure it.
         DynamicMenuBarSample appWindow = new ()
         DynamicMenuBarSample appWindow = new ()
         {
         {
-            Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}"
+            Title = GetQuitKeyAndName ()
         };
         };
 
 
         // Run - Start the application.
         // Run - Start the application.

+ 1 - 1
UICatalog/Scenarios/Editor.cs

@@ -46,7 +46,7 @@ public class Editor : Scenario
         // Setup - Create a top-level application window and configure it.
         // Setup - Create a top-level application window and configure it.
         _appWindow = new ()
         _appWindow = new ()
         {
         {
-            //Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}",
+            //Title = GetQuitKeyAndName (),
             Title = _fileName ?? "Untitled",
             Title = _fileName ?? "Untitled",
             BorderStyle = LineStyle.None
             BorderStyle = LineStyle.None
         };
         };

+ 1 - 1
UICatalog/Scenarios/FileDialogExamples.cs

@@ -31,7 +31,7 @@ public class FileDialogExamples : Scenario
         Application.Init ();
         Application.Init ();
         var y = 0;
         var y = 0;
         var x = 1;
         var x = 1;
-        var win = new Window { Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}" };
+        var win = new Window { Title = GetQuitKeyAndName () };
 
 
         _cbMustExist = new CheckBox { State = CheckState.Checked, Y = y++, X = x, Text = "Must Exist" };
         _cbMustExist = new CheckBox { State = CheckState.Checked, Y = y++, X = x, Text = "Must Exist" };
         win.Add (_cbMustExist);
         win.Add (_cbMustExist);

+ 1 - 1
UICatalog/Scenarios/Generic.cs

@@ -14,7 +14,7 @@ public sealed class MyScenario : Scenario
         // Setup - Create a top-level application window and configure it.
         // Setup - Create a top-level application window and configure it.
         Window appWindow = new ()
         Window appWindow = new ()
         {
         {
-            Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}",
+            Title = GetQuitKeyAndName (),
         };
         };
 
 
         var button = new Button { X = Pos.Center (), Y = Pos.Center (), Text = "Press me!" };
         var button = new Button { X = Pos.Center (), Y = Pos.Center (), Text = "Press me!" };

+ 1 - 1
UICatalog/Scenarios/HotKeys.cs

@@ -13,7 +13,7 @@ public class HotKeys : Scenario
 
 
         Window app = new ()
         Window app = new ()
         {
         {
-            Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}"
+            Title = GetQuitKeyAndName ()
         };
         };
 
 
         var textViewLabel = new Label { Text = "_TextView:", X = 0, Y = 0 };
         var textViewLabel = new Label { Text = "_TextView:", X = 0, Y = 0 };

+ 1 - 1
UICatalog/Scenarios/InvertColors.cs

@@ -15,7 +15,7 @@ public class InvertColors : Scenario
         Application.Init ();
         Application.Init ();
         var win = new Window
         var win = new Window
         {
         {
-            Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}",
+            Title = GetQuitKeyAndName (),
             ColorScheme = Colors.ColorSchemes ["TopLevel"]
             ColorScheme = Colors.ColorSchemes ["TopLevel"]
         };
         };
 
 

+ 1 - 1
UICatalog/Scenarios/KeyBindings.cs

@@ -22,7 +22,7 @@ public sealed class KeyBindings : Scenario
         // Setup - Create a top-level application window and configure it.
         // Setup - Create a top-level application window and configure it.
         Window appWindow = new ()
         Window appWindow = new ()
         {
         {
-            Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}",
+            Title = GetQuitKeyAndName (),
             SuperViewRendersLineCanvas = true,
             SuperViewRendersLineCanvas = true,
         };
         };
 
 

+ 1 - 1
UICatalog/Scenarios/Keys.cs

@@ -13,7 +13,7 @@ public class Keys : Scenario
         ObservableCollection<string> keyPressedList = [];
         ObservableCollection<string> keyPressedList = [];
         ObservableCollection<string> invokingKeyBindingsList = new ();
         ObservableCollection<string> invokingKeyBindingsList = new ();
 
 
-        var win = new Window { Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}" };
+        var win = new Window { Title = GetQuitKeyAndName () };
         var editLabel = new Label { X = 0, Y = 0, Text = "Type text here:" };
         var editLabel = new Label { X = 0, Y = 0, Text = "Type text here:" };
         win.Add (editLabel);
         win.Add (editLabel);
 
 

+ 1 - 1
UICatalog/Scenarios/LineCanvasExperiment.cs

@@ -14,7 +14,7 @@ public class LineCanvasExperiment : Scenario
 
 
         Window app = new ()
         Window app = new ()
         {
         {
-            Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}"
+            Title = GetQuitKeyAndName ()
         };
         };
 
 
         var frame1 = new FrameView
         var frame1 = new FrameView

+ 1 - 1
UICatalog/Scenarios/LineDrawing.cs

@@ -13,7 +13,7 @@ public class LineDrawing : Scenario
     public override void Main ()
     public override void Main ()
     {
     {
         Application.Init ();
         Application.Init ();
-        var win = new Window { Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}" };
+        var win = new Window { Title = GetQuitKeyAndName () };
         var canvas = new DrawingArea { X = 0, Y = 0, Width = Dim.Fill (), Height = Dim.Fill () };
         var canvas = new DrawingArea { X = 0, Y = 0, Width = Dim.Fill (), Height = Dim.Fill () };
 
 
         var tools = new ToolsView { Title = "Tools", X = Pos.Right (canvas) - 20, Y = 2 };
         var tools = new ToolsView { Title = "Tools", X = Pos.Right (canvas) - 20, Y = 2 };

+ 1 - 1
UICatalog/Scenarios/ListColumns.cs

@@ -56,7 +56,7 @@ public class ListColumns : Scenario
         Toplevel top = new ();
         Toplevel top = new ();
         Window appWindow = new ()
         Window appWindow = new ()
         {
         {
-            Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}"
+            Title = GetQuitKeyAndName ()
         };
         };
 
 
         _listColView = new ()
         _listColView = new ()

+ 1 - 1
UICatalog/Scenarios/ListViewWithSelection.cs

@@ -27,7 +27,7 @@ public class ListViewWithSelection : Scenario
 
 
         _appWindow = new ()
         _appWindow = new ()
         {
         {
-            Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}",
+            Title = GetQuitKeyAndName (),
         };
         };
 
 
         _scenarios = GetScenarios ();
         _scenarios = GetScenarios ();

+ 1 - 1
UICatalog/Scenarios/ListsAndCombos.cs

@@ -32,7 +32,7 @@ public class ListsAndCombos : Scenario
             }
             }
         }
         }
 
 
-        var win = new Window { Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}" };
+        var win = new Window { Title = GetQuitKeyAndName () };
         // ListView
         // ListView
         var lbListView = new Label
         var lbListView = new Label
         {
         {

+ 1 - 1
UICatalog/Scenarios/Localization.cs

@@ -45,7 +45,7 @@ public class Localization : Scenario
     {
     {
         Application.Init ();
         Application.Init ();
         var top = new Toplevel ();
         var top = new Toplevel ();
-        var win = new Window { Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}" };
+        var win = new Window { Title = GetQuitKeyAndName () };
         _cultureInfoSource = Application.SupportedCultures.Append (CultureInfo.InvariantCulture).ToArray ();
         _cultureInfoSource = Application.SupportedCultures.Append (CultureInfo.InvariantCulture).ToArray ();
 
 
         _cultureInfoNameSource = Application.SupportedCultures.Select (c => $"{c.NativeName} ({c.Name})")
         _cultureInfoNameSource = Application.SupportedCultures.Select (c => $"{c.NativeName} ({c.Name})")

+ 1 - 1
UICatalog/Scenarios/MenuBarScenario.cs

@@ -22,7 +22,7 @@ public class MenuBarScenario : Scenario
         // Setup - Create a top-level application window and configure it.
         // Setup - Create a top-level application window and configure it.
         Window appWindow = new ()
         Window appWindow = new ()
         {
         {
-            Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}",
+            Title = GetQuitKeyAndName (),
             BorderStyle = LineStyle.None
             BorderStyle = LineStyle.None
         };
         };
 
 

+ 1 - 1
UICatalog/Scenarios/MessageBoxes.cs

@@ -15,7 +15,7 @@ public class MessageBoxes : Scenario
 
 
         Window app = new ()
         Window app = new ()
         {
         {
-            Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}"
+            Title = GetQuitKeyAndName ()
         };
         };
 
 
         var frame = new FrameView
         var frame = new FrameView

+ 1 - 1
UICatalog/Scenarios/Mouse.cs

@@ -15,7 +15,7 @@ public class Mouse : Scenario
 
 
         Window win = new ()
         Window win = new ()
         {
         {
-            Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}"
+            Title = GetQuitKeyAndName ()
         };
         };
 
 
         Slider<MouseFlags> filterSlider = new ()
         Slider<MouseFlags> filterSlider = new ()

+ 1 - 1
UICatalog/Scenarios/MultiColouredTable.cs

@@ -22,7 +22,7 @@ public class MultiColouredTable : Scenario
         // Setup - Create a top-level application window and configure it.
         // Setup - Create a top-level application window and configure it.
         Toplevel appWindow = new ()
         Toplevel appWindow = new ()
         {
         {
-            Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}"
+            Title = GetQuitKeyAndName ()
         };
         };
 
 
         _tableView = new () { X = 0, Y = 1, Width = Dim.Fill (), Height = Dim.Fill (1) };
         _tableView = new () { X = 0, Y = 1, Width = Dim.Fill (), Height = Dim.Fill (1) };

+ 1 - 1
UICatalog/Scenarios/Progress.cs

@@ -24,7 +24,7 @@ public class Progress : Scenario
     public override void Main ()
     public override void Main ()
     {
     {
         Application.Init ();
         Application.Init ();
-        win = new Window { Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}" };
+        win = new Window { Title = GetQuitKeyAndName () };
         // Demo #1 - Use System.Timer (and threading)
         // Demo #1 - Use System.Timer (and threading)
         var systemTimerDemo = new ProgressDemo
         var systemTimerDemo = new ProgressDemo
         {
         {

+ 1 - 1
UICatalog/Scenarios/ProgressBarStyles.cs

@@ -30,7 +30,7 @@ public class ProgressBarStyles : Scenario
 
 
         Window app = new ()
         Window app = new ()
         {
         {
-            Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}", BorderStyle = LineStyle.Single,
+            Title = GetQuitKeyAndName (), BorderStyle = LineStyle.Single,
         };
         };
 
 
         var editor = new AdornmentsEditor ()
         var editor = new AdornmentsEditor ()

+ 1 - 1
UICatalog/Scenarios/Scrolling.cs

@@ -19,7 +19,7 @@ public class Scrolling : Scenario
 
 
         var app = new Window
         var app = new Window
         {
         {
-            Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}",
+            Title = GetQuitKeyAndName (),
 
 
             // Offset to stress clipping
             // Offset to stress clipping
             X = 3,
             X = 3,

+ 1 - 1
UICatalog/Scenarios/SendKeys.cs

@@ -10,7 +10,7 @@ public class SendKeys : Scenario
     public override void Main ()
     public override void Main ()
     {
     {
         Application.Init ();
         Application.Init ();
-        var win = new Window { Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}" };
+        var win = new Window { Title = GetQuitKeyAndName () };
         var label = new Label { X = Pos.Center (), Y = Pos.Center () - 6, Text = "Insert the text to send:" };
         var label = new Label { X = Pos.Center (), Y = Pos.Center () - 6, Text = "Insert the text to send:" };
         win.Add (label);
         win.Add (label);
 
 

+ 1 - 1
UICatalog/Scenarios/ShadowStyles.cs

@@ -17,7 +17,7 @@ public class ShadowStyles : Scenario
 
 
         Window app = new ()
         Window app = new ()
         {
         {
-            Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}"
+            Title = GetQuitKeyAndName ()
         };
         };
 
 
 
 

+ 1 - 1
UICatalog/Scenarios/Shortcuts.cs

@@ -31,7 +31,7 @@ public class Shortcuts : Scenario
     private void App_Loaded (object sender, EventArgs e)
     private void App_Loaded (object sender, EventArgs e)
     {
     {
         Application.QuitKey = Key.Z.WithCtrl;
         Application.QuitKey = Key.Z.WithCtrl;
-        Application.Top.Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}";
+        Application.Top.Title = GetQuitKeyAndName ();
 
 
         ObservableCollection<string> eventSource = new ();
         ObservableCollection<string> eventSource = new ();
 
 

+ 1 - 1
UICatalog/Scenarios/Sliders.cs

@@ -129,7 +129,7 @@ public class Sliders : Scenario
 
 
         Window app = new ()
         Window app = new ()
         {
         {
-            Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}"
+            Title = GetQuitKeyAndName ()
         };
         };
 
 
         MakeSliders (
         MakeSliders (

+ 1 - 1
UICatalog/Scenarios/Snake.cs

@@ -18,7 +18,7 @@ public class Snake : Scenario
     public override void Main ()
     public override void Main ()
     {
     {
         Application.Init ();
         Application.Init ();
-        var win = new Window { Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}" };
+        var win = new Window { Title = GetQuitKeyAndName () };
 
 
         var state = new SnakeState ();
         var state = new SnakeState ();
 
 

+ 1 - 1
UICatalog/Scenarios/SpinnerStyles.cs

@@ -18,7 +18,7 @@ public class SpinnerViewStyles : Scenario
 
 
         Window app = new ()
         Window app = new ()
         {
         {
-            Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}"
+            Title = GetQuitKeyAndName ()
         };
         };
 
 
         const int DEFAULT_DELAY = 130;
         const int DEFAULT_DELAY = 130;

+ 1 - 1
UICatalog/Scenarios/Text.cs

@@ -20,7 +20,7 @@ public class Text : Scenario
     public override void Main ()
     public override void Main ()
     {
     {
         Application.Init ();
         Application.Init ();
-        var win = new Window { Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}" };
+        var win = new Window { Title = GetQuitKeyAndName () };
         // TextField is a simple, single-line text input control
         // TextField is a simple, single-line text input control
         var label = new Label { Text = "_TextField:" };
         var label = new Label { Text = "_TextField:" };
         win.Add (label);
         win.Add (label);

+ 1 - 1
UICatalog/Scenarios/TextAlignmentAndDirection.cs

@@ -16,7 +16,7 @@ public class TextAlignmentAndDirection : Scenario
 
 
         Window app = new ()
         Window app = new ()
         {
         {
-            Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}"
+            Title = GetQuitKeyAndName ()
         };
         };
 
 
         var txt = $"Hello World{Environment.NewLine}HELLO WORLD{Environment.NewLine}世界 您好";
         var txt = $"Hello World{Environment.NewLine}HELLO WORLD{Environment.NewLine}世界 您好";

+ 1 - 1
UICatalog/Scenarios/TextFormatterDemo.cs

@@ -16,7 +16,7 @@ public class TextFormatterDemo : Scenario
 
 
         var app = new Window
         var app = new Window
         {
         {
-            Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}"
+            Title = GetQuitKeyAndName ()
         };
         };
 
 
         // Make Win smaller so sizing the window horizontally will make the
         // Make Win smaller so sizing the window horizontally will make the

+ 1 - 1
UICatalog/Scenarios/Threading.cs

@@ -23,7 +23,7 @@ public class Threading : Scenario
     public override void Main ()
     public override void Main ()
     {
     {
         Application.Init ();
         Application.Init ();
-        var win = new Window { Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}" };
+        var win = new Window { Title = GetQuitKeyAndName () };
         _action = LoadData;
         _action = LoadData;
 
 
         _lambda = async () =>
         _lambda = async () =>

+ 1 - 1
UICatalog/Scenarios/TimeAndDate.cs

@@ -18,7 +18,7 @@ public class TimeAndDate : Scenario
     public override void Main ()
     public override void Main ()
     {
     {
         Application.Init ();
         Application.Init ();
-        var win = new Window { Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}" };
+        var win = new Window { Title = GetQuitKeyAndName () };
         var longTime = new TimeField
         var longTime = new TimeField
         {
         {
             X = Pos.Center (),
             X = Pos.Center (),

+ 1 - 1
UICatalog/Scenarios/TrueColors.cs

@@ -13,7 +13,7 @@ public class TrueColors : Scenario
 
 
         Window app = new ()
         Window app = new ()
         {
         {
-            Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}"
+            Title = GetQuitKeyAndName ()
         };
         };
 
 
         var x = 2;
         var x = 2;

+ 1 - 1
UICatalog/Scenarios/Unicode.cs

@@ -34,7 +34,7 @@ public class UnicodeInMenu : Scenario
         // Setup - Create a top-level application window and configure it.
         // Setup - Create a top-level application window and configure it.
         Window appWindow = new ()
         Window appWindow = new ()
         {
         {
-            Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}"
+            Title = GetQuitKeyAndName ()
         };
         };
 
 
         var menu = new MenuBar
         var menu = new MenuBar

+ 1 - 1
UICatalog/Scenarios/ViewExperiments.cs

@@ -15,7 +15,7 @@ public class ViewExperiments : Scenario
 
 
         Window app = new ()
         Window app = new ()
         {
         {
-            Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}"
+            Title = GetQuitKeyAndName ()
         };
         };
 
 
         var containerLabel = new Label
         var containerLabel = new Label

+ 1 - 1
UICatalog/Scenarios/VkeyPacketSimulator.cs

@@ -19,7 +19,7 @@ public class VkeyPacketSimulator : Scenario
     public override void Main ()
     public override void Main ()
     {
     {
         Application.Init ();
         Application.Init ();
-        var win = new Window { Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}" };
+        var win = new Window { Title = GetQuitKeyAndName () };
 
 
         var label = new Label { X = Pos.Center (), Text = "Input" };
         var label = new Label { X = Pos.Center (), Text = "Input" };
         win.Add (label);
         win.Add (label);

+ 1 - 1
UICatalog/Scenarios/WindowsAndFrameViews.cs

@@ -14,7 +14,7 @@ public class WindowsAndFrameViews : Scenario
 
 
         Window app = new ()
         Window app = new ()
         {
         {
-            Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}"
+            Title = GetQuitKeyAndName ()
         };
         };
 
 
         static int About ()
         static int About ()

+ 1 - 1
UICatalog/Scenarios/Wizards.cs

@@ -12,7 +12,7 @@ public class Wizards : Scenario
     public override void Main ()
     public override void Main ()
     {
     {
         Application.Init ();
         Application.Init ();
-        var win = new Window { Title = $"{Application.QuitKey} to Quit - Scenario: {GetName ()}" };
+        var win = new Window { Title = GetQuitKeyAndName () };
 
 
         var frame = new FrameView
         var frame = new FrameView
         {
         {