Exemple #1
0
        private void JumpButtonClick(object sender, EventArgs e)
        {
            var destinationCards = Program.GManager.CurrentGameState.DestinationDeck.DrawMany(3).ToList();
            var jumpForm         = new JumpForm(destinationCards);

            jumpForm.ShowDialog();
            if (jumpForm.DialogResult == DialogResult.OK)
            {
                var tabPage = new TabPage(jumpForm.SelectedCard.Heading);
                var textBox = new TextBox
                {
                    BackColor   = SystemColors.Control,
                    BorderStyle = BorderStyle.FixedSingle,
                    Dock        = DockStyle.Fill,
                    Multiline   = true,
                    ScrollBars  = ScrollBars.Vertical,
                    Text        = jumpForm.SelectedCard.AdditionalText
                };
                tabPage.Controls.Add(textBox);
                if (DestinationTabControl.Controls[0].Name == "DefaultTab")
                {
                    DestinationTabControl.Controls.RemoveAt(0);
                }
                DestinationTabControl.TabPages.Add(tabPage);
                Program.GManager.AddToTurnLog("The fleet jumps!  Destination: " + jumpForm.SelectedCard);
                Program.GManager.CurrentGameState.JumpPrep = 0;
                Program.GManager.WipeDradis();
                RefreshGameDataBoxes();
                Red1RadioButton.Checked = true;
                JumpPrepChanged(sender, e);
                if (jumpForm.ThirdCardDrawn)
                {
                    Program.GManager.BuryCards(destinationCards);
                }
                else
                {
                    Program.GManager.BuryCards(destinationCards.Take(2));
                    Program.GManager.TopCard(destinationCards.Last());
                }
            }
            else
            {
                destinationCards.Reverse();
                Program.GManager.TopCards(destinationCards);
            }
        }
Exemple #2
0
 private void JumpButtonClick(object sender, EventArgs e)
 {
     var destinationCards = Program.GManager.CurrentGameState.DestinationDeck.DrawMany(3).ToList();
     var jumpForm = new JumpForm(destinationCards);
     jumpForm.ShowDialog();
     if (jumpForm.DialogResult == DialogResult.OK)
     {
         var tabPage = new TabPage(jumpForm.SelectedCard.Heading);
         var textBox = new TextBox 
         {
             BackColor = SystemColors.Control, 
             BorderStyle = BorderStyle.FixedSingle, 
             Dock = DockStyle.Fill, 
             Multiline = true, 
             ScrollBars = ScrollBars.Vertical,
             Text = jumpForm.SelectedCard.AdditionalText
         };
         tabPage.Controls.Add(textBox);
         if (DestinationTabControl.Controls[0].Name == "DefaultTab")
             DestinationTabControl.Controls.RemoveAt(0);
         DestinationTabControl.TabPages.Add(tabPage);
         Program.GManager.AddToTurnLog("The fleet jumps!  Destination: " + jumpForm.SelectedCard);
         Program.GManager.CurrentGameState.JumpPrep = 0;
         Program.GManager.WipeDradis();
         RefreshGameDataBoxes();
         Red1RadioButton.Checked = true;
         JumpPrepChanged(sender, e);
         if (jumpForm.ThirdCardDrawn)
             Program.GManager.BuryCards(destinationCards);
         else
         {
             Program.GManager.BuryCards(destinationCards.Take(2));
             Program.GManager.TopCard(destinationCards.Last());
         }
     }
     else
     {
         destinationCards.Reverse();
         Program.GManager.TopCards(destinationCards);
     }
 }