增加调试标志位
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -27,6 +27,8 @@ namespace SpineViewer.ViewModels.MainWindow
|
||||
_preferenceViewModel = new(this);
|
||||
}
|
||||
|
||||
public bool IsDebug => App.IsDebug;
|
||||
|
||||
public string Title => $"SpineViewer - v{App.Version}";
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user