mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 17:56:44 +02:00
[PTRun][Shell]Select which shell is used (#28121)
* [PTRun] LeaveShellOpen condition added to run command * [PTRun] Keep shell open added to shell plugin settings. * [PTRun] Unnecessary variable deleted. Formatting. * [PTRun] Variable name changed. * [PTRun] Shell selection * [PTRun] Bugfix * [PTRun] Review comments. * [PTRun] Revert commit * [PTRun] An enumaration is added to PluginAdditionalOption for selection types.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Microsoft.PowerToys.Settings.UI.Library;
|
||||
@@ -17,9 +18,9 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
_additionalOption = additionalOption;
|
||||
}
|
||||
|
||||
public string DisplayLabel { get => _additionalOption.DisplayLabel; }
|
||||
public string DisplayLabel => _additionalOption.DisplayLabel;
|
||||
|
||||
public string DisplayDescription { get => _additionalOption.DisplayDescription; }
|
||||
public string DisplayDescription => _additionalOption.DisplayDescription;
|
||||
|
||||
public bool Value
|
||||
{
|
||||
@@ -34,6 +35,25 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
public List<string> ComboBoxOptions => _additionalOption.ComboBoxOptions;
|
||||
|
||||
public int Option
|
||||
{
|
||||
get => _additionalOption.Option;
|
||||
set
|
||||
{
|
||||
if (value != _additionalOption.Option)
|
||||
{
|
||||
_additionalOption.Option = value;
|
||||
NotifyPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool ShowComboBox => _additionalOption.SelectionTypeValue == (int)PluginAdditionalOption.SelectionType.Combobox && _additionalOption.ComboBoxOptions != null && _additionalOption.ComboBoxOptions.Count > 0;
|
||||
|
||||
public bool ShowCheckBox => _additionalOption.SelectionTypeValue == (int)PluginAdditionalOption.SelectionType.Checkbox;
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
private void NotifyPropertyChanged([CallerMemberName] string propertyName = "")
|
||||
|
||||
Reference in New Issue
Block a user