-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
46 changed files
with
525 additions
and
233 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 |
---|---|---|
|
@@ -360,4 +360,6 @@ MigrationBackup/ | |
.ionide/ | ||
|
||
# Fody - auto-generated XML schema | ||
FodyWeavers.xsd | ||
FodyWeavers.xsd | ||
|
||
RELEASE |
This file was deleted.
Oops, something went wrong.
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
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
Controls/DialogAdd.cs → PortableRegistrator/Controls/DialogAdd.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
File renamed without changes.
File renamed without changes.
File renamed without changes.
88 changes: 46 additions & 42 deletions
88
Form1.Designer.cs → PortableRegistrator/Form1.Designer.cs
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,88 @@ | ||
using Microsoft.Win32.SafeHandles; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
using System.Diagnostics; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Reflection; | ||
using System.Runtime.InteropServices; | ||
using System.Security.Principal; | ||
using System.Threading.Tasks; | ||
using System.Windows.Forms; | ||
|
||
namespace PortableRegistrator | ||
{ | ||
static class Program | ||
{ | ||
/// <summary> | ||
/// The main entry point for the application. | ||
/// </summary> | ||
[STAThread] | ||
static void Main() | ||
{ | ||
try | ||
{ | ||
//string[] args = Environment.GetCommandLineArgs(); | ||
|
||
//// If no parameters given, start with admin permissions and option '-gui' | ||
//if ((args.Length == 1)) | ||
//{ | ||
// RestartWithAdmin(); | ||
//} | ||
//else | ||
//{ | ||
// var option = args[1].ToLower(); | ||
// if (option == "-gui") | ||
// { | ||
// RunGUI(); | ||
// } | ||
// else | ||
// { | ||
// CLI.Run(args); | ||
// } | ||
//} | ||
RunGUI(); | ||
} | ||
catch (Exception ex) | ||
{ | ||
SimpleLogger.Instance.Error(ex); | ||
} | ||
|
||
} | ||
|
||
//private static void RestartWithAdmin() | ||
//{ | ||
// WindowsPrincipal pricipal = new WindowsPrincipal(WindowsIdentity.GetCurrent()); | ||
// bool hasAdministrativeRight = pricipal.IsInRole(WindowsBuiltInRole.Administrator); | ||
// if (!hasAdministrativeRight) | ||
// { | ||
// // relaunch the application with admin rights | ||
// string fileName = Assembly.GetExecutingAssembly().Location; | ||
// ProcessStartInfo processInfo = new ProcessStartInfo(); | ||
// processInfo.Verb = "runas"; | ||
// processInfo.FileName = fileName; | ||
// processInfo.Arguments = "-gui"; | ||
|
||
// try | ||
// { | ||
// Process.Start(processInfo); | ||
// } | ||
// catch (Win32Exception) | ||
// { | ||
// // This will be thrown if the user cancels the prompt | ||
// } | ||
// return; | ||
// } | ||
//} | ||
|
||
private static void RunGUI() | ||
{ | ||
Console.WriteLine("Starting GUI!"); | ||
// Start GUI | ||
Application.EnableVisualStyles(); | ||
Application.SetCompatibleTextRenderingDefault(false); | ||
Application.Run(new Form1()); | ||
} | ||
} | ||
} |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes
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
File renamed without changes.
Oops, something went wrong.