Permalink
Browse files

Minor changes in settings UI for closing functions.

  • Loading branch information...
1 parent cf960ef commit f2720b040e90385e416770b87606835968f55c88 @Grabacr07 committed Dec 27, 2016
@@ -61,6 +61,15 @@ public class Resources {
}
/// <summary>
+ /// Looks up a localized string similar to provided by Windows.
+ /// </summary>
+ public static string Common_ProvidedByWinows {
+ get {
+ return ResourceManager.GetString("Common_ProvidedByWinows", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to Reference.
/// </summary>
public static string Common_Reference {
@@ -131,8 +140,7 @@ public class Resources {
return ResourceManager.GetString("Settings_Background_SourceImageFolder", resourceCulture);
}
}
-
-
+
/// <summary>
/// Looks up a localized string similar to Close desktop.
/// </summary>
@@ -152,15 +160,6 @@ public class Resources {
}
/// <summary>
- /// Looks up a localized string similar to provided by Windows with Ctrl+Win+F4.
- /// </summary>
- public static string Settings_CloseDesktop_CloseAndSwitchLeft_Note {
- get {
- return ResourceManager.GetString("Settings_CloseDesktop_CloseAndSwitchLeft_Note", resourceCulture);
- }
- }
-
- /// <summary>
/// Looks up a localized string similar to Close and switch right:.
/// </summary>
public static string Settings_CloseDesktop_CloseAndSwitchRight {
@@ -287,15 +286,6 @@ public class Resources {
}
/// <summary>
- /// Looks up a localized string similar to provided by Windows.
- /// </summary>
- public static string Settings_MoveWindowToCreatedDesktop_CreateOnly_Note {
- get {
- return ResourceManager.GetString("Settings_MoveWindowToCreatedDesktop_CreateOnly_Note", resourceCulture);
- }
- }
-
- /// <summary>
/// Looks up a localized string similar to Move:.
/// </summary>
public static string Settings_MoveWindowToCreatedDesktop_Move {
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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);
@@ -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}" />
@@ -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>

0 comments on commit f2720b0

Please sign in to comment.