Compare commits

...

4 Commits

Author SHA1 Message Date
ww-rm
33d5595b41 增加跳转FFmpeg下载页面菜单命令 2025-11-25 22:53:06 +08:00
ww-rm
c53a5a8332 增加ProgressReporterHandler类型声明 2025-11-18 23:47:44 +08:00
ww-rm
295f74ea6f 去除冗余代码 2025-11-18 20:54:18 +08:00
ww-rm
bc0c30e1ee 修改输出路径 2025-11-10 22:28:32 +08:00
22 changed files with 68 additions and 19 deletions

View File

@@ -6,7 +6,10 @@
<Platforms>x64</Platforms>
<PlatformTarget>x64</PlatformTarget>
<TargetFramework>net8.0-windows</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<BaseOutputPath>$(SolutionDir)out</BaseOutputPath>
<OutputPath>$(BaseOutputPath)\$(Configuration)\$(PlatformTarget)</OutputPath>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<Version>0.16.0</Version>
<UseWPF>true</UseWPF>

View File

@@ -6,7 +6,10 @@
<Platforms>x64</Platforms>
<PlatformTarget>x64</PlatformTarget>
<TargetFramework>net8.0-windows</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<BaseOutputPath>$(SolutionDir)out</BaseOutputPath>
<OutputPath>$(BaseOutputPath)\$(Configuration)\$(PlatformTarget)</OutputPath>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<Version>0.16.6</Version>
<UseWPF>true</UseWPF>

View File

@@ -14,6 +14,14 @@ namespace Spine.Exporters
/// </summary>
public abstract class BaseExporter : IDisposable
{
/// <summary>
/// 进度回调函数
/// </summary>
/// <param name="total">任务总量</param>
/// <param name="done">已完成量</param>
/// <param name="promptText">需要设置的进度提示文本</param>
public delegate void ProgressReporterHandler(float total, float done, string promptText);
/// <summary>
/// 日志器
/// </summary>
@@ -56,14 +64,9 @@ namespace Spine.Exporters
/// <summary>
/// 可选的进度回调函数
/// <list type="number">
/// <item><c>total</c>: 任务总量</item>
/// <item><c>done</c>: 已完成量</item>
/// <item><c>progressText</c>: 需要设置的进度提示文本</item>
/// </list>
/// </summary>
public Action<float, float, string>? ProgressReporter { get => _progressReporter; set => _progressReporter = value; }
protected Action<float, float, string>? _progressReporter;
public ProgressReporterHandler? ProgressReporter { get => _progressReporter; set => _progressReporter = value; }
protected ProgressReporterHandler? _progressReporter;
/// <summary>
/// 背景颜色

View File

@@ -6,7 +6,10 @@
<Platforms>x64</Platforms>
<PlatformTarget>x64</PlatformTarget>
<TargetFramework>net8.0</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<BaseOutputPath>$(SolutionDir)out</BaseOutputPath>
<OutputPath>$(BaseOutputPath)\$(Configuration)\$(PlatformTarget)</OutputPath>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<Version>0.16.11</Version>
</PropertyGroup>

View File

@@ -6,7 +6,10 @@
<Platforms>x64</Platforms>
<PlatformTarget>x64</PlatformTarget>
<TargetFramework>net8.0</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<BaseOutputPath>$(SolutionDir)out</BaseOutputPath>
<OutputPath>$(BaseOutputPath)\$(Configuration)\$(PlatformTarget)</OutputPath>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<Version>2.1.25</Version>
</PropertyGroup>

View File

@@ -6,7 +6,10 @@
<Platforms>x64</Platforms>
<PlatformTarget>x64</PlatformTarget>
<TargetFramework>net8.0</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<BaseOutputPath>$(SolutionDir)out</BaseOutputPath>
<OutputPath>$(BaseOutputPath)\$(Configuration)\$(PlatformTarget)</OutputPath>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<Version>3.4.2</Version>
</PropertyGroup>

View File

@@ -6,7 +6,10 @@
<Platforms>x64</Platforms>
<PlatformTarget>x64</PlatformTarget>
<TargetFramework>net8.0</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<BaseOutputPath>$(SolutionDir)out</BaseOutputPath>
<OutputPath>$(BaseOutputPath)\$(Configuration)\$(PlatformTarget)</OutputPath>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<Version>3.5.51</Version>
</PropertyGroup>

View File

@@ -6,7 +6,10 @@
<Platforms>x64</Platforms>
<PlatformTarget>x64</PlatformTarget>
<TargetFramework>net8.0</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<BaseOutputPath>$(SolutionDir)out</BaseOutputPath>
<OutputPath>$(BaseOutputPath)\$(Configuration)\$(PlatformTarget)</OutputPath>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<Version>3.6.53</Version>
</PropertyGroup>

View File

@@ -6,7 +6,10 @@
<Platforms>x64</Platforms>
<PlatformTarget>x64</PlatformTarget>
<TargetFramework>net8.0</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<BaseOutputPath>$(SolutionDir)out</BaseOutputPath>
<OutputPath>$(BaseOutputPath)\$(Configuration)\$(PlatformTarget)</OutputPath>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<Version>3.7.94</Version>
</PropertyGroup>

View File

@@ -6,7 +6,10 @@
<Platforms>x64</Platforms>
<PlatformTarget>x64</PlatformTarget>
<TargetFramework>net8.0</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<BaseOutputPath>$(SolutionDir)out</BaseOutputPath>
<OutputPath>$(BaseOutputPath)\$(Configuration)\$(PlatformTarget)</OutputPath>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<Version>3.8.99</Version>
</PropertyGroup>

View File

@@ -6,7 +6,10 @@
<Platforms>x64</Platforms>
<PlatformTarget>x64</PlatformTarget>
<TargetFramework>net8.0</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<BaseOutputPath>$(SolutionDir)out</BaseOutputPath>
<OutputPath>$(BaseOutputPath)\$(Configuration)\$(PlatformTarget)</OutputPath>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<Version>4.0.64</Version>
</PropertyGroup>

View File

@@ -6,7 +6,10 @@
<Platforms>x64</Platforms>
<PlatformTarget>x64</PlatformTarget>
<TargetFramework>net8.0</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<BaseOutputPath>$(SolutionDir)out</BaseOutputPath>
<OutputPath>$(BaseOutputPath)\$(Configuration)\$(PlatformTarget)</OutputPath>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<Version>4.1.54</Version>
</PropertyGroup>

View File

@@ -6,7 +6,10 @@
<Platforms>x64</Platforms>
<PlatformTarget>x64</PlatformTarget>
<TargetFramework>net8.0</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<BaseOutputPath>$(SolutionDir)out</BaseOutputPath>
<OutputPath>$(BaseOutputPath)\$(Configuration)\$(PlatformTarget)</OutputPath>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<Version>4.2.74</Version>
</PropertyGroup>

View File

@@ -6,6 +6,7 @@
<s:String x:Key="Str_Tool">Tools</s:String>
<s:String x:Key="Str_Download">Download</s:String>
<s:String x:Key="Str_Help">Help</s:String>
<s:String x:Key="Str_DownloadFFmpeg">Go to download FFmpeg</s:String>
<s:String x:Key="Str_Diagnostics">Diagnostics Info</s:String>
<s:String x:Key="Str_Abount">About</s:String>
<s:String x:Key="Str_Experiment">Experimental Features</s:String>

View File

@@ -6,6 +6,7 @@
<s:String x:Key="Str_Tool">ツール</s:String>
<s:String x:Key="Str_Download">ダウンロード</s:String>
<s:String x:Key="Str_Help">ヘルプ</s:String>
<s:String x:Key="Str_DownloadFFmpeg">FFmpeg をダウンロードしに行く</s:String>
<s:String x:Key="Str_Diagnostics">診断情報</s:String>
<s:String x:Key="Str_Abount">バージョン情報</s:String>
<s:String x:Key="Str_Experiment">実験機能</s:String>

View File

@@ -6,6 +6,7 @@
<s:String x:Key="Str_Tool">工具</s:String>
<s:String x:Key="Str_Download">下载</s:String>
<s:String x:Key="Str_Help">帮助</s:String>
<s:String x:Key="Str_DownloadFFmpeg">前往下载 FFmpeg</s:String>
<s:String x:Key="Str_Diagnostics">诊断信息</s:String>
<s:String x:Key="Str_Abount">关于</s:String>
<s:String x:Key="Str_Experiment">实验性功能</s:String>

View File

@@ -6,7 +6,10 @@
<Platforms>x64</Platforms>
<PlatformTarget>x64</PlatformTarget>
<TargetFramework>net8.0-windows</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<BaseOutputPath>$(SolutionDir)out</BaseOutputPath>
<OutputPath>$(BaseOutputPath)\$(Configuration)\$(PlatformTarget)</OutputPath>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<Version>0.16.12</Version>
<OutputType>WinExe</OutputType>

View File

@@ -5,6 +5,7 @@ using SFMLRenderer;
using SpineViewer.Models;
using SpineViewer.Services;
using SpineViewer.Utils;
using System.Diagnostics;
using System.Windows;
using System.Windows.Shell;
@@ -163,6 +164,12 @@ namespace SpineViewer.ViewModels.MainWindow
JsonHelper.Serialize(Workspace, fileName);
}
/// <summary>
/// 打开 FFmpeg 下载页面
/// </summary>
public RelayCommand Cmd_DownloadFFmpeg => _cmd_DownloadFFmpeg ??= new(() => Process.Start(new ProcessStartInfo("https://ffmpeg.org/download.html") { UseShellExecute = true }));
private RelayCommand? _cmd_DownloadFFmpeg;
/// <summary>
/// 显示诊断信息对话框
/// </summary>

View File

@@ -62,8 +62,8 @@
<!--<MenuItem Header="{DynamicResource Str_Tool}"/>-->
<!--<MenuItem Header="{DynamicResource Str_Download}"/>-->
<MenuItem Header="{DynamicResource Str_Help}">
<MenuItem Header="{DynamicResource Str_DownloadFFmpeg}" Command="{Binding Cmd_DownloadFFmpeg}"/>
<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" Visibility="{Binding IsDebug, Mode=OneWay, Converter={StaticResource Boolean2VisibilityConverter}}"/>
</MenuItem>

View File

@@ -41,21 +41,12 @@ namespace SpineViewer.Views
private void ProgressWindow_Loaded(object sender, RoutedEventArgs e)
{
var hwnd = new WindowInteropHelper(this).Handle;
int currentStyle = GetWindowLong(hwnd, GWL_STYLE);
SetWindowLong(hwnd, GWL_STYLE, currentStyle & ~WS_SYSMENU);
int currentStyle = User32.GetWindowLong(hwnd, User32.GWL_STYLE);
User32.SetWindowLong(hwnd, User32.GWL_STYLE, currentStyle & ~User32.WS_SYSMENU);
var vm = (ProgressDialogViewModel)DataContext;
vm.WorkFinished += (s, e) => Dispatcher.Invoke(() => { DialogResult = e; });
vm.Start();
}
private const int GWL_STYLE = -16;
private const int WS_SYSMENU = 0x80000;
[DllImport("user32.dll", SetLastError = true)]
private static extern int GetWindowLong(IntPtr hWnd, int nIndex);
[DllImport("user32.dll")]
private static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong);
}
}

View File

@@ -6,7 +6,10 @@
<Platforms>x64</Platforms>
<PlatformTarget>x64</PlatformTarget>
<TargetFramework>net8.0</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<BaseOutputPath>$(SolutionDir)out</BaseOutputPath>
<OutputPath>$(BaseOutputPath)\$(Configuration)\$(PlatformTarget)</OutputPath>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<Version>0.16.12</Version>
<OutputType>Exe</OutputType>

View File

@@ -6,7 +6,10 @@
<Platforms>x64</Platforms>
<PlatformTarget>x64</PlatformTarget>
<TargetFramework>net8.0-windows</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<BaseOutputPath>$(SolutionDir)out</BaseOutputPath>
<OutputPath>$(BaseOutputPath)\$(Configuration)\$(PlatformTarget)</OutputPath>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<Version>0.16.0</Version>
</PropertyGroup>