Skip to content

Commit

Permalink
名前に関するコード調整
Browse files Browse the repository at this point in the history
  • Loading branch information
Freeesia committed Mar 16, 2024
1 parent be70e52 commit 3d24ecb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion VdLabel/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public string? Name
}
}

public bool ShowChangeNameWarning => !this.virtualDesktopCompat.IsSupportedChangeName;
public bool ShowNameWarning => !this.virtualDesktopCompat.IsSupportedName;

public string? ImagePath
{
Expand Down
2 changes: 1 addition & 1 deletion VdLabel/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
Grid.Row="2"
Grid.Column="1"
IsClosable="False"
IsOpen="{Binding ShowChangeNameWarning}"
IsOpen="{Binding ShowNameWarning}"
Message="現在のWindowsバージョンでは仮想デスクトップの名前同期はサポートされません"
Severity="Warning" />
<CheckBox
Expand Down
10 changes: 5 additions & 5 deletions VdLabel/VirtualDesktopService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public async Task StartAsync(CancellationToken cancellationToken)
config.DesktopConfigs.Add(c);
}
var name = c.Name;
if (!string.IsNullOrEmpty(name) && this.virtualDesktopCompat.IsSupportedChangeName)
if (!string.IsNullOrEmpty(name) && this.virtualDesktopCompat.IsSupportedName)
{
desktop.Name = name;
}
Expand Down Expand Up @@ -158,15 +158,15 @@ public Task StopAsync(CancellationToken cancellationToken)

class VirtualDesktopCompat : IVirtualDesktopCompat
{
public bool IsSupportedChangeName { get; }
public bool IsSupportedName { get; }

public VirtualDesktopCompat()
{
this.IsSupportedChangeName = false;
//this.IsSupportedChangeName = OperatingSystem.IsWindowsVersionAtLeast(10, 0, 20348, 0);
//this.IsSupportedName = false;
this.IsSupportedName = OperatingSystem.IsWindowsVersionAtLeast(10, 0, 20348, 0);
}
}
interface IVirtualDesktopCompat
{
bool IsSupportedChangeName { get; }
bool IsSupportedName { get; }
}

0 comments on commit 3d24ecb

Please sign in to comment.