This repository was archived by the owner on Mar 26, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAfterimageVersionCheck.cs
More file actions
49 lines (44 loc) · 1.65 KB
/
AfterimageVersionCheck.cs
File metadata and controls
49 lines (44 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
using System.Diagnostics;
using System.Windows;
using YukkuriMovieMaker.Plugin;
namespace Afterimage
{
internal class AfterimageVersionCheck : IPlugin
{
public string Name => "[Version Checker]残像";
public AfterimageVersionCheck()
{
Application.Current?.Dispatcher.InvokeAsync(async () =>
{
try
{
await CheckVersionAndNotifyAsync();
}
catch (Exception ex)
{
Debug.WriteLine($"[AfterimageVersionCheck] バージョンチェック失敗: {ex.Message}");
}
});
}
private static async Task CheckVersionAndNotifyAsync()
{
if (await GetVersion.CheckVersionAsync("残像"))
{
string url = "https://ymm4-info.net/ymme/%E6%AE%8B%E5%83%8F%E3%83%97%E3%83%A9%E3%82%B0%E3%82%A4%E3%83%B3";
var result = MessageBox.Show(
$"「残像エフェクト」に新しいバージョンがあります。\n\n配布サイトを開いて最新バージョンを確認しますか?\n{url}",
"更新通知",
MessageBoxButton.OKCancel,
MessageBoxImage.Information);
if (result == MessageBoxResult.OK)
{
Process.Start(new ProcessStartInfo
{
FileName = url,
UseShellExecute = true
});
}
}
}
}
}