File tree Expand file tree Collapse file tree 3 files changed +15
-14
lines changed
darknet-demo-wpf/Properties/PublishProfiles Expand file tree Collapse file tree 3 files changed +15
-14
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,8 @@ public class DarkNet: IDarkNet {
3939 private bool ? _userDefaultAppThemeIsDark ;
4040 private bool ? _userTaskbarThemeIsDark ;
4141 private Theme ? _preferredAppMode ;
42- private int _processThemeChanged ; // int instead of bool to support Interlocked atomic operations
42+
43+ private volatile int _processThemeChanged ; // int instead of bool to support Interlocked atomic operations
4344
4445 /// <inheritdoc />
4546 public event EventHandler < bool > ? UserDefaultAppThemeIsDarkChanged ;
@@ -146,7 +147,7 @@ private static bool IsWindowVisible(IntPtr windowHandle) {
146147 }
147148
148149 private void ImplicitlySetProcessThemeIfFirstCall ( Theme theme ) {
149- if ( Interlocked . CompareExchange ( ref _processThemeChanged , 1 , 0 ) == 0 ) {
150+ if ( _processThemeChanged == 0 ) {
150151 SetCurrentProcessTheme ( theme ) ;
151152 }
152153 }
Original file line number Diff line number Diff line change 22
33 <PropertyGroup >
44 <TargetFrameworks >netcoreapp3.1;net452</TargetFrameworks >
5- <Version >2.0.0 </Version >
5+ <Version >2.0.1 </Version >
66 <LangVersion >latest</LangVersion >
77 <Nullable >enable</Nullable >
88 <UseWindowsForms >true</UseWindowsForms >
Original file line number Diff line number Diff line change 33https://go.microsoft.com/fwlink/?LinkID=208121.
44-->
55<Project >
6- <PropertyGroup >
7- <Configuration >Release</Configuration >
8- <Platform >Any CPU</Platform >
9- <PublishDir >bin\Release\net6.0-windows\publish\ win-x86\</PublishDir >
10- <PublishProtocol >FileSystem</PublishProtocol >
11- <TargetFramework >net6.0-windows</TargetFramework >
12- <RuntimeIdentifier >win-x86</RuntimeIdentifier >
13- <SelfContained >false</SelfContained >
14- <PublishSingleFile >true</PublishSingleFile >
15- <PublishReadyToRun >false</PublishReadyToRun >
16- </PropertyGroup >
6+ <PropertyGroup >
7+ <Configuration >Release</Configuration >
8+ <Platform >Any CPU</Platform >
9+ <PublishDir >bin\Release\net6.0-windows\win-x86\publish \</PublishDir >
10+ <PublishProtocol >FileSystem</PublishProtocol >
11+ <TargetFramework >net6.0-windows</TargetFramework >
12+ <RuntimeIdentifier >win-x86</RuntimeIdentifier >
13+ <SelfContained >false</SelfContained >
14+ <PublishSingleFile >true</PublishSingleFile >
15+ <PublishReadyToRun >false</PublishReadyToRun >
16+ </PropertyGroup >
1717</Project >
You can’t perform that action at this time.
0 commit comments