using SYNC_SAP_MES;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using static System.Configuration.ConfigurationManager;


namespace SYNC_SAP_MES
{
    internal static class Program
    {
        public static string ConnectionString = AppSettings["ConnectionString"];
        public static string WebAPI_Url_Plans = AppSettings["WebAPI_Url_Plans"];
        public static string WebAPI_Url_BarCodePlans = AppSettings["WebAPI_Url_BarCodePlans"];
        public static string WebAPI_Url_MisFun = AppSettings["WebAPI_Url_MisFun"];
        public static string WebAPI_Url_Boms = AppSettings["WebAPI_Url_Boms"];
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            new System.Threading.Mutex(true, "SYNC_ProductPlan_AMS", out bool bCanRun);
            if (!bCanRun)
            {
                MessageBox.Show("AMS计划同步程序 已经在运行！不可重复启动！");
                return;
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(PP.main = new FormSAP());
        }
    }
}
