-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhancement: Made installing and uninstalling possible
- Loading branch information
Showing
11 changed files
with
550 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,25 @@ | ||
using System.Windows; | ||
using System; | ||
using System.Windows; | ||
using ChromeDevExtWarningPatcher.Patches; | ||
|
||
namespace ChromeDevExtWarningPatcher { | ||
public partial class App : Application { | ||
public static BytePatchManager? BytePatchManager; | ||
|
||
public App() { | ||
string[] args = Environment.GetCommandLineArgs(); // First element is the program's name | ||
|
||
if (args.Length <= 1) { // Start gui | ||
return; | ||
} | ||
|
||
BytePatchManager = new BytePatchManager(CustomConsoleWrite); | ||
Environment.Exit(0); // Exit to prevent the UI from starting | ||
} | ||
|
||
private static MessageBoxResult CustomConsoleWrite(string str, string? title = null) { | ||
Console.WriteLine(str); | ||
return MessageBoxResult.OK; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
ChromeDevExtWarningPatcher/ComponentModels/InstallationElement.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using ChromeDevExtWarningPatcher.InstallationFinder; | ||
|
||
namespace ChromeDevExtWarningPatcher.ComponentModels { | ||
public class InstallationElement : SelectionListElement { | ||
public InstallationPaths Paths { get; set; } | ||
|
||
public InstallationElement(string name, InstallationPaths paths) : base(name) { | ||
this.Paths = paths; | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
ChromeDevExtWarningPatcher/ComponentModels/PatchGroupElement.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System.ComponentModel.DataAnnotations; | ||
|
||
namespace ChromeDevExtWarningPatcher.ComponentModels { | ||
public class PatchGroupElement : SelectionListElement { | ||
[Required] | ||
public int Group { get; set; } | ||
|
||
public PatchGroupElement(string name, int group) : base(name) { | ||
this.Group = group; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.