Ejemplo n.º 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());
             *  }
             * }*/
        }
Ejemplo n.º 2
0
        private static void NewGameSubButton_Click(object sender, EventArgs e)
        {
            var confirmed = MessageBox.Show("Сигурни ли сте?", "Нова игра", MessageBoxButtons.YesNo) == DialogResult.Yes;

            if (confirmed)
            {
                Game.GameController.NewGame();
                SidebarController.RenderSidebar();
                Game.Game.Save(autosave: true);
                Task.Run(() => GameController.ContinueFromLoadedTurn());
            }
        }
Ejemplo n.º 3
0
        private static void AddWordSubButton_Click(object sender, EventArgs e)
        {
            var prompt = new DictionaryWordPrompt(advanced: false)
            {
                Text = "Добавяне на дума в речника"
            };
            var wordAdded = prompt.ShowDialog() == DialogResult.OK;

            if (wordAdded)
            {
                //WordController.SaveWords();
                //WordController.LoadWords();
                Game.Game.Current.TurnErrors.Clear();
                SidebarController.RenderWords();
            }
        }
Ejemplo n.º 4
0
 private static void ButtonResetClick(object sender, EventArgs e)
 {
     HandController.ReturnAllToHand();
     SidebarController.RenderWords();
 }