private void ShowTurnLogToolStripMenuItemClick(object sender, EventArgs e) { var helpForm = new HelpForm(Program.GManager.CurrentGameState.TurnLog, "Turn Log"); helpForm.Show(); }
private void PassTurnButtonClick(object sender, EventArgs e) { var dialogResult = MessageBox.Show(Resources.GameWindow_PassTurnButtonClick_PassTurnInfo, Resources.GameWindow_PassTurnButtonClick_PassTurnTitle, MessageBoxButtons.YesNo); if (dialogResult == DialogResult.Yes) { if(PlayerReadonlyListBox.SelectedIndex == (PlayerReadonlyListBox.Items.Count - 1)) PlayerReadonlyListBox.SelectedIndex = 0; else PlayerReadonlyListBox.SelectedIndex += 1; Program.GManager.AddToTurnLog(String.Format("The turn passes to {0}!", PlayerReadonlyListBox.SelectedItem)); System.IO.Directory.CreateDirectory("save\\"); Program.GManager.SaveGame(System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory + "save\\" + DateTime.Now.ToString(@"M-d-yyyy-hh_mm_ss-tt") + ".bsg")); var turnRecord = new HelpForm(Program.GManager.GetTurnLog(), "Turn log"); turnRecord.Show(); Program.GManager.EndTurn(); var currentPlayer = (Player)PlayerReadonlyListBox.SelectedItem; if (currentPlayer.Character.DefaultDrawColors.Count > 0) { var drawForm = new SelectDrawForm(currentPlayer.Character.DefaultDrawColors); drawForm.ShowDialog(); if(drawForm.DialogResult == DialogResult.OK && drawForm.SelectedSkillCardDrawIndex.HasValue) Program.GManager.DoPlayerDraw(currentPlayer, drawForm.SelectedSkillCardDrawIndex.Value); RefreshGameDataBoxes(); } } }
private void ShowHandMenuItemClick(object sender, EventArgs e) { var itemClicked = (ToolStripMenuItem)sender; var playerHand = Program.GManager.GetPlayerHand(itemClicked.Text); var handString = new StringBuilder(); foreach (var card in playerHand) { handString.Append(card); handString.Append(Environment.NewLine); } var form = new HelpForm(handString.ToString(), Resources.GameWindow_ShowHandMenuItemClick_HelpForm_Title); form.ShowDialog(); }
private void PlayCrisisButtonClick(object sender, EventArgs e) { if (CurrentCrisis == null || CurrentCrisis.PassLevels.Any() == false) return; var destinyDraw = Program.GManager.DrawDestiny(2).ToList(); var form = new PlayCrisisForm(Program.GManager.CurrentGameState.Players, CurrentCrisis, destinyDraw); form.ShowDialog(); if (form.DialogResult == DialogResult.Cancel) { Program.GManager.TopCards(destinyDraw, true); return; } if (form.PlayerTakingCards == null) { foreach (var contribution in form.CrisisContributions) Program.GManager.DiscardCard(contribution.Item1, Program.GManager.FindPlayerByName(contribution.Item2)); } else { foreach (var contribution in form.CrisisContributions) Program.GManager.GiveCardToPlayer(form.PlayerTakingCards, contribution.Item1, Program.GManager.FindPlayerByName(contribution.Item2)); } Program.GManager.DiscardCard(CurrentCrisis); var helpForm = new HelpForm(form.Result, "Crisis Result"); helpForm.Show(); PlayerReadonlyListBox.BeginUpdate(); PlayerReadonlyListBox.DataSource = null; PlayerReadonlyListBox.DataSource = Program.GManager.CurrentGameState.Players; PlayerReadonlyListBox.SelectedIndex = 0; PlayerReadonlyListBox.EndUpdate(); }
private void UsingSympathizerHelpLabelClick(object sender, EventArgs e) { var helpForm = new HelpForm(Resources.OptionalRulesForm_Sympathizer_Text, Resources.OptionalRulesForm_FormName); helpForm.Show(); }
private void ExtraLoyaltyCardsHelpLabelClick(object sender, EventArgs e) { var helpForm = new HelpForm(Resources.OptionalRulesForm_ExtraLoyaltyCards_Text, Resources.OptionalRulesForm_FormName); helpForm.Show(); }