Skip to content

Commit

Permalink
Minor changes in settings UI for closing functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
Grabacr07 committed Dec 27, 2016
1 parent cf960ef commit f2720b0
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 39 deletions.
30 changes: 10 additions & 20 deletions source/SylphyHorn/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 3 additions & 6 deletions source/SylphyHorn/Properties/Resources.ja.resx
Expand Up @@ -117,6 +117,9 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Common_ProvidedByWinows" xml:space="preserve">
<value>Windows が提供</value>
</data>
<data name="Common_Reference" xml:space="preserve">
<value>参照</value>
</data>
Expand Down Expand Up @@ -147,9 +150,6 @@
<data name="Settings_CloseDesktop_CloseAndSwitchLeft" xml:space="preserve">
<value>閉じて左へ切り替え:</value>
</data>
<data name="Settings_CloseDesktop_CloseAndSwitchLeft_Note" xml:space="preserve">
<value>Windows が Ctrl+Win+F4 で提供</value>
</data>
<data name="Settings_CloseDesktop_CloseAndSwitchRight" xml:space="preserve">
<value>閉じて右へ切り替え:</value>
</data>
Expand Down Expand Up @@ -192,9 +192,6 @@
<data name="Settings_MoveWindowToCreatedDesktop_CreateOnly" xml:space="preserve">
<value>切り替えのみ</value>
</data>
<data name="Settings_MoveWindowToCreatedDesktop_CreateOnly_Note" xml:space="preserve">
<value>Windows が提供</value>
</data>
<data name="Settings_MoveWindowToCreatedDesktop_Move" xml:space="preserve">
<value>移動</value>
</data>
Expand Down
9 changes: 3 additions & 6 deletions source/SylphyHorn/Properties/Resources.resx
Expand Up @@ -117,6 +117,9 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Common_ProvidedByWinows" xml:space="preserve">
<value>provided by Windows</value>
</data>
<data name="Common_Reference" xml:space="preserve">
<value>Reference</value>
</data>
Expand Down Expand Up @@ -147,9 +150,6 @@
<data name="Settings_CloseDesktop_CloseAndSwitchLeft" xml:space="preserve">
<value>Close and switch left:</value>
</data>
<data name="Settings_CloseDesktop_CloseAndSwitchLeft_Note" xml:space="preserve">
<value>provided by Windows with Ctrl+Win+F4</value>
</data>
<data name="Settings_CloseDesktop_CloseAndSwitchRight" xml:space="preserve">
<value>Close and switch right:</value>
</data>
Expand Down Expand Up @@ -192,9 +192,6 @@
<data name="Settings_MoveWindowToCreatedDesktop_CreateOnly" xml:space="preserve">
<value>Switch only</value>
</data>
<data name="Settings_MoveWindowToCreatedDesktop_CreateOnly_Note" xml:space="preserve">
<value>provided by Windows</value>
</data>
<data name="Settings_MoveWindowToCreatedDesktop_Move" xml:space="preserve">
<value>Move:</value>
</data>
Expand Down
2 changes: 2 additions & 0 deletions source/SylphyHorn/Services/KeyHelper.cs
Expand Up @@ -17,6 +17,8 @@ public static class KeyHelper
{
public static int[] VirtualDesktopCreationKey { get; } = new ShortcutKey(VirtualKey.D, VirtualKey.NoName, VirtualKey.Control).ToSerializable();

public static int[] VirtualDesktopDeletionKey { get; } = new ShortcutKey(VirtualKey.F4, VirtualKey.NoName, VirtualKey.Control).ToSerializable();

public static bool IsModifyKey(this VirtualKey key)
{
return IsModifyKey((uint)key);
Expand Down
21 changes: 14 additions & 7 deletions source/SylphyHorn/UI/SettingsWindow.xaml
Expand Up @@ -316,7 +316,7 @@
<UniformGrid Grid.Column="2"
Columns="1">
<controls:ShortcutKeyBox Current="{Binding Source={x:Static services:KeyHelper.VirtualDesktopCreationKey}, Mode=OneWay}"
Text="{Binding Source={x:Static services:ResourceService.Current}, Path=Resources.Settings_MoveWindowToCreatedDesktop_CreateOnly_Note, StringFormat=' ({0})', Mode=OneWay}"
Text="{Binding Source={x:Static services:ResourceService.Current}, Path=Resources.Common_ProvidedByWinows, StringFormat=' ({0})', Mode=OneWay}"
IsReadOnly="True"
IsEnabled="False" />
<controls:ShortcutKeyBox Current="{Binding Source={x:Static serialization:Settings.ShortcutKey}, Path=MoveNew.Value, Mode=TwoWay}" />
Expand All @@ -334,14 +334,21 @@
<ColumnDefinition Width="8" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<UniformGrid Columns="1">
<TextBlock Text="{Binding Source={x:Static services:ResourceService.Current}, Path=Resources.Settings_CloseDesktop_CloseAndSwitchLeft}" />
<TextBlock Text="{Binding Source={x:Static services:ResourceService.Current}, Path=Resources.Settings_CloseDesktop_CloseAndSwitchRight}" />
</UniformGrid>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="2*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Text="{Binding Source={x:Static services:ResourceService.Current}, Path=Resources.Settings_CloseDesktop_CloseAndSwitchLeft}" />
<TextBlock Grid.Row="1" Text="{Binding Source={x:Static services:ResourceService.Current}, Path=Resources.Settings_CloseDesktop_CloseAndSwitchRight}" />
</Grid>
<UniformGrid Grid.Column="2"
Columns="1">
<controls:ShortcutKeyBox Current="{Binding Source={x:Static serialization:Settings.ShortcutKey}, Path=CloseAndSwitchLeft.Value, Mode=TwoWay}"
Text="{Binding Source={x:Static services:ResourceService.Current}, Path=Resources.Settings_CloseDesktop_CloseAndSwitchLeft_Note, StringFormat=' ({0})', Mode=OneWay}" />
<controls:ShortcutKeyBox Current="{Binding Source={x:Static services:KeyHelper.VirtualDesktopDeletionKey}, Mode=OneWay}"
Text="{Binding Source={x:Static services:ResourceService.Current}, Path=Resources.Common_ProvidedByWinows, StringFormat=' ({0})', Mode=OneWay}"
IsReadOnly="True"
IsEnabled="False" />
<controls:ShortcutKeyBox Current="{Binding Source={x:Static serialization:Settings.ShortcutKey}, Path=CloseAndSwitchLeft.Value, Mode=TwoWay}" />
<controls:ShortcutKeyBox Current="{Binding Source={x:Static serialization:Settings.ShortcutKey}, Path=CloseAndSwitchRight.Value, Mode=TwoWay}" />
</UniformGrid>
</Grid>
Expand Down

0 comments on commit f2720b0

Please sign in to comment.