mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 11:16:51 +02:00
MVVM refactoring for web search plugin, part 1
1. #486 2. fix #778 #763 #742 3. MVVM refactoring 4. remove IMultipleActionKeywords interface, use PluginManager directly
This commit is contained in:
@@ -1,42 +1,60 @@
|
||||
<Window x:Class="Wox.Plugin.WebSearch.WebSearchSetting"
|
||||
<Window x:Class="Wox.Plugin.WebSearch.SearchSourceSettingWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:vm="clr-namespace:Wox.Plugin.WebSearch"
|
||||
mc:Ignorable="d"
|
||||
ResizeMode="NoResize"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
Title="WebSearchSetting" Height="350" Width="674.766">
|
||||
Title="Search Source Setting" Height="300" Width="500"
|
||||
d:DataContext="{d:DesignInstance vm:SearchSourceViewModel}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition Height="60"></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="60" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="120"></ColumnDefinition>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
<ColumnDefinition Width="120" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Margin="10" FontSize="14" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Right" Text="{DynamicResource wox_plugin_websearch_title}"></TextBlock>
|
||||
<TextBox x:Name="WebSearchName" Margin="10" Grid.Row="0" Width="400" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Left"></TextBox>
|
||||
<TextBlock Margin="10" FontSize="14" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center"
|
||||
HorizontalAlignment="Right" Text="{DynamicResource wox_plugin_websearch_title}" />
|
||||
<TextBox Text="{Binding SearchSource.Title}" Margin="10" Grid.Row="0" Width="300" Grid.Column="1" VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left" />
|
||||
|
||||
<TextBlock Margin="10" FontSize="14" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Right" Text="{DynamicResource wox_plugin_websearch_url}"></TextBlock>
|
||||
<TextBox x:Name="Url" Margin="10" Grid.Row="1" Width="400" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Left"></TextBox>
|
||||
<TextBlock Margin="10" FontSize="14" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center"
|
||||
HorizontalAlignment="Right" Text="{DynamicResource wox_plugin_websearch_url}" />
|
||||
<TextBox Text="{Binding SearchSource.Url}" Margin="10" Grid.Row="1" Width="300" Grid.Column="1" VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left" />
|
||||
|
||||
<TextBlock Margin="10" FontSize="14" Grid.Row="2" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Right" Text="{DynamicResource wox_plugin_websearch_action_keyword}"></TextBlock>
|
||||
<TextBox x:Name="Actionword" Margin="10" Grid.Row="2" Width="400" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Left"></TextBox>
|
||||
<TextBlock Margin="10" FontSize="14" Grid.Row="2" Grid.Column="0" VerticalAlignment="Center"
|
||||
HorizontalAlignment="Right" Text="{DynamicResource wox_plugin_websearch_action_keyword}" />
|
||||
<TextBox Text="{Binding SearchSource.ActionKeyword}" Margin="10" Grid.Row="2" Width="300" Grid.Column="1"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
|
||||
<TextBlock Margin="10" FontSize="14" Grid.Row="3" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Right" Text="{DynamicResource wox_plugin_websearch_enable}"></TextBlock>
|
||||
<CheckBox x:Name="EnableCheckBox" IsChecked="True" Margin="10" Grid.Row="3" Grid.Column="1" VerticalAlignment="Center"></CheckBox>
|
||||
<TextBlock Margin="10" FontSize="14" Grid.Row="3" Grid.Column="0" VerticalAlignment="Center"
|
||||
HorizontalAlignment="Right" Text="{DynamicResource wox_plugin_websearch_enable}" />
|
||||
<CheckBox IsChecked="{Binding SearchSource.Enabled}" Margin="10" Grid.Row="3" Grid.Column="1" VerticalAlignment="Center" />
|
||||
|
||||
<TextBlock Margin="10" FontSize="14" Grid.Row="4" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Right" Text="{DynamicResource wox_plugin_websearch_icon}"></TextBlock>
|
||||
<TextBlock Margin="10" FontSize="14" Grid.Row="4" Grid.Column="0" VerticalAlignment="Center"
|
||||
HorizontalAlignment="Right" Text="{DynamicResource wox_plugin_websearch_icon}" />
|
||||
<StackPanel Orientation="Horizontal" Grid.Row="4" Grid.Column="1" Margin="10">
|
||||
<Image x:Name="WebSearchIcon" Width="24" Height="24" Margin="0 0 10 0" />
|
||||
<Button x:Name="SelectIconButton" Height="24" Click="SelectIconButtonOnClick" Content="{DynamicResource wox_plugin_websearch_select_icon}"></Button>
|
||||
<Image Source="{Binding SearchSource.Image ,IsAsync=True}" Width="24" Height="24" Margin="0 0 10 0" />
|
||||
<Button Click="OnSelectIconClick" Height="24"
|
||||
Content="{DynamicResource wox_plugin_websearch_select_icon}" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="5" Grid.Column="1">
|
||||
<Button x:Name="CancelButton" Click="CancelButtonOnClick" Margin="10 0 10 0" Width="80" Height="25" Content="{DynamicResource wox_plugin_websearch_cancel}"/>
|
||||
<Button x:Name="ConfirmButton" Margin="10 0 10 0" Width="80" Height="25" Click="ConfirmButtonOnClick" Content="{DynamicResource wox_plugin_websearch_add}"/>
|
||||
<Button Click="OnCancelButtonClick"
|
||||
Margin="10 0 10 0" Width="80" Height="25"
|
||||
Content="{DynamicResource wox_plugin_websearch_cancel}" />
|
||||
<Button Click="OnConfirmButtonClick"
|
||||
Margin="10 0 10 0" Width="80" Height="25"
|
||||
Content="{DynamicResource wox_plugin_websearch_confirm}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Window>
|
||||
</Window>
|
||||
Reference in New Issue
Block a user