From 334f1a472d0cedb7fca472828a050460608ba278 Mon Sep 17 00:00:00 2001 From: Tig Kindel Date: Mon, 22 Aug 2022 10:09:18 -0700 Subject: [PATCH] Merge Tig Kindel's work (#166) * Fixed #58: Multi-line commands rendering wrong * Fixed #58 - Newlines in commands render incorrectly * Added debug instructions to readme * simplified stripping of newline/linefeed * made column spacing tighter * removed excess padding on right * removed excess rows at bottom * status bar wsa occluding window * fixed build scripts to only build ocgv * refactored to make logic more obvious * removed orig files * Updated references to latest Terminal.Gui * Fixed #131 and upgraded to terminal.gui 1.6, pwsh 7.2, and net60 * supported .net and reverted change * Fixes #131 - Out-ConsoleGridView doesn't handle ANSI escape sequences correctly * removed border when minui is enabled * re-implemented feature post merge screw up * improve VS code build and debug support * On exit, ensure only visible marked items are output * Fixes 87 * Fixing crash when MinUi PR is merged * Tweaked build to have a better test at end * removed merge artifacts * exclude .orig files (merge artifacts) Co-authored-by: Tyler James Leonhardt Co-authored-by: Andy Jordan <2226434+andschwa@users.noreply.github.com> --- .gitignore | 3 + .vscode/launch.json | 29 +- .vscode/settings.json | 2 +- .vscode/tasks.json | 39 +-- Build.ps1 | 8 +- README.md | 30 +- .../ConsoleGui.cs | 264 +++++++++++------- .../Microsoft.PowerShell.ConsoleGuiTools.psd1 | 9 +- .../OutConsoleGridviewCmdletCommand.cs | 7 + .../TypeGetter.cs | 1 + ...Microsoft.PowerShell.GraphicalTools.csproj | 2 +- .../ApplicationData.cs | 1 + ...osoft.PowerShell.OutGridView.Models.csproj | 2 +- 13 files changed, 230 insertions(+), 167 deletions(-) diff --git a/.gitignore b/.gitignore index cacf0ef..995941e 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,6 @@ module/ # Ignore package Microsoft.PowerShell.GraphicalTools.zip Microsoft.PowerShell.ConsoleGuiTools.zip + +# git artifacts +*.orig \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json index 17f330a..fcc366c 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -6,25 +6,20 @@ "configurations": [ { "name": ".NET Core Launch (console)", + "preLaunchTask": "build ConsoleGuiTools", "type": "coreclr", "request": "launch", - "preLaunchTask": "build", - "program": "${workspaceFolder}/Cmdlet/bin/Debug/net6.0/win10-x64/OutGridViewCmdlet.dll", - "args": [], - "cwd": "${workspaceFolder}/Cmdlet", - "console": "internalConsole", - "stopAtEntry": false - }, - { - "name": ".NET Core Launch (application)", - "type": "coreclr", - "request": "launch", - "preLaunchTask": "build", - "program": "${workspaceFolder}/Application/bin/Debug/net6.0/win10-x64/OutGridViewApplication.dll", - "args": [], - "cwd": "${workspaceFolder}/Application", - "console": "internalConsole", - "stopAtEntry": false + "program": "pwsh", + "args": [ + "-NoExit", + "-NoProfile", + "-Command", + "Import-Module ${workspaceFolder}/module/Microsoft.PowerShell.ConsoleGuiTools" + ], + "cwd": "${workspaceFolder}", + "console": "integratedTerminal", + "stopAtEntry": false, + "justMyCode": false }, { "name": ".NET Core Attach", diff --git a/.vscode/settings.json b/.vscode/settings.json index 351aacc..d528a62 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,5 @@ { "files.associations": { - "**/.vsts-ci/**/*.yml":"azure-pipelines" + "**/.vsts-ci/**/*.yml":"azure-pipelines", } } \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 0056896..e0a35c4 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,33 +1,22 @@ -{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + { "version": "2.0.0", "tasks": [ { - "label": "build", - "osx": { - "command": "/usr/local/bin/pwsh" - }, - "windows": { - "command": "pwsh.exe" - }, - "linux": { - "command": "/usr/local/bin/pwsh" - }, - "type": "process", + "label": "build ConsoleGuiTools", + "command": "Invoke-Build", + "type": "shell", "args": [ - "-c", - "Invoke-Build", - // Build both modules - //"Build -ModuleName Microsoft.PowerShell.GraphicalTools, Microsoft.PowerShell.ConsoleGuiTools", - // Build only Out-GridView - //"Build -ModuleName Microsoft.PowerShell.GraphicalTools", - // Build only Out-ConsoleGridView - "Build -ModuleName Microsoft.PowerShell.ConsoleGuiTools", + "Build", + "-Module", + "Microsoft.PowerShell.ConsoleGuiTools" ], - "problemMatcher": "$msCompile", - "group": { - "kind": "build", - "isDefault": true - } + "group": "build", + "presentation": { + "reveal": "silent" + }, + "problemMatcher": "$msCompile" } ] } \ No newline at end of file diff --git a/Build.ps1 b/Build.ps1 index fd2eeff..aac77f1 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -6,6 +6,8 @@ # Build... Invoke-Build Build -ModuleName Microsoft.PowerShell.ConsoleGuiTools -# Run what was built... -# pwsh -noprofile -command "Import-Module -verbose '$PSScriptRoot/module/Microsoft.PowerShell.GraphicalTools'; Get-Module -all | Out-GridView -OutputMode Single -Title 'Imported Modules' -pwsh -noprofile -command "Import-Module -verbose '$PSScriptRoot/module/Microsoft.PowerShell.ConsoleGuiTools'; Get-Module -all | Out-ConsoleGridView -OutputMode Single -Title 'Imported Modules' -Filter power" \ No newline at end of file +# Run what was built as a bit of test of: +# - Scale: recursive ls of the project +# - Filter: proving regex works +# - SelectMultiple +pwsh -noprofile -command "Import-Module -verbose '$PSScriptRoot/module/Microsoft.PowerShell.ConsoleGuiTools'; Get-ChildItem -Recurse | Out-ConsoleGridView -OutputMode Multiple -Title 'Imported Modules' -Filter \.xml" diff --git a/README.md b/README.md index d762d96..5619440 100644 --- a/README.md +++ b/README.md @@ -25,9 +25,9 @@ to view and filter objects graphically. ## Development -### 1. Install PowerShell 7.1+ +### 1. Install PowerShell 7.2+ -Install PowerShell 7.1+ with [these instructions](https://github.com/PowerShell/PowerShell#get-powershell). +Install PowerShell 7.2+ with [these instructions](https://github.com/PowerShell/PowerShell#get-powershell). ### 2. Clone the GitHub repository @@ -49,9 +49,10 @@ Now you're ready to build the code. You can do so in one of two ways: PS ./GraphicalTools> Invoke-Build Build -ModuleName Microsoft.PowerShell.ConsoleGuiTools ``` -From there you can import the module that you just built for example: +From there you can import the module that you just built for example (start a fresh `pwsh` instance first so you can unload the module with an `exit`; otherwise building again may fail because the `.dll` will be held open): ```powershell +pwsh Import-Module ./module/Microsoft.PowerShell.ConsoleGuiTools ``` @@ -59,6 +60,7 @@ And then run the cmdlet you want to test, for example: ```powershell Get-Process | Out-ConsoleGridView +exit ``` > NOTE: If you change the code and rebuild the project, you'll need to launch a @@ -72,29 +74,15 @@ PS ./GraphicalTools> code . Build by hitting `Ctrl-Shift-B` in VS Code. -To debug: +Set a breakpoint and hit `F5` to start the debugger. -In a PowerShell session in the `./GraphicalTools` directory, run `pwsh` (thus -nesting PowerShell). - -Then do the folowing: +Click on the VS Code "TERMINAL" tab and type your command that starts `Out-ConsoleGridView`, e.g. ```powershell -Import-Module ./module/Microsoft.PowerShell.ConsoleGuiTools -$pid +ls | ocgv ``` -This will import the latest built DLL and output the process ID you'll need -for debugging. Copy this ID to the clipboard. - -In VScode, set your breakpoints, etc. Then hit `F5`. In the VScode search -box, paste the value printed by `$pid`. You'll see something like `pwsh.exe -18328`. Click that and the debug session will start. - -In the PowerShell session run your commands; breakpoints will be hit, etc. - -When done, run `exit` to exit the nested PowerShell and run `pwsh` again. -This unloads the DLL. Repeat. +Your breakpoint should be hit. ## Contributions Welcome diff --git a/src/Microsoft.PowerShell.ConsoleGuiTools/ConsoleGui.cs b/src/Microsoft.PowerShell.ConsoleGuiTools/ConsoleGui.cs index 2ad6f0d..1af21b5 100644 --- a/src/Microsoft.PowerShell.ConsoleGuiTools/ConsoleGui.cs +++ b/src/Microsoft.PowerShell.ConsoleGuiTools/ConsoleGui.cs @@ -19,10 +19,10 @@ internal class ConsoleGui : IDisposable // Width of Terminal.Gui ListView selection/check UI elements (old == 4, new == 2) private const int CHECK_WIDTH = 4; private bool _cancelled; - private GridViewDataSource _itemSource; private Label _filterLabel; private TextField _filterField; private ListView _listView; + private GridViewDataSource _itemSource; private ApplicationData _applicationData; private GridViewDetails _gridViewDetails; @@ -37,22 +37,34 @@ public HashSet Start(ApplicationData applicationData) ListViewOffset = _applicationData.OutputMode != OutputModeOption.None ? MARGIN_LEFT + CHECK_WIDTH : MARGIN_LEFT }; - Window win = AddTopLevelWindow(); - AddStatusBar(); + Window win = CreateTopLevelWindow(); - // GridView header logic + // Create the headers and calculate column widths based on the DataTable List gridHeaders = _applicationData.DataTable.DataColumns.Select((c) => c.Label).ToList(); CalculateColumnWidths(gridHeaders); - AddFilter(win); - AddHeaders(win, gridHeaders); + // Copy DataTable into the ListView's DataSource + _itemSource = LoadData(); + + if (!_applicationData.MinUI) + { + // Add Filter UI + AddFilter(win); + // Add Header UI + AddHeaders(win, gridHeaders); + } - // GridView row logic - LoadData(); - AddRows(win); + // Add ListView + AddListView(win); + + // Status bar is where our key-bindings are handled + AddStatusBar(!_applicationData.MinUI); + + // If -Filter parameter is set, apply it. + ApplyFilter(); + + _listView.SetFocus(); - _filterField.Text = _applicationData.Filter ?? string.Empty; - _filterField.CursorPosition = _filterField.Text.Length; // Run the GUI. Application.Run(); Application.Shutdown(); @@ -64,7 +76,10 @@ public HashSet Start(ApplicationData applicationData) return selectedIndexes; } - foreach (GridViewRow gvr in _itemSource.GridViewRowList) + // Ensure that only items that are marked AND not filtered out + // get returned (See Issue #121) + List itemList = GridViewHelpers.FilterData(_itemSource.GridViewRowList, _applicationData.Filter); + foreach (GridViewRow gvr in itemList) { if (gvr.IsMarked) { @@ -75,6 +90,41 @@ public HashSet Start(ApplicationData applicationData) return selectedIndexes; } + private GridViewDataSource LoadData() + { + var items = new List(); + int newIndex = 0; + for (int i = 0; i < _applicationData.DataTable.Data.Count; i++) + { + var dataTableRow = _applicationData.DataTable.Data[i]; + var valueList = new List(); + foreach (var dataTableColumn in _applicationData.DataTable.DataColumns) + { + string dataValue = dataTableRow.Values[dataTableColumn.ToString()].DisplayValue; + valueList.Add(dataValue); + } + + string displayString = GridViewHelpers.GetPaddedString(valueList, 0, _gridViewDetails.ListViewColumnWidths); + + items.Add(new GridViewRow + { + DisplayString = displayString, + OriginalIndex = i + }); + + newIndex++; + } + + return new GridViewDataSource(items); + } + + private void ApplyFilter() + { + List itemList = GridViewHelpers.FilterData(_itemSource.GridViewRowList, _applicationData.Filter ?? string.Empty); + // Set the ListView to show only the subset defined by the filter + _listView.Source = new GridViewDataSource(itemList); + } + private void Accept() { Application.RequestStop(); @@ -86,58 +136,85 @@ private void Close() Application.RequestStop(); } - private Window AddTopLevelWindow() + private Window CreateTopLevelWindow() { // Creates the top-level window to show var win = new Window(_applicationData.Title) { - X = 0, - Y = 0, + X = _applicationData.MinUI ? -1 : 0, + Y = _applicationData.MinUI ? -1 : 0, + // By using Dim.Fill(), it will automatically resize without manual intervention - Width = Dim.Fill(), - Height = Dim.Fill(1) + Width = Dim.Fill(_applicationData.MinUI ? -1 : 0), + Height = Dim.Fill(_applicationData.MinUI ? -1 : 1) }; + if (_applicationData.MinUI) + { + win.Border.BorderStyle = BorderStyle.None; + } + Application.Top.Add(win); return win; } - private void AddStatusBar() + private void AddStatusBar(bool visible) { - var statusBar = new StatusBar( - _applicationData.OutputMode != OutputModeOption.None - ? new StatusItem[] + var statusItems = new List(); + if (_applicationData.OutputMode != OutputModeOption.None) + { + // Use Key.Unknown for SPACE with no delegate because ListView already + // handles SPACE + statusItems.Add(new StatusItem(Key.Unknown, "~SPACE~ Select Item", null)); + } + + if (_applicationData.OutputMode == OutputModeOption.Multiple) + { + statusItems.Add(new StatusItem(Key.A | Key.CtrlMask, "~CTRL-A~ Select All", () => + { + // This selects only the items that match the Filter + var gvds = _listView.Source as GridViewDataSource; + gvds.GridViewRowList.ForEach(i => i.IsMarked = true); + _listView.SetNeedsDisplay(); + })); + + // Ctrl-D is commonly used in GUIs for select-none + statusItems.Add(new StatusItem(Key.D | Key.CtrlMask, "~CTRL-D~ Select None", () => + { + // This un-selects only the items that match the Filter + var gvds = _listView.Source as GridViewDataSource; + gvds.GridViewRowList.ForEach(i => i.IsMarked = false); + _listView.SetNeedsDisplay(); + })); + } + + if (_applicationData.OutputMode != OutputModeOption.None) + { + statusItems.Add(new StatusItem(Key.Enter, "~ENTER~ Accept", () => + { + if (Application.Top.MostFocused == _listView) { - // Use Key.Unknown for SPACE with no delegate because ListView already - // handles SPACE - new StatusItem(Key.Unknown, "~SPACE~ Mark Item", null), - new StatusItem(Key.Enter, "~ENTER~ Accept", () => + // If nothing was explicitly marked, we return the item that was selected + // when ENTER is pressed in Single mode. If something was previously selected + // (using SPACE) then honor that as the single item to return + if (_applicationData.OutputMode == OutputModeOption.Single && + _itemSource.GridViewRowList.Find(i => i.IsMarked) == null) { - if (Application.Top.MostFocused == _listView) - { - // If nothing was explicitly marked, we return the item that was selected - // when ENTER is pressed in Single mode. If something was previously selected - // (using SPACE) then honor that as the single item to return - if (_applicationData.OutputMode == OutputModeOption.Single && - _itemSource.GridViewRowList.Find(i => i.IsMarked) == null) - { - _listView.MarkUnmarkRow(); - } - Accept(); - } - else if (Application.Top.MostFocused == _filterField) - { - _listView.SetFocus(); - } - }), - new StatusItem(Key.Esc, "~ESC~ Close", () => Close()) + _listView.MarkUnmarkRow(); + } + Accept(); } - : new StatusItem[] + else if (Application.Top.MostFocused == _filterField) { - new StatusItem(Key.Esc, "~ESC~ Close", () => Close()) + _listView.SetFocus(); } - ); + })); + } + statusItems.Add(new StatusItem(Key.Esc, "~ESC~ Close", () => Close())); + + var statusBar = new StatusBar(statusItems.ToArray()); + statusBar.Visible = visible; Application.Top.Add(statusBar); } @@ -164,7 +241,6 @@ private void CalculateColumnWidths(List gridHeaders) { listViewColumnWidths[index] = len; } - index++; } } @@ -194,10 +270,11 @@ private void AddFilter(Window win) { _filterLabel = new Label(FILTER_LABEL) { - X = MARGIN_LEFT + X = MARGIN_LEFT, + Y = 0 }; - _filterField = new TextField(string.Empty) + _filterField = new TextField(_applicationData.Filter ?? string.Empty) { X = Pos.Right(_filterLabel) + 1, Y = Pos.Top(_filterLabel), @@ -205,6 +282,13 @@ private void AddFilter(Window win) Width = Dim.Fill() - _filterLabel.Text.Length }; + // TextField captures Ctrl-A (select all text) and Ctrl-D (delete backwards) + // In OCGV these are used for select-all/none of items. Selecting items is more + // common than editing the filter field so we turn them off in the filter textview. + // BACKSPACE still works for delete backwards + _filterField.ClearKeybinding(Key.A | Key.CtrlMask); + _filterField.ClearKeybinding(Key.D | Key.CtrlMask); + var filterErrorLabel = new Label(string.Empty) { X = Pos.Right(_filterLabel) + 1, @@ -222,9 +306,9 @@ private void AddFilter(Window win) filterErrorLabel.Text = " "; filterErrorLabel.ColorScheme = Colors.Base; filterErrorLabel.Redraw(filterErrorLabel.Bounds); + _applicationData.Filter = filterText; + ApplyFilter(); - List itemList = GridViewHelpers.FilterData(_itemSource.GridViewRowList, filterText); - _listView.Source = new GridViewDataSource(itemList); } catch (Exception ex) { @@ -236,6 +320,9 @@ private void AddFilter(Window win) }; win.Add(_filterLabel, _filterField, filterErrorLabel); + + _filterField.Text = _applicationData.Filter ?? string.Empty; + _filterField.CursorPosition = _filterField.Text.Length; } private void AddHeaders(Window win, List gridHeaders) @@ -243,12 +330,16 @@ private void AddHeaders(Window win, List gridHeaders) var header = new Label(GridViewHelpers.GetPaddedString( gridHeaders, _gridViewDetails.ListViewOffset, - _gridViewDetails.ListViewColumnWidths)) + _gridViewDetails.ListViewColumnWidths)); + header.X = 0; + if (_applicationData.MinUI) { - X = 0, - Y = 2 - }; - + header.Y = 0; + } + else + { + header.Y = 2; + } win.Add(header); // This renders dashes under the header to make it more clear what is header and what is data @@ -266,54 +357,33 @@ private void AddHeaders(Window win, List gridHeaders) } } - var headerLine = new Label(headerLineText.ToString()) - { - X = 0, - Y = 3 - }; - - win.Add(headerLine); - } - - private void LoadData() - { - var items = new List(); - int newIndex = 0; - for (int i = 0; i < _applicationData.DataTable.Data.Count; i++) + if (!_applicationData.MinUI) { - var dataTableRow = _applicationData.DataTable.Data[i]; - var valueList = new List(); - foreach (var dataTableColumn in _applicationData.DataTable.DataColumns) + var headerLine = new Label(headerLineText.ToString()) { - string dataValue = dataTableRow.Values[dataTableColumn.ToString()].DisplayValue; - valueList.Add(dataValue); - } - - string displayString = GridViewHelpers.GetPaddedString(valueList, 0, _gridViewDetails.ListViewColumnWidths); - - items.Add(new GridViewRow - { - DisplayString = displayString, - OriginalIndex = i - }); - - newIndex++; + X = 0, + Y = Pos.Bottom(header) + }; + win.Add(headerLine); } - - _itemSource = new GridViewDataSource(items); } - private void AddRows(Window win) + private void AddListView(Window win) { - _listView = new ListView(_itemSource) + _listView = new ListView(_itemSource); + _listView.X = MARGIN_LEFT; + if (!_applicationData.MinUI) { - X = Pos.Left(_filterLabel), - Y = Pos.Bottom(_filterLabel) + 3, // 1 for space, 1 for header, 1 for header underline - Width = Dim.Fill(2), - Height = Dim.Fill(), - AllowsMarking = _applicationData.OutputMode != OutputModeOption.None, - AllowsMultipleSelection = _applicationData.OutputMode == OutputModeOption.Multiple, - }; + _listView.Y = Pos.Bottom(_filterLabel) + 3; // 1 for space, 1 for header, 1 for header underline + } + else + { + _listView.Y = 1; // 1 for space, 1 for header, 1 for header underline + } + _listView.Width = Dim.Fill(2); + _listView.Height = Dim.Fill(); + _listView.AllowsMarking = _applicationData.OutputMode != OutputModeOption.None; + _listView.AllowsMultipleSelection = _applicationData.OutputMode == OutputModeOption.Multiple; win.Add(_listView); } diff --git a/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.psd1 b/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.psd1 index cd72692..2addab4 100644 --- a/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.psd1 +++ b/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.psd1 @@ -9,7 +9,7 @@ RootModule = 'Microsoft.PowerShell.ConsoleGuiTools.dll' # Version number of this module. -ModuleVersion = '0.6.3' +ModuleVersion = '0.7.2' # Supported PSEditions CompatiblePSEditions = @( 'Core' ) @@ -105,6 +105,13 @@ PrivateData = @{ # ReleaseNotes of this module ReleaseNotes = '# Release Notes +## v0.7.0 + +Upgraded to PowerShell 7.2 and .NET target framework `net60` + +Updated Terminal.Gui to 1.7 + +Fixed #131 - Strip ANSI ## v0.6.3 diff --git a/src/Microsoft.PowerShell.ConsoleGuiTools/OutConsoleGridviewCmdletCommand.cs b/src/Microsoft.PowerShell.ConsoleGuiTools/OutConsoleGridviewCmdletCommand.cs index 3f8a623..f4f5a9b 100644 --- a/src/Microsoft.PowerShell.ConsoleGuiTools/OutConsoleGridviewCmdletCommand.cs +++ b/src/Microsoft.PowerShell.ConsoleGuiTools/OutConsoleGridviewCmdletCommand.cs @@ -52,6 +52,12 @@ public class OutConsoleGridViewCmdletCommand : PSCmdlet, IDisposable [Parameter()] public string Filter { set; get; } + /// + /// gets or sets the whether "minimum UI" mode will be enabled + /// + [Parameter()] + public SwitchParameter MinUI { set; get; } + #endregion Input Parameters // This method gets called once for each cmdlet in the pipeline when the pipeline starts executing @@ -133,6 +139,7 @@ protected override void EndProcessing() Title = Title ?? "Out-ConsoleGridView", OutputMode = OutputMode, Filter = Filter, + MinUI = MinUI, DataTable = dataTable }; diff --git a/src/Microsoft.PowerShell.ConsoleGuiTools/TypeGetter.cs b/src/Microsoft.PowerShell.ConsoleGuiTools/TypeGetter.cs index d1c57a7..48ed4cd 100644 --- a/src/Microsoft.PowerShell.ConsoleGuiTools/TypeGetter.cs +++ b/src/Microsoft.PowerShell.ConsoleGuiTools/TypeGetter.cs @@ -9,6 +9,7 @@ using System.Collections.Generic; using Microsoft.PowerShell.Commands; using OutGridView.Models; +using System.Text.RegularExpressions; namespace OutGridView.Cmdlet { diff --git a/src/Microsoft.PowerShell.GraphicalTools/Microsoft.PowerShell.GraphicalTools.csproj b/src/Microsoft.PowerShell.GraphicalTools/Microsoft.PowerShell.GraphicalTools.csproj index b762ac9..c19b837 100644 --- a/src/Microsoft.PowerShell.GraphicalTools/Microsoft.PowerShell.GraphicalTools.csproj +++ b/src/Microsoft.PowerShell.GraphicalTools/Microsoft.PowerShell.GraphicalTools.csproj @@ -5,7 +5,7 @@ - + diff --git a/src/Microsoft.PowerShell.OutGridView.Models/ApplicationData.cs b/src/Microsoft.PowerShell.OutGridView.Models/ApplicationData.cs index 954c9dd..d193e5a 100644 --- a/src/Microsoft.PowerShell.OutGridView.Models/ApplicationData.cs +++ b/src/Microsoft.PowerShell.OutGridView.Models/ApplicationData.cs @@ -12,6 +12,7 @@ public class ApplicationData public OutputModeOption OutputMode { get; set; } public bool PassThru { get; set; } public string Filter { get; set; } + public bool MinUI { get; set; } public DataTable DataTable { get; set; } } } diff --git a/src/Microsoft.PowerShell.OutGridView.Models/Microsoft.PowerShell.OutGridView.Models.csproj b/src/Microsoft.PowerShell.OutGridView.Models/Microsoft.PowerShell.OutGridView.Models.csproj index c7ed7c6..f1760b6 100644 --- a/src/Microsoft.PowerShell.OutGridView.Models/Microsoft.PowerShell.OutGridView.Models.csproj +++ b/src/Microsoft.PowerShell.OutGridView.Models/Microsoft.PowerShell.OutGridView.Models.csproj @@ -4,6 +4,6 @@ net6.0 - +