Beispiel #1
0
        private static void LoadSubButton_Click(object sender, EventArgs e)
        {
            if (Prompt.ChooseGame())
            {
                var loadedGamePath = Prompt.SelectedGamePath;
                var confirmed      = MessageBox.Show("Сигурни ли сте?", "Зареждане на игра", MessageBoxButtons.YesNo) == DialogResult.Yes;
                if (confirmed)
                {
                    Game.Game.Current = Game.Game.LoadSaveFileGame(loadedGamePath);
                    HandController.ReturnAllToHand();
                    SidebarController.RenderSidebar();
                    Task.Run(() => GameController.ContinueFromLoadedTurn());
                }
            }

            /*var saveFilePath = LoadSavedGameDialog.SelectFile();
             * if (string.IsNullOrEmpty(saveFilePath) == false)
             * {
             *  if(Game.Game.Load(saveFilePath, true))
             *  {
             *      SidebarController.RenderSidebar();
             *      Task.Run(() => GameController.ContinueFromLoadedTurn());
             *  }
             * }*/
        }