소스 검색

Enable Driver.Suspend for NetDriver using Unix.

BDisp 1 년 전
부모
커밋
1e7263be73
1개의 변경된 파일17개의 추가작업 그리고 3개의 파일을 삭제
  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 ()
     {