show console on cmd
This commit is contained in:
@@ -6,7 +6,7 @@ public static class Extensions
|
||||
{
|
||||
public static bool IsSide(this Side @this, Side side)
|
||||
{
|
||||
return @this.HasFlag(side) || side.HasFlag(@this);
|
||||
return @this.HasFlag(side);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<ApplicationIcon>icons8_download_from_ftp.ico</ApplicationIcon>
|
||||
|
||||
@@ -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