using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Itrycn_Project2.Config
{
    class Init
    {
        static System.Threading.Mutex run;
        public static void Show(string[] args)
        {
            Soft_ConstInfo.SysDataFolder = ryCommon.RyFiles.GetRealPath(Soft_ConstInfo.SysDataFolder);
            Soft_ConstInfo.UserDataFolder = ryCommon.RyFiles.GetRealPath(Soft_ConstInfo.UserDataFolder);
            run = new System.Threading.Mutex(true, Soft_ConstInfo.Soft_Id, out bool runone);
            if (!runone) //已经运行了
            {
                ryCommon.Ini ini = new ryCommon.Ini(Soft_ConstInfo.UserDataFolder + "\\Win.dat");
                ryControls.Win32.SendMessage((IntPtr)ini.ReadIni(Soft_ConstInfo.Soft_Id, "hwnd", 0), 17189, 100, 100);
            }
            else
            {
                Application.Run(new FrmStart(args));
                //Application.Run(new WindowsFormsApp2.Form1());
            }
        }
    }
}
