- Add strings

- Adjust combobox
This commit is contained in:
DB p 2025-04-05 01:46:47 +09:00
parent a65e89b86f
commit f3fcaee14e
3 changed files with 35 additions and 10 deletions

View file

@ -134,6 +134,10 @@
<system:String x:Key="actionKeywordsTooltip">Change Action Keywords</system:String>
<system:String x:Key="pluginSearchDelayTime">Plugin seach delay time</system:String>
<system:String x:Key="pluginSearchDelayTimeTooltip">Change Plugin Seach Delay Time</system:String>
<system:String x:Key="FilterComboboxLabel">Advanced Settings:</system:String>
<system:String x:Key="EnabledCombobox">Enabled</system:String>
<system:String x:Key="PriorityCombobox">Priority</system:String>
<system:String x:Key="SearchDelayCombobox">Search Delay</system:String>
<system:String x:Key="currentPriority">Current Priority</system:String>
<system:String x:Key="newPriority">New Priority</system:String>
<system:String x:Key="priority">Priority</system:String>

View file

@ -14,9 +14,24 @@ public class SettingsPanePluginsViewModel : BaseModel
{
private readonly Settings _settings;
private string _selectedDisplayMode = "OnOff";
public string SelectedDisplayMode
{
get => _selectedDisplayMode;
set
{
if (_selectedDisplayMode != value)
{
_selectedDisplayMode = value;
OnPropertyChanged(nameof(SelectedDisplayMode));
UpdateDisplayModeFromSelection();
}
}
}
public void UpdateDisplayModeFromSelection()
{
switch (CurrentDisplayMode)
switch (SelectedDisplayMode)
{
case "OnOff":
IsOnOffSelected = true;

View file

@ -43,25 +43,31 @@
VerticalAlignment="Center"
FontSize="14"
Foreground="{DynamicResource Color15B}"
Text="Advanced Settings:" />
Text="{DynamicResource FilterComboboxLabel}" />
<ComboBox
x:Name="DisplayModeComboBox"
Width="150"
Height="34"
Height="34" HorizontalContentAlignment="Left"
Margin="0 0 4 0"
Background="{DynamicResource Color00B}"
SelectedValue="{Binding CurrentDisplayMode, Mode=TwoWay}"
SelectedValuePath="Content"
SelectedValue="{Binding SelectedDisplayMode, Mode=TwoWay}"
SelectedValuePath="Tag"
SelectionChanged="DisplayModeComboBox_SelectionChanged">
<ComboBoxItem Content="OnOff" IsSelected="True" />
<ComboBoxItem Content="Priority" />
<ComboBoxItem Content="SearchDelay" />
<ComboBoxItem Tag="OnOff">
<TextBlock Text="{DynamicResource EnabledCombobox}" />
</ComboBoxItem>
<ComboBoxItem Tag="Priority">
<TextBlock Text="{DynamicResource PriorityCombobox}" />
</ComboBoxItem>
<ComboBoxItem Tag="SearchDelay">
<TextBlock Text="{DynamicResource SearchDelayCombobox}" />
</ComboBoxItem>
</ComboBox>
<Button
Width="34"
Height="34"
Height="34" FontFamily="{DynamicResource SymbolThemeFontFamily}"
Margin="0 0 20 0"
Content="?"
Content="&#xe9ce;"
FontSize="14" />
<TextBox
Name="PluginFilterTextbox"