增加调试标志位

This commit is contained in:
ww-rm
2025-11-02 12:24:17 +08:00
parent 50219946ec
commit 10b691d897
4 changed files with 7 additions and 2 deletions

View File

@@ -23,9 +23,11 @@ namespace SpineViewer
public partial class App : Application
{
#if DEBUG
public const bool IsDebug = true;
public const string AppName = "SpineViewer_D";
public const string ProgId = "SpineViewer_D.skel";
#else
public const bool IsDebug = false;
public const string AppName = "SpineViewer";
public const string ProgId = "SpineViewer.skel";
#endif

View File

@@ -27,6 +27,8 @@ namespace SpineViewer.ViewModels.MainWindow
_preferenceViewModel = new(this);
}
public bool IsDebug => App.IsDebug;
public string Title => $"SpineViewer - v{App.Version}";
/// <summary>

View File

@@ -153,7 +153,7 @@ namespace SpineViewer.ViewModels.MainWindow
public uint MaxFps
{
get => _renderer.MaxFps;
set => SetProperty(_renderer.MaxFps, value, v => _renderer.MaxFps = value);
set => SetProperty(_renderer.MaxFps, value, v => _renderer.MaxFps = _wallpaperRenderer.MaxFps = value);
}
public float Speed

View File

@@ -31,6 +31,7 @@
MouseDoubleClick="_notifyIcon_MouseDoubleClick">
<hc:NotifyIcon.ContextMenu>
<ContextMenu>
<MenuItem Header="{DynamicResource Str_Debug}" Click="DebugMenuItem_Click" Visibility="{Binding IsDebug, Mode=OneWay, Converter={StaticResource Boolean2VisibilityConverter}}"/>
<MenuItem Header="{DynamicResource Str_WallpaperView}" Command="{Binding Cmd_SwitchWallpaperView}" IsChecked="{Binding PreferenceViewModel.WallpaperView}"/>
<Separator/>
<MenuItem Header="{DynamicResource Str_Exit}" Command="{Binding Cmd_ExitFromTray}"/>
@@ -63,7 +64,7 @@
<MenuItem Header="{DynamicResource Str_Diagnostics}" Command="{Binding Cmd_ShowDiagnosticsDialog}"/>
<Separator/>
<MenuItem Header="{DynamicResource Str_Abount}" Command="{Binding Cmd_ShowAboutDialog}"/>
<MenuItem Header="{DynamicResource Str_Debug}" Click="DebugMenuItem_Click"/>
<MenuItem Header="{DynamicResource Str_Debug}" Click="DebugMenuItem_Click" Visibility="{Binding IsDebug, Mode=OneWay, Converter={StaticResource Boolean2VisibilityConverter}}"/>
</MenuItem>
<!--<MenuItem Header="{DynamicResource Str_Experiment}"/>-->
</Menu>