浏览代码

Merge branch 'gui-cs:v2_develop' into v2_develop

Tig 4 月之前
父节点
当前提交
fd5b52f2a0
共有 2 个文件被更改,包括 7 次插入5 次删除
  1. 3 3
      Terminal.Gui/ConsoleDrivers/V2/ConsoleDriverFacade.cs
  2. 4 2
      UICatalog/UICatalog.cs

+ 3 - 3
Terminal.Gui/ConsoleDrivers/V2/ConsoleDriverFacade.cs

@@ -231,14 +231,14 @@ internal class ConsoleDriverFacade<T> : IConsoleDriver, IConsoleDriverFacade
 
         if (InputProcessor is WindowsInputProcessor)
         {
-            type = "(win)";
+            type = "win";
         }
         else if (InputProcessor is NetInputProcessor)
         {
-            type = "(net)";
+            type = "net";
         }
 
-        return GetType ().Name.TrimEnd ('`', '1') + type;
+        return "v2" + type;
     }
 
     /// <summary>Tests if the specified rune is supported by the driver.</summary>

+ 4 - 2
UICatalog/UICatalog.cs

@@ -147,8 +147,10 @@ public class UICatalogApp
         // If no driver is provided, the default driver is used.
         Option<string> driverOption = new Option<string> ("--driver", "The IConsoleDriver to use.").FromAmong (
              Application.GetDriverTypes ()
-                        .Select (d => d!.Name)
-                        .ToArray ()
+                            .Where (d=>!typeof (IConsoleDriverFacade).IsAssignableFrom (d))
+                            .Select (d => d!.Name)
+                            .Union (["v2","v2win","v2net"])
+                            .ToArray ()
             );
         driverOption.AddAlias ("-d");
         driverOption.AddAlias ("--d");