Skip to content

Commit

Permalink
新增自动更新检查选项
Browse files Browse the repository at this point in the history
新增管理员运行选项
恢复Github渠道更新
优化抽卡分析代码
修改抽卡记录图标
修复抽卡记录中的计算问题
修复通知问题
  • Loading branch information
JamXi233 committed Jul 10, 2024
1 parent 6b71975 commit 095b801
Show file tree
Hide file tree
Showing 34 changed files with 419 additions and 555 deletions.
17 changes: 13 additions & 4 deletions WaveTools/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
using System.Threading.Tasks;
using Windows.Storage;
using WaveTools.Views;
using SRTools.Depend;
using WaveTools.Depend;


namespace WaveTools
Expand All @@ -50,11 +50,13 @@ public partial class App : Application
private Window m_window;

// 私有构造函数以确保单例
public App()
public App()
{
InitializeComponent();
Init();
InitAppData();
SetupTheme();
InitAdminMode();
}

public static bool IsRequireReboot { get; set; } = false;
Expand All @@ -64,7 +66,6 @@ public App()

protected override async void OnLaunched(LaunchActivatedEventArgs args)
{
await InitAsync();
if (AppDataController.GetTerminalMode() == -1 || AppDataController.GetTerminalMode() == 0)
{
m_window = new MainWindow();
Expand All @@ -85,6 +86,14 @@ private void InitAppData()
}
}

private void InitAdminMode()
{
if (AppDataController.GetAdminMode() == 1)
{
if (!ProcessRun.IsRunAsAdmin()) ProcessRun.RequestAdminAndRestart();
}
}

private void SetupTheme()
{
var dayNight = AppDataController.GetDayNight();
Expand Down Expand Up @@ -119,7 +128,7 @@ public async Task InitTerminalModeAsync(int Mode)
}
}

public async Task InitAsync()
public void Init()
{
AllocConsole();
Console.OutputEncoding = Encoding.UTF8;
Expand Down
Loading

0 comments on commit 095b801

Please sign in to comment.