File tree Expand file tree Collapse file tree
src/Microsoft.PowerShell.ConsoleGuiTools Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,17 +44,15 @@ public HashSet<int> Run(ApplicationData applicationData)
4444 return selectedIndexes ?? [ ] ;
4545 }
4646
47+ /// <summary>
48+ /// Releases resources used by the <see cref="OutConsoleGridView" />.
49+ /// </summary>
50+ /// <remarks>
51+ /// Currently, there are no resources to dispose. This method is provided for future extensibility
52+ /// and to follow the standard IDisposable pattern.
53+ /// </remarks>
4754 public void Dispose ( )
4855 {
49- if ( ! Console . IsInputRedirected )
50- // By emitting this, we fix two issues:
51- // 1. An issue where arrow keys don't work in the console because .NET
52- // requires application mode to support Arrow key escape sequences.
53- // Esc[?1h sets the cursor key to application mode
54- // See http://ascii-table.com/ansi-escape-sequences-vt-100.php
55- // 2. An issue where moving the mouse causes characters to show up because
56- // mouse tracking is still on. Esc[?1003l turns it off.
57- // See https://www.xfree86.org/current/ctlseqs.html#Mouse%20Tracking
58- Console . Write ( "\u001b [?1h\u001b [?1003l" ) ;
56+ // No resources to dispose currently
5957 }
6058}
Original file line number Diff line number Diff line change 44using System ;
55using System . Collections . Generic ;
66using System . Diagnostics ;
7+ using System . Reflection ;
8+ using System . Text . RegularExpressions ;
79using System . IO ;
810using System . Linq ;
911using System . Management . Automation ;
10- using System . Reflection ;
11- using System . Text . RegularExpressions ;
12- using Microsoft . PowerShell . OutGridView . Models ;
1312using Terminal . Gui . App ;
14- using Terminal . Gui . Configuration ;
15- using Terminal . Gui . Drawing ;
16- using Terminal . Gui . Input ;
1713using Terminal . Gui . ViewBase ;
1814using Terminal . Gui . Views ;
15+ using Terminal . Gui . Drawing ;
16+ using Terminal . Gui . Input ;
17+ using Terminal . Gui . Configuration ;
18+ using Microsoft . PowerShell . OutGridView . Models ;
1919
2020namespace Microsoft . PowerShell . ConsoleGuiTools ;
2121
Original file line number Diff line number Diff line change @@ -35,14 +35,15 @@ internal static void Run(ApplicationData applicationData)
3535 {
3636 Terminal . Gui . Configuration . ConfigurationManager . Enable ( Terminal . Gui . Configuration . ConfigLocations . All ) ;
3737
38- if ( ! string . IsNullOrEmpty ( applicationData . ForceDriver ) )
39- Application . ForceDriver = applicationData . ForceDriver ;
40-
4138 using ShowObjectTreeWindow window = new ( applicationData ) ;
42- using IApplication app = Application . Create ( ) ;
43- app . Init ( ) ;
44- bool accepted = app . Run ( window ) is true ;
45- Application . ForceDriver = string . Empty ;
39+ using IApplication app = Application . Create ( ) . Init ( driverName : applicationData . ForceDriver ) ;
40+ app . Run ( window ) ;
41+
42+ // using ShowObjectTreeWindow window = new(applicationData);
43+ // using IApplication app = Application.Create();
44+ // app.Init();
45+ // bool accepted = app.Run(window) is true;
46+ // Application.ForceDriver = string.Empty;
4647 }
4748
4849 /// <summary>
You can’t perform that action at this time.
0 commit comments