diff options
Diffstat (limited to 'PrusaSL1Viewer/Program.cs')
-rw-r--r-- | PrusaSL1Viewer/Program.cs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/PrusaSL1Viewer/Program.cs b/PrusaSL1Viewer/Program.cs index 6e1bc5d..d8cf1b5 100644 --- a/PrusaSL1Viewer/Program.cs +++ b/PrusaSL1Viewer/Program.cs @@ -6,6 +6,7 @@ * of this license document, but changing it is not allowed. */ using System; +using System.Diagnostics; using System.Drawing; using System.Globalization; using System.Threading; @@ -63,12 +64,14 @@ namespace PrusaSL1Viewer public static FileFormat SlicerFile { get; set; } public static FrmMain FrmMain { get; private set; } public static FrmAbout FrmAbout { get; private set; } + public static string[] Args { get; private set; } /// <summary> /// The main entry point for the application. /// </summary> [STAThread] - static void Main() + static void Main(string[] args) { + Args = args; Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-GB"); Application.EnableVisualStyles(); @@ -79,5 +82,11 @@ namespace PrusaSL1Viewer Application.Run(FrmMain); } + + public static void NewInstance(string filePath) + { + var info = new ProcessStartInfo(Application.ExecutablePath, $"\"{filePath}\""); + Process.Start(info); + } } } |