Explorar el Código

Enable Driver.Suspend for NetDriver using Unix.

BDisp hace 1 año
padre
commit
1e7263be73
Se han modificado 1 ficheros con 17 adiciones y 3 borrados
  1. 17 3
      Terminal.Gui/ConsoleDrivers/NetDriver.cs

+ 17 - 3
Terminal.Gui/ConsoleDrivers/NetDriver.cs

@@ -852,11 +852,25 @@ internal class NetDriver : ConsoleDriver
         { }
         { }
     }
     }
 
 
-    #region Not Implemented
+    public override void Suspend ()
+    {
+        if (Environment.OSVersion.Platform != PlatformID.Unix)
+        {
+            return;
+        }
 
 
-    public override void Suspend () { throw new NotImplementedException (); }
+        StopReportingMouseMoves ();
 
 
-    #endregion
+        if (!RunningUnitTests)
+        {
+            Console.ResetColor ();
+            Console.Clear ();
+            Platform.Suspend ();
+            Application.Refresh ();
+        }
+
+        StartReportingMouseMoves ();
+    }
 
 
     public override void UpdateScreen ()
     public override void UpdateScreen ()
     {
     {