Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
lzcapp committed Jan 10, 2025
1 parent 2bf4531 commit 37b72e0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
13 changes: 9 additions & 4 deletions KindleMate2/FrmMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using System.Runtime.InteropServices;
using System.Text;
using System.Text.RegularExpressions;
using AutoUpdaterDotNET;
using DarkModeForms;
using KindleMate2.Entities;
using KindleMate2.Properties;
Expand Down Expand Up @@ -181,10 +180,16 @@ private void SetLang() {

private void SetTheme() {
_isDarkTheme = _staticData.IsDarkTheme();
if (_isDarkTheme) {
_ = new DarkModeCS(this, false);
try {
if (_isDarkTheme) {
_ = new DarkModeCS(this, false);
}
} catch (Exception e) {
Console.WriteLine(e);
throw;
} finally {
menuTheme.Image = _isDarkTheme ? Resources.sun : Resources.new_moon;
}
menuTheme.Image = _isDarkTheme ? Resources.sun : Resources.new_moon;
}

private void FrmMain_Load(object? sender, EventArgs e) {
Expand Down
4 changes: 2 additions & 2 deletions KindleMate2/KindleMate2.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<ApplicationIcon>bookmark.ico</ApplicationIcon>
<StartupObject>KindleMate2.Program</StartupObject>
<PackageIcon>bookmark.png</PackageIcon>
<PackageIcon>bookmark.ico</PackageIcon>
<RepositoryUrl>https://github.com/lzcapp/KindleMate2.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageProjectUrl>https://github.com/lzcapp/KindleMate2</PackageProjectUrl>
Expand Down Expand Up @@ -125,7 +125,7 @@
</ItemGroup>

<ItemGroup>
<None Include="Resources\bookmark.png">
<None Include="Resources\bookmark.ico">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
Expand Down
1 change: 1 addition & 0 deletions KindleMate2/StaticData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1126,6 +1126,7 @@ internal static void CheckUpdate() {
AutoUpdater.ShowRemindLaterButton = false;
var currentDirectory = new DirectoryInfo(Application.StartupPath);
if (currentDirectory.Parent != null) {
//AutoUpdater.DownloadPath = currentDirectory.Parent.FullName;
AutoUpdater.InstallationPath = currentDirectory.Parent.FullName;
}
//AutoUpdater.ExecutablePath = "./KindleMate2.exe";
Expand Down

0 comments on commit 37b72e0

Please sign in to comment.