show console on cmd
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using ModpackUpdater.Model;
|
||||
using Newtonsoft.Json;
|
||||
using Pilz.Configuration;
|
||||
using System.Runtime.InteropServices;
|
||||
using Telerik.WinControls;
|
||||
|
||||
namespace ModpackUpdater;
|
||||
@@ -12,6 +13,12 @@ public static class Program
|
||||
|
||||
public static ISettings Settings => settingsManager.Instance;
|
||||
|
||||
[DllImport("kernel32.dll")]
|
||||
static extern IntPtr GetConsoleWindow();
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);
|
||||
|
||||
static Program()
|
||||
{
|
||||
settingsManager = new(GetSettingsPath(2), true);
|
||||
@@ -25,7 +32,10 @@ public static class Program
|
||||
if (options.NoUi)
|
||||
InstallWithoutGui(options.UpdateOptions, options.Silent);
|
||||
else
|
||||
{
|
||||
ShowWindow(GetConsoleWindow(), 0);
|
||||
RunApp(options.UpdateOptions);
|
||||
}
|
||||
}
|
||||
|
||||
private static void RunApp(UpdateCheckOptionsAdv updateOptions)
|
||||
|
||||
Reference in New Issue
Block a user