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

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