Skip to content

Commit d282a56

Browse files
committed
Fix Start-up
1 parent c03ddda commit d282a56

7 files changed

Lines changed: 77 additions & 61 deletions

File tree

DarkMode_2.csproj

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<ProjectGuid>{4632FA56-60E4-4F55-958F-8283C97D2042}</ProjectGuid>
88
<OutputType>WinExe</OutputType>
99
<RootNamespace>DarkMode_2</RootNamespace>
10-
<AssemblyName>DarkMode_2</AssemblyName>
10+
<AssemblyName>DarkMode 2</AssemblyName>
1111
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
1212
<FileAlignment>512</FileAlignment>
1313
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
@@ -79,6 +79,24 @@
7979
<PropertyGroup>
8080
<ApplicationManifest>app.manifest</ApplicationManifest>
8181
</PropertyGroup>
82+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM64'">
83+
<DebugSymbols>true</DebugSymbols>
84+
<OutputPath>bin\ARM64\Debug\</OutputPath>
85+
<DefineConstants>DEBUG;TRACE</DefineConstants>
86+
<DebugType>full</DebugType>
87+
<PlatformTarget>ARM64</PlatformTarget>
88+
<LangVersion>preview</LangVersion>
89+
<ErrorReport>prompt</ErrorReport>
90+
</PropertyGroup>
91+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM64'">
92+
<OutputPath>bin\ARM64\Release\</OutputPath>
93+
<DefineConstants>TRACE</DefineConstants>
94+
<Optimize>true</Optimize>
95+
<DebugType>pdbonly</DebugType>
96+
<PlatformTarget>ARM64</PlatformTarget>
97+
<LangVersion>preview</LangVersion>
98+
<ErrorReport>prompt</ErrorReport>
99+
</PropertyGroup>
82100
<ItemGroup>
83101
<Reference Include="System" />
84102
<Reference Include="System.ComponentModel.Composition" />

DarkMode_2.sln

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,27 @@ EndProject
1010
Global
1111
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1212
Debug|Any CPU = Debug|Any CPU
13+
Debug|ARM64 = Debug|ARM64
1314
Release|Any CPU = Release|Any CPU
15+
Release|ARM64 = Release|ARM64
1416
EndGlobalSection
1517
GlobalSection(ProjectConfigurationPlatforms) = postSolution
1618
{4632FA56-60E4-4F55-958F-8283C97D2042}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
1719
{4632FA56-60E4-4F55-958F-8283C97D2042}.Debug|Any CPU.Build.0 = Debug|Any CPU
20+
{4632FA56-60E4-4F55-958F-8283C97D2042}.Debug|ARM64.ActiveCfg = Debug|ARM64
21+
{4632FA56-60E4-4F55-958F-8283C97D2042}.Debug|ARM64.Build.0 = Debug|ARM64
1822
{4632FA56-60E4-4F55-958F-8283C97D2042}.Release|Any CPU.ActiveCfg = Release|Any CPU
1923
{4632FA56-60E4-4F55-958F-8283C97D2042}.Release|Any CPU.Build.0 = Release|Any CPU
24+
{4632FA56-60E4-4F55-958F-8283C97D2042}.Release|ARM64.ActiveCfg = Release|ARM64
25+
{4632FA56-60E4-4F55-958F-8283C97D2042}.Release|ARM64.Build.0 = Release|ARM64
2026
{9576E314-1F6F-4A71-8AB2-A5138086589B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
2127
{9576E314-1F6F-4A71-8AB2-A5138086589B}.Debug|Any CPU.Build.0 = Debug|Any CPU
28+
{9576E314-1F6F-4A71-8AB2-A5138086589B}.Debug|ARM64.ActiveCfg = Debug|ARM64
29+
{9576E314-1F6F-4A71-8AB2-A5138086589B}.Debug|ARM64.Build.0 = Debug|ARM64
2230
{9576E314-1F6F-4A71-8AB2-A5138086589B}.Release|Any CPU.ActiveCfg = Release|Any CPU
2331
{9576E314-1F6F-4A71-8AB2-A5138086589B}.Release|Any CPU.Build.0 = Release|Any CPU
32+
{9576E314-1F6F-4A71-8AB2-A5138086589B}.Release|ARM64.ActiveCfg = Release|ARM64
33+
{9576E314-1F6F-4A71-8AB2-A5138086589B}.Release|ARM64.Build.0 = Release|ARM64
2434
EndGlobalSection
2535
GlobalSection(SolutionProperties) = preSolution
2636
HideSolutionNode = FALSE

Models/AutoStartManager.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,28 @@ namespace DarkMode_2.Models
44
{
55
public class AutoStartManager
66
{
7-
private const string RunRegistryPath = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run";
8-
private const string RunRegistryKeyName = "DarkMode2";
7+
private const string RunRegistryPath = "SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Run";
8+
private const string RunRegistryKeyName = "DarkMode 2";
99

1010
public static bool IsAutoStartEnabled()
1111
{
12-
using (var key = Registry.CurrentUser.OpenSubKey(RunRegistryPath, false))
12+
using (var key = Registry.LocalMachine.OpenSubKey(RunRegistryPath, false))
1313
{
1414
return (key.GetValue(RunRegistryKeyName) != null);
1515
}
1616
}
1717

1818
public static void EnableAutoStart()
1919
{
20-
using (var key = Registry.CurrentUser.OpenSubKey(RunRegistryPath, true))
20+
using (var key = Registry.LocalMachine.OpenSubKey(RunRegistryPath, true))
2121
{
2222
key.SetValue(RunRegistryKeyName, "\"" + System.Reflection.Assembly.GetEntryAssembly().Location + "\"");
2323
}
2424
}
2525

2626
public static void DisableAutoStart()
2727
{
28-
using (var key = Registry.CurrentUser.OpenSubKey(RunRegistryPath, true))
28+
using (var key = Registry.LocalMachine.OpenSubKey(RunRegistryPath, true))
2929
{
3030
key.DeleteValue(RunRegistryKeyName, false);
3131
}

Models/VersionControl.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ public static string Channel()
99
}
1010
public static string Version()
1111
{
12-
string version = "2.0.9";
12+
string version = "2.0.9.1";
1313
return version;
1414
}
1515
public static string InternalVersion()
1616
{
17-
string internalVersion = "20230705";
17+
string internalVersion = "20230727";
1818
return internalVersion;
1919
}
2020
}

Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,6 @@
5151
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
5252
//通过使用 "*",如下所示:
5353
// [assembly: AssemblyVersion("1.0.*")]
54-
[assembly: AssemblyVersion("2.0.8.0")]
55-
[assembly: AssemblyFileVersion("2.0.9.0")]
54+
[assembly: AssemblyVersion("2.0.9.0")]
55+
[assembly: AssemblyFileVersion("2.0.9.1")]
5656
[assembly: NeutralResourcesLanguage("zh-CN")]

Properties/Resources.Designer.cs

Lines changed: 30 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Properties/Settings.Designer.cs

Lines changed: 9 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)