コード例 #1
0
        public static void Quit()
        {
            AutoUpdater.Quit();

            Methods.UiInvoke(() =>
            {
                if (_windowReplayer != null)
                {
                    WindowReplayer.IsClosing = true;
                    WindowReplayer.Close();
                }

                Config.GuiLocationX = (int)WindowMain.Left;
                Config.GuiLocationY = (int)WindowMain.Top;
                Config.GuiWidth     = (int)WindowMain.Width;
                Config.GuiHeight    = (int)WindowMain.Height;
            });
            Config.SaveXml();

            Handler.Stop();
            TableTileManager.Stop();
            HandHistoryManager.Stop();
            if (KeyboardHook != null)
            {
                KeyboardHook.Dispose();
            }

            TableManager.Stop();

            //close gui
            WindowMain.IsClosing = true;
            new Thread(() => Current.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal, new Action(() => WindowMain.Close()))).Start();
        }