Skip to content

Commit

Permalink
Update base
Browse files Browse the repository at this point in the history
  • Loading branch information
bagusnl committed Nov 22, 2024
2 parents 1147f9b + 06582e2 commit a62d352
Show file tree
Hide file tree
Showing 75 changed files with 925 additions and 3,782 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@
[submodule "H.NotifyIcon"]
path = H.NotifyIcon
url = https://github.com/CollapseLauncher/H.NotifyIcon
[submodule "Hi3Helper.Win32"]
path = Hi3Helper.Win32
url = https://github.com/CollapseLauncher/Hi3Helper.Win32
1 change: 1 addition & 0 deletions .idea/.idea.CollapseLauncher/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions CollapseLauncher.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@
<BuildType Solution="Publish|*" Project="Release" />
<Platform Project="x64" />
</Project>
<Project Path="Hi3Helper.Win32/Hi3Helper.Win32.csproj">
<BuildType Solution="Publish|*" Project="Debug" />
<Platform Project="x64" />
</Project>
<Project Path="ImageEx\ImageEx\ImageEx.csproj" Id="9c7abc1d-504e-45c4-ae76-98a9f6e28c80">
<BuildType Solution="Publish|*" Project="Release" />
<Platform Project="x64" />
Expand Down
7 changes: 5 additions & 2 deletions CollapseLauncher/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
using Hi3Helper;
using Hi3Helper.SentryHelper;
using Hi3Helper.Shared.Region;
using Hi3Helper.Win32.Native;
using Hi3Helper.Win32.Native.Enums;
using Microsoft.UI;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Media;
Expand All @@ -12,7 +14,6 @@
using System.Linq;
using Windows.UI;
using static CollapseLauncher.InnerLauncherConfig;
using static Hi3Helper.InvokeProp;
using static Hi3Helper.Logger;

namespace CollapseLauncher
Expand All @@ -37,6 +38,7 @@ public App()
DebugSettings.XamlResourceReferenceFailed += static (sender, args) =>
{
LogWriteLine($"[XAML_RES_REFERENCE] Sender: {sender}\r\n{args!.Message}", LogType.Error, true);
SentryHelper.ExceptionHandler(new Exception($"{args.Message}"), SentryHelper.ExceptionType.UnhandledXaml);
#if !DEBUG
MainEntryPoint.SpawnFatalErrorConsole(new Exception(args!.Message));
#endif
Expand All @@ -45,6 +47,7 @@ public App()
DebugSettings.BindingFailed += static (sender, args) =>
{
LogWriteLine($"[XAML_BINDING] Sender: {sender}\r\n{args!.Message}", LogType.Error, true);
SentryHelper.ExceptionHandler(new Exception($"{args.Message}"), SentryHelper.ExceptionType.UnhandledXaml);
#if !DEBUG
MainEntryPoint.SpawnFatalErrorConsole(new Exception(args!.Message));
#endif
Expand All @@ -64,7 +67,7 @@ public App()
}

RequestedTheme = IsAppThemeLight ? ApplicationTheme.Light : ApplicationTheme.Dark;
SetPreferredAppMode(ShouldAppsUseDarkMode() ? PreferredAppMode.AllowDark : PreferredAppMode.Default);
PInvoke.SetPreferredAppMode(PInvoke.ShouldAppsUseDarkMode() ? PreferredAppMode.AllowDark : PreferredAppMode.Default);

this.InitializeComponent();
}
Expand Down
176 changes: 0 additions & 176 deletions CollapseLauncher/Classes/CoCreateInstance.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
using CollapseLauncher.Dialogs;
using CollapseLauncher.Extension;
using CollapseLauncher.FileDialogCOM;
using CollapseLauncher.Helper;
using Hi3Helper;
using Hi3Helper.Data;
using Hi3Helper.Shared.Region;
using Hi3Helper.Win32.FileDialogCOM;
using Microsoft.UI.Text;
using Microsoft.UI.Xaml.Controls;
using System;
using System.IO;
using System.Linq;
using System.Threading.Tasks;

#nullable enable
namespace CollapseLauncher.Classes.FileDialogCOM
namespace CollapseLauncher.FileDialogCOM
{
internal static class FileDialogHelper
{
Expand Down Expand Up @@ -95,7 +94,7 @@ await SpawnInvalidDialog(
return dirPath;


async Task SpawnInvalidDialog(string title, string message, string selectedPath, bool isUseLegacyFormatting = false)
async Task SpawnInvalidDialog(string dialogTitle, string message, string selectedPath, bool isUseLegacyFormatting = false)
{
TextBlock textBlock = new TextBlock()
{
Expand All @@ -113,7 +112,7 @@ async Task SpawnInvalidDialog(string title, string message, string selectedPath,
}

await SimpleDialogs.SpawnDialog(
isUseLegacyFormatting ? title : string.Format(Locale.Lang._Dialogs.InvalidGameDirNewTitleFormat, title),
isUseLegacyFormatting ? dialogTitle : string.Format(Locale.Lang._Dialogs.InvalidGameDirNewTitleFormat, dialogTitle),
textBlock,
(WindowUtility.CurrentWindow as MainWindow)?.Content,
Locale.Lang._Misc.Okay,
Expand Down
49 changes: 0 additions & 49 deletions CollapseLauncher/Classes/FileDialogCOM/Enums.cs

This file was deleted.

Loading

0 comments on commit a62d352

Please sign in to comment.