Browse Source

Removed dead code/comments

Tigger Kindel 2 năm trước cách đây
mục cha
commit
35b5cf0120

+ 15 - 63
Terminal.Gui/ConsoleDrivers/NetDriver.cs

@@ -118,8 +118,6 @@ namespace Terminal.Gui {
 #if PROCESS_REQUEST
 #if PROCESS_REQUEST
 		bool neededProcessRequest;
 		bool neededProcessRequest;
 #endif
 #endif
-		// BUGBUG: See https://github.com/gui-cs/Terminal.Gui/issues/2745
-		//public bool IsTerminalWithOptions { get; set; }
 		public EscSeqReqProc EscSeqReqProc { get; } = new EscSeqReqProc ();
 		public EscSeqReqProc EscSeqReqProc { get; } = new EscSeqReqProc ();
 
 
 		public NetEvents (ConsoleDriver consoleDriver)
 		public NetEvents (ConsoleDriver consoleDriver)
@@ -232,32 +230,22 @@ namespace Terminal.Gui {
 				if (stopTasks) {
 				if (stopTasks) {
 					return;
 					return;
 				}
 				}
-				// BUGBUG: See https://github.com/gui-cs/Terminal.Gui/issues/2745
-				//switch (IsTerminalWithOptions) {
-				//case false:
-					int buffHeight, buffWidth;
-					if (((NetDriver)consoleDriver).IsWinPlatform) {
-						buffHeight = Math.Max (Console.BufferHeight, 0);
-						buffWidth = Math.Max (Console.BufferWidth, 0);
-					} else {
-						buffHeight = consoleDriver.Rows;
-						buffWidth = consoleDriver.Cols;
-					}
-					if (IsWinChanged (
-						Math.Max (Console.WindowHeight, 0),
-						Math.Max (Console.WindowWidth, 0),
-						buffHeight,
-						buffWidth)) {
+				int buffHeight, buffWidth;
+				if (((NetDriver)consoleDriver).IsWinPlatform) {
+					buffHeight = Math.Max (Console.BufferHeight, 0);
+					buffWidth = Math.Max (Console.BufferWidth, 0);
+				} else {
+					buffHeight = consoleDriver.Rows;
+					buffWidth = consoleDriver.Cols;
+				}
+				if (IsWinChanged (
+					Math.Max (Console.WindowHeight, 0),
+					Math.Max (Console.WindowWidth, 0),
+					buffHeight,
+					buffWidth)) {
 
 
-						return;
-					}
-				//	break;
-				//case true:
-				//	//Request the size of the text area in characters.
-				//	EscSeqReqProc.Add ("t");
-				//	Console.Out.Write ("\x1b[18t");
-				//	break;
-				//}
+					return;
+				}
 			}
 			}
 		}
 		}
 
 
@@ -467,37 +455,6 @@ namespace Terminal.Gui {
 					return;
 					return;
 				}
 				}
 				break;
 				break;
-			// BUGBUG: See https://github.com/gui-cs/Terminal.Gui/issues/2745
-			//case "c":
-			//	try {
-			//		var parent = EscSeqUtils.GetParentProcess (Process.GetCurrentProcess ());
-			//		if (parent == null) { Debug.WriteLine ("Not supported!"); }
-			//	} catch (Exception ex) {
-			//		Debug.WriteLine (ex.Message);
-			//	}
-
-			//	if (c1Control == "CSI" && values.Length == 2
-			//		&& values [0] == "1" && values [1] == "0") {
-			//		// Reports CSI?1;0c ("VT101 with No Options")
-			//		IsTerminalWithOptions = false;
-			//	} else {
-			//		IsTerminalWithOptions = true;
-			//	}
-			//	break;
-			//case "t":
-			//	switch (values [0]) {
-			//	case "8":
-			//		IsWinChanged (
-			//			Math.Max (int.Parse (values [1]), 0),
-			//			Math.Max (int.Parse (values [2]), 0),
-			//			Math.Max (int.Parse (values [1]), 0),
-			//			Math.Max (int.Parse (values [2]), 0));
-			//		break;
-			//	default:
-			//		SetRequestedEvent (c1Control, code, values, terminating);
-			//		break;
-			//	}
-			//	break;
 			default:
 			default:
 				SetRequestedEvent (c1Control, code, values, terminating);
 				SetRequestedEvent (c1Control, code, values, terminating);
 				break;
 				break;
@@ -1289,11 +1246,6 @@ namespace Terminal.Gui {
 
 
 			// Note: Net doesn't support keydown/up events and thus any passed keyDown/UpHandlers will be simulated to be called.
 			// Note: Net doesn't support keydown/up events and thus any passed keyDown/UpHandlers will be simulated to be called.
 			mLoop.ProcessInput = (e) => ProcessInput (e);
 			mLoop.ProcessInput = (e) => ProcessInput (e);
-
-			// BUGBUG: See https://github.com/gui-cs/Terminal.Gui/issues/2745
-			//// Check if terminal supports requests
-			//this.mainLoop.netEvents.EscSeqReqProc.Add ("c");
-			//Console.Out.Write ("\x1b[0c");
 		}
 		}
 
 
 		void ProcessInput (NetEvents.InputResult inputEvent)
 		void ProcessInput (NetEvents.InputResult inputEvent)