12345678910111213141516171819202122232425262728293031323334353637 |
- using System.Runtime.InteropServices;
- namespace PictureMover
- {
- internal static class Program
- {
- internal static string[] CommandLineArgs { get; private set; }
- [DllImport("kernel32.dll", SetLastError = true, ExactSpelling = true)]
- static extern bool FreeConsole();
- /// <summary>
- /// The main entry point for the application.
- /// </summary>
- [STAThread]
- private static void Main(string[] args)
- {
- if (Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") != "Development")
- {
- try
- {
- FreeConsole();
- }
- catch
- {
- //brr
- }
- }
- CommandLineArgs = args;
- // To customize application configuration such as set high DPI settings or default font,
- // see https://aka.ms/applicationconfiguration.
- ApplicationConfiguration.Initialize();
- Application.Run(new MainForm());
- }
- }
- }
|