﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace TIASshot {
    internal static class Program {
        /// <summary>
        /// アプリケーションのメイン エントリ ポイントです。
        /// </summary>
        [STAThread]
        static void Main() {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
#if SELFTEST
            // ヘッドレスのセルフテスト（--selftest）．フォームを表示せずに検査して終了コードで結果を返す
            var args = Environment.GetCommandLineArgs();
            if (SelfTestRunner.IsRequested(args)) {
                // 保存スレッド等のフォアグラウンドスレッドが残っても確実に終了コードを返すため Exit で抜ける
                Environment.Exit(SelfTestRunner.Run(args));
                return;
            }
#endif
            Application.Run(new Form1());
        }
    }
}
