增加 wallpaper view
This commit is contained in:
@@ -77,7 +77,15 @@ namespace SpineViewer.ViewModels.MainWindow
|
||||
public SFMLRendererViewModel SFMLRendererViewModel => _sfmlRendererViewModel;
|
||||
private readonly SFMLRendererViewModel _sfmlRendererViewModel;
|
||||
|
||||
public RelayCommand Cmd_Exit => new(App.Current.Shutdown);
|
||||
public RelayCommand Cmd_SwitchWallpaperView => _cmd_SwitchWallpaperView ??= new(() =>
|
||||
{
|
||||
_preferenceViewModel.WallpaperView = !_preferenceViewModel.WallpaperView;
|
||||
_preferenceViewModel.SavePreference();
|
||||
});
|
||||
private RelayCommand _cmd_SwitchWallpaperView;
|
||||
|
||||
public RelayCommand Cmd_Exit => _cmd_Exit ??= new(App.Current.Shutdown);
|
||||
private RelayCommand? _cmd_Exit;
|
||||
|
||||
/// <summary>
|
||||
/// 打开工作区
|
||||
@@ -137,5 +145,6 @@ namespace SpineViewer.ViewModels.MainWindow
|
||||
_spineObjectListViewModel.LoadedSpineObjects = value.LoadedSpineObjects;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -111,6 +111,7 @@ namespace SpineViewer.ViewModels.MainWindow
|
||||
DebugPoints = DebugPoints,
|
||||
DebugClippings = DebugClippings,
|
||||
|
||||
WallpaperView = WallpaperView,
|
||||
RenderSelectedOnly = RenderSelectedOnly,
|
||||
AssociateFileSuffix = AssociateFileSuffix,
|
||||
AppLanguage = AppLanguage,
|
||||
@@ -136,6 +137,7 @@ namespace SpineViewer.ViewModels.MainWindow
|
||||
DebugPoints = value.DebugPoints;
|
||||
DebugClippings = value.DebugClippings;
|
||||
|
||||
WallpaperView = value.WallpaperView;
|
||||
RenderSelectedOnly = value.RenderSelectedOnly;
|
||||
AssociateFileSuffix = value.AssociateFileSuffix;
|
||||
AppLanguage = value.AppLanguage;
|
||||
@@ -244,6 +246,19 @@ namespace SpineViewer.ViewModels.MainWindow
|
||||
|
||||
public static ImmutableArray<AppLanguage> AppLanguageOptions { get; } = Enum.GetValues<AppLanguage>().ToImmutableArray();
|
||||
|
||||
public bool AutoRun
|
||||
{
|
||||
get => throw new NotImplementedException();
|
||||
set => throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool WallpaperView
|
||||
{
|
||||
get => _wallpaperView;
|
||||
set => SetProperty(ref _wallpaperView, value);
|
||||
}
|
||||
private bool _wallpaperView; // UI 变化通过 PropertyChanged 事件交由 View 层处理
|
||||
|
||||
public bool RenderSelectedOnly
|
||||
{
|
||||
get => _vmMain.SFMLRendererViewModel.RenderSelectedOnly;
|
||||
|
||||
Reference in New Issue
Block a user