Пример #1
0
        private void OnStartup(object sender, StartupEventArgs e)
        {
            m_mutex = new Mutex(true, "WlyAuto", out var created);
            if (!created)
            {
                Current.Shutdown();
                return;
            }

            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
            WxFrameworkService.Instance.Init();

            var processes = Process.GetProcessesByName("uqee");

            foreach (var p in processes)
            {
                p.Kill();
                p.Close();
                p.Dispose();
            }

            var wnd = new MainEntityWnd();
            var vm  = new WlyAutoVM();

            wnd.DataContext = vm;
            vm.Start();

            // 显示信息界面
            wnd.ShowDialog();
            vm.Stop();
        }
Пример #2
0
        private static void Main(string[] args)
        {
            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
            WxFrameworkService.Instance.Init();

            var processes = Process.GetProcessesByName("uqee");

            foreach (var p in processes)
            {
                p.Kill();
                p.Close();
                p.Dispose();
            }

            var auto = new WlyAutoVM();

            auto.Start();
            AutoPlayerVM.Instance.Start();

            while (true)
            {
                Thread.Sleep(60000);
            }
        }