コード例 #1
0
        private static void Main(string[] args)
        {
            HNStruct.OemType = DeployConfig.getOemType();
            HuionLog.listenGlobalCrashLog();
            ResourceCulture.init();
            TimerSession.startListenUserOperation();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            bool flag = false;

            try
            {
                flag = Utils.isAppRunning();
            }
            catch
            {
                Utils.runAsAdmin(true);
                return;
            }

            if (new Mutex(true, "OnlyRun").WaitOne(0, false))
            {
                Application.Run((Form) new HuionTalbet());
            }
            else
            {
                if (Utils.isStartup(args) ||
                    HuionDriverDLL.PostMessage(HuionDriverDLL.FindWindow((string)null, Fixer4Main.FormTitle()), 1054,
                                               IntPtr.Zero, IntPtr.Zero) != 0)
                {
                    return;
                }
                Utils.runAsAdmin(true);
            }
        }