Пример #1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            button.IsEnabled = false;
            string input = box.Text;

            box.Text = "";
            if (stage == -2) // Initial Play
            {
                button.Background = (SolidColorBrush)(new BrushConverter().ConvertFrom("#FFDDDDDD"));
                Presenter.PlayButtonClick();
            }
            else if (stage == -1)     //input no of player
            {
                Stage1(input);
            }
            else if (stage == 0)
            {
                Presenter.Stage0();
            }
            else if (stage == 1)     //input name of player
            {
                Presenter.Stage1(input);
            }
            else if (stage == 2)   //select players
            {
                Presenter.Stage2(input);
            }
        }
 private void Confirm_Click(object sender, RoutedEventArgs e)
 {
     if (Presenter.Stage == 0) //Setup for Missionleader to Select Players (To stage 1)
     {
         Presenter.Stage0();
     }
     else if (Presenter.Stage == 1) //Selected Players Complete -> Setup Vote Session (To stage 2)
     {
         Presenter.Stage1(CheckBoxes);
     }
     else if (Presenter.Stage == 2) //Vote Complete -> 1. Success or Fail (To stage 3) 2. Fail (Fallback to stage 0);
     {
         Presenter.Stage2(YesRadioButtons, NoRadioButtons);
     }
 }