File tree Expand file tree Collapse file tree 4 files changed +11
-8
lines changed
Expand file tree Collapse file tree 4 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ name: .NET
33on :
44 push :
55 branches : [ master ]
6-
76 workflow_dispatch :
87
98jobs :
1413 runs-on : windows-latest
1514
1615 steps :
17- - name : Set up MSBuild
16+ - name : Add MSBuild to PATH
1817 uses : microsoft/setup-msbuild@v1.3.1
1918
2019 - name : Clone repository
3029 run : dotnet pack ${{ env.ProjectName }} --no-build --configuration Release --verbosity normal
3130
3231 - name : Build Windows Forms demo
33- run : msbuild darknet-demo-winforms -p:Configuration=Release -t:build -restore
32+ run : msbuild darknet-demo-winforms -p:Configuration=Release -t:build -restore -m
3433
3534 - name : Build WPF demo
3635 run : dotnet publish darknet-demo-wpf --no-restore --configuration Release -p:PublishSingleFile=true --runtime win-x64 --self-contained false --verbosity normal
4746 with :
4847 name : ${{ env.ProjectName }}
4948 path : upload
49+ if-no-files-found : error
Original file line number Diff line number Diff line change @@ -71,7 +71,12 @@ public void SetCurrentProcessTheme(Theme theme) {
7171
7272 try {
7373 // Windows 10 1903 and later
74- Win32 . SetPreferredAppMode ( theme == Theme . Light ? AppMode . Default : AppMode . AllowDark ) ;
74+ Win32 . SetPreferredAppMode ( theme switch {
75+ Theme . Light => AppMode . Default ,
76+ Theme . Auto => AppMode . AllowDark ,
77+ Theme . Dark => AppMode . ForceDark ,
78+ _ => AppMode . Default
79+ } ) ;
7580 } catch ( Exception e1 ) when ( e1 is not OutOfMemoryException ) {
7681 try {
7782 // Windows 10 1809 only
Original file line number Diff line number Diff line change 33
44 <PropertyGroup >
55 <TargetFrameworks >netcoreapp3.1;net452</TargetFrameworks >
6- <Version >2.1.0 </Version >
6+ <Version >2.1.1 </Version >
77 <LangVersion >latest</LangVersion >
88 <Nullable >enable</Nullable >
99 <UseWindowsForms >true</UseWindowsForms >
You can’t perform that action at this time.
0 commit comments