Skip to content

Commit c264238

Browse files
authored
Merge pull request #663 from t1m0thyj/feat/dotnet-10
Update to .NET 10 and use built-in dark mode
2 parents 499e9f4 + 19d7c4c commit c264238

18 files changed

+45
-875
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121

2222
- uses: actions/setup-dotnet@v5
2323
with:
24-
dotnet-version: 8.0.x
24+
dotnet-version: 10.0.x
2525

2626
- uses: microsoft/setup-msbuild@v2
2727

@@ -41,7 +41,7 @@ jobs:
4141
- uses: actions/upload-artifact@v5
4242
with:
4343
name: exe-${{ matrix.platform }}
44-
path: src\bin\Release\net8.0-windows10.0.19041.0\win-${{ matrix.platform }}\publish\*.exe
44+
path: src\bin\Release\net10.0-windows10.0.19041.0\win-${{ matrix.platform }}\publish\*.exe
4545

4646
- run: msbuild uwp\WinDynamicDesktop.Package.wapproj /v:m /p:AppxBundle=$env:AppxBundle /p:Configuration=$env:Configuration /p:Platform=$env:Platform /p:UapAppxPackageBuildMode=$env:UapAppxPackageBuildMode /p:UseTemporarySignCert=$env:UseTemporarySignCert
4747
env:
@@ -66,7 +66,7 @@ jobs:
6666

6767
- uses: actions/setup-dotnet@v5
6868
with:
69-
dotnet-version: 8.0.x
69+
dotnet-version: 10.0.x
7070

7171
- run: |
7272
cp .env.example .env

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
- uses: actions/setup-dotnet@v5
1919
with:
20-
dotnet-version: 8.0.x
20+
dotnet-version: 10.0.x
2121

2222
- uses: microsoft/setup-msbuild@v2
2323

scripts/package.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ dotnet restore WinDynamicDesktop.sln
1515

1616
foreach ($platform in $appPlatforms) {
1717
dotnet publish src\WinDynamicDesktop.csproj -a $platform -c Release --no-restore --self-contained -p:EnableCompressionInSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true
18-
Copy-Item -Path "src\bin\Release\net8.0-windows10.0.19041.0\win-$platform\publish\WinDynamicDesktop.exe" -Destination "dist\WinDynamicDesktop_$appVersion`_$platform`_Portable.exe"
18+
Copy-Item -Path "src\bin\Release\net10.0-windows10.0.19041.0\win-$platform\publish\WinDynamicDesktop.exe" -Destination "dist\WinDynamicDesktop_$appVersion`_$platform`_Portable.exe"
1919

2020
iscc scripts\installer.iss /dMyAppPlatform="$platform" /dMyAppVersion="$appVersion"
2121
}

src/AboutDialog.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ public partial class AboutDialog : Form
2020
public AboutDialog()
2121
{
2222
InitializeComponent();
23-
DarkUI.ThemeForm(this);
2423
Localization.TranslateForm(this);
2524
}
2625

src/AppContext.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ private void CheckSingleInstance(string[] args)
6565
private void InitializeTrayIcon()
6666
{
6767
Application.ApplicationExit += OnApplicationExit;
68-
Dark.Net.DarkNet.Instance.UserDefaultAppThemeIsDarkChanged += DarkUI.UserDefaultAppThemeIsDarkChanged;
6968

7069
notifyIcon = new NotifyIcon
7170
{
@@ -79,6 +78,15 @@ private void InitializeTrayIcon()
7978
Localization.NotifyIfTestMode();
8079
}
8180

81+
public static void HandleThemeChange()
82+
{
83+
Application.SetColorMode(SystemColorMode.System);
84+
foreach (Form form in Application.OpenForms)
85+
{
86+
form.Invalidate();
87+
}
88+
}
89+
8290
public static void ShowPopup(string message, string title = null)
8391
{
8492
notifyIcon.BalloonTipTitle = title ?? "WinDynamicDesktop";

0 commit comments

Comments
 (0)