Skip to content

Commit

Permalink
Reorder imports and renaming variables (Code Review)
Browse files Browse the repository at this point in the history
  • Loading branch information
gablm committed Jan 13, 2024
1 parent 06bc220 commit c0a32a6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
17 changes: 8 additions & 9 deletions CollapseLauncher/Classes/Properties/AppActivation.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using System;
using Microsoft.Win32;
using Microsoft.Windows.AppLifecycle;
using System;
using System.Linq;
using System.Text.RegularExpressions;
using Microsoft.Win32;
using Microsoft.Windows.AppLifecycle;
using Windows.ApplicationModel.Activation;
using static Hi3Helper.Logger;
using static CollapseLauncher.InnerLauncherConfig;
using static Hi3Helper.Logger;
using static Hi3Helper.Shared.Region.LauncherConfig;

namespace CollapseLauncher
Expand All @@ -16,9 +16,8 @@ public static void Enable()
{
AppInstance.GetCurrent().Activated += App_Activated;

// Name for the protocol
string name = "collapse";
RegistryKey reg = Registry.ClassesRoot.OpenSubKey(name + "\\shell\\open\\command", true);
string protocolName = "collapse";
RegistryKey reg = Registry.ClassesRoot.OpenSubKey(protocolName + "\\shell\\open\\command", true);

if (reg != null)
{
Expand All @@ -31,9 +30,9 @@ public static void Enable()

LogWriteLine("Protocol does not exist or paths are different. Activating protocol...");

Registry.ClassesRoot.DeleteSubKeyTree(name, false);
Registry.ClassesRoot.DeleteSubKeyTree(protocolName, false);

RegistryKey protocol = Registry.ClassesRoot.CreateSubKey(name, true);
RegistryKey protocol = Registry.ClassesRoot.CreateSubKey(protocolName, true);

protocol.SetValue("", "CollapseLauncher protocol");
protocol.SetValue("URL Protocol", "");
Expand Down
8 changes: 4 additions & 4 deletions CollapseLauncher/Classes/Properties/ArgumentParser.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using System;
using System.Linq;
using System.CommandLine;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using System.CommandLine;
using System.CommandLine.NamingConventionBinder;
using static Hi3Helper.Logger;
using System.Linq;
using System.Text.RegularExpressions;
using static CollapseLauncher.InnerLauncherConfig;
using static Hi3Helper.Logger;

namespace CollapseLauncher
{
Expand Down

0 comments on commit c0a32a6

Please sign in to comment.