Browse Source

Got Bar working agian.
Updaged UI Catalog to use Bar

Tig 1 year ago
parent
commit
817b9b858a
4 changed files with 187 additions and 191 deletions
  1. 32 79
      Terminal.Gui/Views/Bar.cs
  2. 42 36
      UICatalog/Scenarios/Bars.cs
  3. 0 1
      UICatalog/Scenarios/Shortcuts.cs
  4. 113 75
      UICatalog/UICatalog.cs

+ 32 - 79
Terminal.Gui/Views/Bar.cs

@@ -51,23 +51,24 @@ public class Bar : View
         //view.ColorScheme = ColorScheme;
 
         // Add any HotKey keybindings to our bindings
-        IEnumerable<KeyValuePair<Key, KeyBinding>> bindings = view.KeyBindings.Bindings.Where (b => b.Value.Scope == KeyBindingScope.HotKey);
+        //IEnumerable<KeyValuePair<Key, KeyBinding>> bindings = view.KeyBindings.Bindings.Where (b => b.Value.Scope == KeyBindingScope.HotKey);
+
+        //foreach (KeyValuePair<Key, KeyBinding> binding in bindings)
+        //{
+        //    AddCommand (
+        //                binding.Value.Commands [0],
+        //                () =>
+        //                {
+        //                    if (view is Shortcut shortcut)
+        //                    {
+        //                        return shortcut.CommandView.InvokeCommands (binding.Value.Commands);
+        //                    }
+
+        //                    return false;
+        //                });
+        //    KeyBindings.Add (binding.Key, binding.Value);
+        //}
 
-        foreach (KeyValuePair<Key, KeyBinding> binding in bindings)
-        {
-            AddCommand (
-                        binding.Value.Commands [0],
-                        () =>
-                        {
-                            if (view is Shortcut shortcut)
-                            {
-                                return shortcut.CommandView.InvokeCommands (binding.Value.Commands);
-                            }
-
-                            return false;
-                        });
-            KeyBindings.Add (binding.Key, binding.Value);
-        }
 
         base.Add (view);
     }
@@ -88,21 +89,18 @@ public class Bar : View
                         continue;
                     }
 
-                    if (prevBarItem == null)
+                    barItem.BorderStyle = LineStyle.Dashed;
+                    if (index == Subviews.Count - 1)
                     {
-                        barItem.X = 0;
+                        barItem.Border.Thickness = new Thickness (0, 0, 0, 0);
                     }
                     else
                     {
-                        // Make view to right be autosize
-                        //Subviews [^1].AutoSize = true;
-
-                        // Align the view to the right of the previous view
-                        barItem.X = Pos.Right (prevBarItem);
+                        barItem.Border.Thickness = new Thickness (0, 0, 1, 0);
                     }
 
+                    barItem.X = Pos.Align (Alignment.Start, AlignmentModes.IgnoreFirstOrLast);
                     barItem.Y = Pos.Center ();
-                    barItem.SetRelativeLayout (new Size (int.MaxValue, int.MaxValue));
                     prevBarItem = barItem;
                 }
 
@@ -115,38 +113,29 @@ public class Bar : View
 
                 int maxCommandWidth = 0;
                 int maxHelpWidth = 0;
+                int minKeyWidth = 0;
 
                 List<Shortcut> shortcuts = Subviews.Where (s => s is Shortcut && s.Visible).Cast<Shortcut> ().ToList ();
 
                 foreach (Shortcut shortcut in shortcuts)
                 {
                     // Let AutoSize do its thing to get the minimum width of each CommandView and HelpView
-                    shortcut.CommandView.SetRelativeLayout (new Size (int.MaxValue, int.MaxValue));
-                    shortcut.KeyView.SetRelativeLayout (new Size (int.MaxValue, int.MaxValue));
-                    shortcut.HelpView.SetRelativeLayout (new Size (int.MaxValue, int.MaxValue));
-                }
-
-                maxCommandWidth = shortcuts.Max (s => s.CommandView.Frame.Width);
-                maxHelpWidth = shortcuts.Max (s => s.HelpView.Frame.Width);
-
-                // Set the width of all CommandView's and HelpView's to the max width
-                foreach (Shortcut shortcut in shortcuts)
-                {
-                    shortcut.CommandView.Width = Dim.Auto (minimumContentDim: maxCommandWidth);
-                    shortcut.KeyView.Width = Dim.Auto ();
-                    shortcut.HelpView.Width = Dim.Auto (minimumContentDim: maxHelpWidth);
-
-                   // shortcut.LayoutSubviews ();
+                    //shortcut.CommandView.SetRelativeLayout (new Size (int.MaxValue, int.MaxValue));
+                    minKeyWidth = int.Max (minKeyWidth, shortcut.KeyView.Text.GetColumns ());
                 }
 
                 // Set the overall size of the Bar and arrange the views vertically
-
                 var maxBarItemWidth = 0;
 
                 for (var index = 0; index < Subviews.Count; index++)
                 {
                     View barItem = Subviews [index];
 
+                    if (barItem is Shortcut scBarItem)
+                    {
+                        scBarItem.MinimumKeyViewSize = minKeyWidth;
+                    }
+
                     if (!barItem.Visible)
                     {
                         continue;
@@ -166,7 +155,6 @@ public class Bar : View
 
                     if (barItem is Shortcut shortcut)
                     {
-                        //shortcut.SetRelativeLayout (new (int.MaxValue, int.MaxValue));
                         maxBarItemWidth = Math.Max (maxBarItemWidth, shortcut.Frame.Width);
                     }
                     else
@@ -179,45 +167,10 @@ public class Bar : View
 
                 foreach (Shortcut shortcut in shortcuts)
                 {
-                    if (Width is DimAuto)
-                    {
-                        shortcut.Width = Dim.Auto (DimAutoStyle.Content, minimumContentDim: maxBarItemWidth);
-                    }
-                    else
-                    {
-                        //shortcut._container.Width = Dim.Fill ();
-                       // shortcut.Width = Dim.Fill ();
-                    }
-
-                    shortcut.LayoutSubviews ();
+                    shortcut.Width = maxBarItemWidth;
                 }
-                
-
-                //for (var index = 0; index < Subviews.Count; index++)
-                //{
-                //    var shortcut = Subviews [index] as Shortcut;
-
-                //    if (shortcut is { Visible: false })
-                //    {
-                //        continue;
-                //    }
-
-                //    if (Width is DimAuto)
-                //    {
-                //        shortcut._container.Width = Dim.Auto (DimAutoStyle.Content, minimumContentDim: maxBarItemWidth);
-                //    }
-                //    else
-                //    {
-                //        shortcut._container.Width = Dim.Fill ();
-                //        shortcut.Width = Dim.Fill ();
-                //    }
-
-                //    //shortcut.SetContentSize (new (maxBarItemWidth, 1));
-                //    //shortcut.Width = Dim.Auto (DimAutoStyle.Content, minimumContentDim: int.Max(maxBarItemWidth, GetContentSize().Width));
-
-                //}
-
 
+                Height = Subviews.Count;
 
                 break;
         }

+ 42 - 36
UICatalog/Scenarios/Bars.cs

@@ -1,6 +1,7 @@
 using System;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
+using System.Linq;
 using System.Text;
 using Terminal.Gui;
 
@@ -35,7 +36,7 @@ public class Bars : Scenario
         {
             X = Pos.AnchorEnd (),
             Width = 50,
-            Height = Dim.Fill (),
+            Height = Dim.Fill (3),
             ColorScheme = Colors.ColorSchemes ["Toplevel"],
             Source = new ListWrapper<string> (eventSource)
         };
@@ -46,28 +47,19 @@ public class Bars : Scenario
             Title = "_Zigzag",
             Key = Key.G.WithCtrl,
             Text = "Gonna zig zag",
-            KeyBindingScope = KeyBindingScope.HotKey,
         };
         shortcut1.Accept += (s, e) =>
                             {
                                 eventSource.Add ($"Accept: {s}");
                                 eventLog.MoveDown ();
                             };
-        Application.Top.Add (shortcut1);
-        shortcut1.SetFocus ();
-
-        //var shortcut2 = new Shortcut
-        //{
-        //    Title = "Za_G",
-        //    Text = "Gonna zag",
-        //    Key = Key.G.WithAlt,
-        //    KeyBindingScope = KeyBindingScope.HotKey,
-        //    Command = Command.Accept,
-        //    X = Pos.Left (shortcut1),
-        //    Y = Pos.Bottom (shortcut1),
-        //    //Width = 50,
-        //};
 
+        var shortcut2 = new Shortcut
+        {
+            Title = "Za_G",
+            Text = "Gonna zag",
+            Key = Key.G.WithAlt,
+        };
 
         //var shortcut3 = new Shortcut
         //{
@@ -112,15 +104,14 @@ public class Bars : Scenario
         //                        eventLog.MoveDown ();
         //                    };
 
-        //var bar = new Bar
-        //{
-        //    X = 2,
-        //    Y = Pos.Bottom(shortcut1),
-        //    Orientation = Orientation.Vertical,
-        //    StatusBarStyle = false,
-        //    Width = Dim.Percent(40)
-        //};
-        //bar.Add (shortcut3, shortcut4);
+        var bar = new Bar
+        {
+            X = 2,
+            Y = 2,
+            Orientation = Orientation.Vertical,
+            StatusBarStyle = false,
+        };
+        bar.Add (shortcut1, shortcut2);
 
         ////CheckBox hello = new ()
         ////{
@@ -135,14 +126,27 @@ public class Bars : Scenario
         ////                     eventLog.MoveDown ();
         ////                 };
 
-        //Application.Top.Add (bar);
+
+        Application.Top.Add (bar);
 
         // BUGBUG: This should not be needed
-        //Application.Top.LayoutSubviews ();
+        Application.Top.LayoutSubviews ();
 
         //SetupMenuBar ();
         //SetupContentMenu ();
-       // SetupStatusBar ();
+        SetupStatusBar ();
+
+        foreach (Bar barView in Application.Top.Subviews.Where (b => b is Bar)!)
+        {
+            foreach (Shortcut sh in barView.Subviews.Where (s => s is Shortcut)!)
+            {
+                sh.Accept += (o, args) =>
+                                   {
+                                       eventSource.Add ($"Accept: {sh!.CommandView.Text}");
+                                       eventLog.MoveDown ();
+                                   };
+            }
+        }
     }
 
     private void Button_Clicked (object sender, EventArgs e) { MessageBox.Query ("Hi", $"You clicked {sender}"); }
@@ -404,11 +408,10 @@ public class Bars : Scenario
 
         var shortcut = new Shortcut
         {
-            Text = "Quit Application",
+            Text = "Quit",
             Title = "Q_uit",
             Key = Application.QuitKey,
             KeyBindingScope = KeyBindingScope.Application,
-//            Command = Command.QuitToplevel,
             CanFocus = false
         };
 
@@ -443,8 +446,7 @@ public class Bars : Scenario
         {
             Title = "_Show/Hide",
             Key = Key.F10,
-            KeyBindingScope = KeyBindingScope.HotKey,
-            //Command = Command.ToggleExpandCollapse,
+            KeyBindingScope = KeyBindingScope.Application,
             CommandView = new CheckBox
             {
                 Text = "_Show/Hide"
@@ -457,18 +459,23 @@ public class Bars : Scenario
         var button1 = new Button
         {
             Text = "I'll Hide",
-            Visible = false
+            // Visible = false
         };
         button1.Accept += Button_Clicked;
         statusBar.Add (button1);
 
-        ((CheckBox)shortcut.CommandView).Toggled += (s, e) =>
+        shortcut.Accept += (s, e) =>
                                                     {
                                                         button1.Visible = !button1.Visible;
                                                         button1.Enabled = button1.Visible;
                                                     };
 
-        statusBar.Add (new Label { HotKeySpecifier = new Rune ('_'), Text = "Fo_cusLabel", CanFocus = true });
+        statusBar.Add (new Label
+        {
+            HotKeySpecifier = new Rune ('_'),
+            Text = "Fo_cusLabel",
+            CanFocus = true
+        });
 
         var button2 = new Button
         {
@@ -482,7 +489,6 @@ public class Bars : Scenario
 
         Application.Top.Add (statusBar);
 
-
     }
 
 }

+ 0 - 1
UICatalog/Scenarios/Shortcuts.cs

@@ -355,7 +355,6 @@ public class Shortcuts : Scenario
             {
                 shortcut.Accept += (o, args) =>
                                    {
-                                       var x = button;
                                        eventSource.Add ($"Accept: {shortcut!.CommandView.Text}");
                                        eventLog.MoveDown ();
                                    };

+ 113 - 75
UICatalog/UICatalog.cs

@@ -371,12 +371,14 @@ internal class UICatalogApp
     public class UICatalogTopLevel : Toplevel
     {
         public ListView CategoryList;
-        public StatusItem DriverName;
-        public MenuItem? miForce16Colors;
-        public MenuItem? miIsMenuBorderDisabled;
-        public MenuItem? miIsMouseDisabled;
-        public MenuItem? miUseSubMenusSingleFrame;
-        public StatusItem OS;
+        public MenuItem? MiForce16Colors;
+        public MenuItem? MiIsMenuBorderDisabled;
+        public MenuItem? MiIsMouseDisabled;
+        public MenuItem? MiUseSubMenusSingleFrame;
+        public new Bar StatusBar;
+        public Shortcut? ShForce16Colors;
+        //public Shortcut? ShDiagnostics;
+        public Shortcut? ShVersion;
 
         // UI Catalog uses TableView for the scenario list instead of a ListView to demonstate how
         // TableView works. There's no real reason not to use ListView. Because we use TableView, and TableView
@@ -446,41 +448,79 @@ internal class UICatalogApp
                 ]
             };
 
-            DriverName = new (Key.Empty, "Driver:", null);
-            OS = new (Key.Empty, "OS:", null);
+            ShVersion = new ()
+            {
+                Title = "Version Info",
+                CanFocus = false,
 
-            StatusBar = new () { Visible = ShowStatusBar };
+            };
 
-            StatusBar.Items = new []
+            StatusBar = new ()
             {
-                new (
-                     Application.QuitKey,
-                     $"~{Application.QuitKey} to quit",
-                     () =>
-                     {
-                         if (_selectedScenario is null)
-                         {
-                             // This causes GetScenarioToRun to return null
-                             _selectedScenario = null;
-                             RequestStop ();
-                         }
-                     }
-                    ),
-                new (
-                     Key.F10,
-                     "~F10~ Status Bar",
-                     () =>
-                     {
-                         StatusBar.Visible = !StatusBar.Visible;
-
-                         //ContentPane!.Height = Dim.Fill(StatusBar.Visible ? 1 : 0);
-                         LayoutSubviews ();
-                         SetSubViewNeedsDisplay ();
-                     }
-                    ),
-                DriverName,
-                OS
+                Visible = ShowStatusBar,
+                Orientation = Orientation.Horizontal,
+                Y = Pos.AnchorEnd (),
+                Width = Dim.Fill (),
+                CanFocus = false,
+            };
+
+            Shortcut statusBarShortcut = new Shortcut ()
+            {
+                Key = Key.F10,
+                KeyBindingScope = KeyBindingScope.Application,
+                Title = "Status Bar",
+                CanFocus = false,
+            };
+            statusBarShortcut.Accept += (sender, args) =>
+                                        {
+                                            StatusBar.Visible = !StatusBar.Visible;
+                                        };
+
+            ShForce16Colors = new Shortcut ()
+            {
+                Key = Key.F6,
+                KeyBindingScope = KeyBindingScope.Application,
+                CommandView = new CheckBox()
+                {
+                    Title ="16 Colors",
+                    Checked = Application.Force16Colors,
+                    CanFocus = false,
+                },
+                CanFocus = false,
             };
+            ShForce16Colors.Accept += (sender, args) =>
+                                            {
+                                                ((CheckBox)ShForce16Colors.CommandView).Checked = Application.Force16Colors = (bool)!((CheckBox)ShForce16Colors.CommandView).Checked!;
+                                                MiForce16Colors.Checked = Application.Force16Colors;
+                                                Application.Refresh ();
+
+                                            };
+
+            //ShDiagnostics = new Shortcut ()
+            //{
+            //    HelpText = "Diagnostic flags",
+            //    CommandView = new RadioGroup()
+            //    {
+            //        RadioLabels = ["Off", "Ruler", "Padding", "MouseEnter"],
+
+            //        CanFocus = false,
+            //        Orientation = Orientation.Vertical,
+            //    }
+            //};
+
+            StatusBar.Add (
+                new Shortcut ()
+                {
+                    Title = "Quit",
+                    Key = Application.QuitKey,
+                    KeyBindingScope = KeyBindingScope.Application,
+                    CanFocus = false,
+                },
+                statusBarShortcut,
+                ShForce16Colors,
+                //ShDiagnostics,
+                ShVersion
+            );
 
             // Create the Category list view. This list never changes.
             CategoryList = new ()
@@ -507,7 +547,7 @@ internal class UICatalogApp
                 X = Pos.Right (CategoryList) - 1,
                 Y = 1,
                 Width = Dim.Fill (),
-                Height = Dim.Fill (1),
+                Height = Dim.Height(CategoryList),
 
                 //AllowsMarking = false,
                 CanFocus = true,
@@ -620,10 +660,10 @@ internal class UICatalogApp
             ColorScheme = Colors.ColorSchemes [_topLevelColorScheme];
 
             MenuBar.Menus [0].Children [0].Shortcut = (KeyCode)Application.QuitKey;
-            StatusBar.Items [0].Shortcut = Application.QuitKey;
-            StatusBar.Items [0].Title = $"~{Application.QuitKey} to quit";
 
-            miIsMouseDisabled!.Checked = Application.IsMouseDisabled;
+            ((Shortcut)StatusBar.Subviews [0]).Key = Application.QuitKey;
+
+            MiIsMouseDisabled!.Checked = Application.IsMouseDisabled;
 
             int height = ShowStatusBar ? 1 : 0; // + (MenuBar.Visible ? 1 : 0);
 
@@ -894,22 +934,22 @@ internal class UICatalogApp
         private MenuItem [] CreateDisabledEnabledMenuBorder ()
         {
             List<MenuItem> menuItems = new ();
-            miIsMenuBorderDisabled = new () { Title = "Disable Menu _Border" };
+            MiIsMenuBorderDisabled = new () { Title = "Disable Menu _Border" };
 
-            miIsMenuBorderDisabled.Shortcut =
-                (KeyCode)new Key (miIsMenuBorderDisabled!.Title!.Substring (14, 1) [0]).WithAlt
+            MiIsMenuBorderDisabled.Shortcut =
+                (KeyCode)new Key (MiIsMenuBorderDisabled!.Title!.Substring (14, 1) [0]).WithAlt
                                                                                        .WithCtrl.NoShift;
-            miIsMenuBorderDisabled.CheckType |= MenuItemCheckStyle.Checked;
+            MiIsMenuBorderDisabled.CheckType |= MenuItemCheckStyle.Checked;
 
-            miIsMenuBorderDisabled.Action += () =>
+            MiIsMenuBorderDisabled.Action += () =>
                                              {
-                                                 miIsMenuBorderDisabled.Checked = (bool)!miIsMenuBorderDisabled.Checked!;
+                                                 MiIsMenuBorderDisabled.Checked = (bool)!MiIsMenuBorderDisabled.Checked!;
 
-                                                 MenuBar.MenusBorderStyle = !(bool)miIsMenuBorderDisabled.Checked
+                                                 MenuBar.MenusBorderStyle = !(bool)MiIsMenuBorderDisabled.Checked
                                                                                 ? LineStyle.Single
                                                                                 : LineStyle.None;
                                              };
-            menuItems.Add (miIsMenuBorderDisabled);
+            menuItems.Add (MiIsMenuBorderDisabled);
 
             return menuItems.ToArray ();
         }
@@ -917,18 +957,18 @@ internal class UICatalogApp
         private MenuItem [] CreateDisabledEnabledMouseItems ()
         {
             List<MenuItem> menuItems = new ();
-            miIsMouseDisabled = new () { Title = "_Disable Mouse" };
+            MiIsMouseDisabled = new () { Title = "_Disable Mouse" };
 
-            miIsMouseDisabled.Shortcut =
-                (KeyCode)new Key (miIsMouseDisabled!.Title!.Substring (1, 1) [0]).WithAlt.WithCtrl.NoShift;
-            miIsMouseDisabled.CheckType |= MenuItemCheckStyle.Checked;
+            MiIsMouseDisabled.Shortcut =
+                (KeyCode)new Key (MiIsMouseDisabled!.Title!.Substring (1, 1) [0]).WithAlt.WithCtrl.NoShift;
+            MiIsMouseDisabled.CheckType |= MenuItemCheckStyle.Checked;
 
-            miIsMouseDisabled.Action += () =>
+            MiIsMouseDisabled.Action += () =>
                                         {
-                                            miIsMouseDisabled.Checked =
-                                                Application.IsMouseDisabled = (bool)!miIsMouseDisabled.Checked!;
+                                            MiIsMouseDisabled.Checked =
+                                                Application.IsMouseDisabled = (bool)!MiIsMouseDisabled.Checked!;
                                         };
-            menuItems.Add (miIsMouseDisabled);
+            menuItems.Add (MiIsMouseDisabled);
 
             return menuItems.ToArray ();
         }
@@ -937,20 +977,20 @@ internal class UICatalogApp
         private MenuItem [] CreateDisabledEnableUseSubMenusSingleFrame ()
         {
             List<MenuItem> menuItems = new ();
-            miUseSubMenusSingleFrame = new () { Title = "Enable _Sub-Menus Single Frame" };
+            MiUseSubMenusSingleFrame = new () { Title = "Enable _Sub-Menus Single Frame" };
 
-            miUseSubMenusSingleFrame.Shortcut = KeyCode.CtrlMask
+            MiUseSubMenusSingleFrame.Shortcut = KeyCode.CtrlMask
                                                 | KeyCode.AltMask
-                                                | (KeyCode)miUseSubMenusSingleFrame!.Title!.Substring (8, 1) [
+                                                | (KeyCode)MiUseSubMenusSingleFrame!.Title!.Substring (8, 1) [
                                                  0];
-            miUseSubMenusSingleFrame.CheckType |= MenuItemCheckStyle.Checked;
+            MiUseSubMenusSingleFrame.CheckType |= MenuItemCheckStyle.Checked;
 
-            miUseSubMenusSingleFrame.Action += () =>
+            MiUseSubMenusSingleFrame.Action += () =>
                                                {
-                                                   miUseSubMenusSingleFrame.Checked = (bool)!miUseSubMenusSingleFrame.Checked!;
-                                                   MenuBar.UseSubMenusSingleFrame = (bool)miUseSubMenusSingleFrame.Checked;
+                                                   MiUseSubMenusSingleFrame.Checked = (bool)!MiUseSubMenusSingleFrame.Checked!;
+                                                   MenuBar.UseSubMenusSingleFrame = (bool)MiUseSubMenusSingleFrame.Checked;
                                                };
-            menuItems.Add (miUseSubMenusSingleFrame);
+            menuItems.Add (MiUseSubMenusSingleFrame);
 
             return menuItems.ToArray ();
         }
@@ -959,21 +999,22 @@ internal class UICatalogApp
         {
             List<MenuItem> menuItems = new ();
 
-            miForce16Colors = new ()
+            MiForce16Colors = new ()
             {
                 Title = "Force _16 Colors",
                 Shortcut = (KeyCode)Key.F6,
                 Checked = Application.Force16Colors,
                 CanExecute = () => Application.Driver.SupportsTrueColor
             };
-            miForce16Colors.CheckType |= MenuItemCheckStyle.Checked;
+            MiForce16Colors.CheckType |= MenuItemCheckStyle.Checked;
 
-            miForce16Colors.Action += () =>
+            MiForce16Colors.Action += () =>
                                       {
-                                          miForce16Colors.Checked = Application.Force16Colors = (bool)!miForce16Colors.Checked!;
+                                          MiForce16Colors.Checked = Application.Force16Colors = (bool)!MiForce16Colors.Checked!;
+                                          ((CheckBox)ShForce16Colors!.CommandView!).Checked = Application.Force16Colors;
                                           Application.Refresh ();
                                       };
-            menuItems.Add (miForce16Colors);
+            menuItems.Add (MiForce16Colors);
 
             return menuItems.ToArray ();
         }
@@ -1000,11 +1041,8 @@ internal class UICatalogApp
         {
             ConfigChanged ();
 
-            miIsMouseDisabled!.Checked = Application.IsMouseDisabled;
-            DriverName.Title = $"Driver: {Driver.GetVersionInfo ()}";
-
-            OS.Title =
-                $"OS: {RuntimeEnvironment.OperatingSystem} {RuntimeEnvironment.OperatingSystemVersion}";
+            MiIsMouseDisabled!.Checked = Application.IsMouseDisabled;
+            ShVersion.Title = $"{RuntimeEnvironment.OperatingSystem} {RuntimeEnvironment.OperatingSystemVersion}, {Driver.GetVersionInfo ()}";
 
             if (_selectedScenario != null)
             {