Exemplo n.º 1
0
        private void payTipsOkBtnClick(object sender, RoutedEventArgs e)
        {
            FadeExtension.FadeOutBoxOf(PayTipsBox, PayTipsBoxContent);
            string auth = TipsAuthCodeBox.Text;

            alwaysAllowPay = AlwaysPayCheck.IsChecked == true;
            tips(auth);
        }
Exemplo n.º 2
0
        private void showFirstOption()
        {
            //if (TryInitPlayers() == false) return;
            var players = new List <SelectionItem <string> >()
            {
                new SelectionItem <string>(hostName, hostToken),
                new SelectionItem <string>(joinName, joinToken)
            };

            FirstStartComboBox.ItemsSource   = players;
            FirstStartComboBox.SelectedIndex = 0;
            FadeExtension.FadeInBoxOf(FirstSelectBox, FirstSelectBoxContent);
        }
Exemplo n.º 3
0
 private void ipOkBtnClick(object sender, RoutedEventArgs e)
 {
     ip = IPBox.Text;
     System.Net.IPAddress address = null;
     if (System.Net.IPAddress.TryParse(ip, out address))
     {
         if (int.TryParse(PortBox.Text, out port) &&
             int.TryParse(InPortBox.Text, out inport))
         {
             isHost = HostCheck.IsChecked == true;
             //Do something
             initialize();
             FadeExtension.FadeOutBoxOf(ConnectionBox, ConnectionBoxContent);
         }
     }
 }
Exemplo n.º 4
0
 private void setFirstBtnOKClick(object sender, RoutedEventArgs e)
 {
     if (FirstStartComboBox.SelectedIndex < 0)
     {
         return;
     }
     else
     {
         FirstIndex = FirstStartComboBox.SelectedIndex;
     }
     //if (TryInitPlayers() == false) return;
     FadeExtension.FadeOutBoxOf(FirstSelectBox, FirstSelectBoxContent);
     if (GameMode != GameMode.PvPOnline)
     {
         ensureStart();
     }
 }
Exemplo n.º 5
0
        private void showLevelOpetion()
        {
            var availbleType = new List <SelectionItem <AILevel> >()
            {
                new SelectionItem <AILevel>(getAIName(AILevel.Advanced), AILevel.Advanced),
                new SelectionItem <AILevel>(getAIName(AILevel.Intermediate), AILevel.Intermediate),
                new SelectionItem <AILevel>(getAIName(AILevel.Elementary), AILevel.Elementary)
            };

            if (GameMode == GameMode.PvE)
            {
                SecLevelContent.Visibility       = Visibility.Collapsed;
                FirstLevelComboBox.ItemsSource   = availbleType;
                FirstLevelComboBox.SelectedIndex = 0;
            }
            else
            {
                FirstLevelComboBox.ItemsSource   = availbleType;
                SecLevelComboBox.ItemsSource     = availbleType;
                FirstLevelComboBox.SelectedIndex = 0;
                SecLevelComboBox.SelectedIndex   = 0;
            }
            FadeExtension.FadeInBoxOf(LevelSelectBox, LevelBoxContent);
        }
Exemplo n.º 6
0
 private void levelOkBtnClick(object sender, RoutedEventArgs e)
 {
     FadeExtension.FadeOutBoxOf(LevelSelectBox, LevelBoxContent);
     //Active first player selection when selected level
     initialize();
 }
Exemplo n.º 7
0
 private void payTipsCancelBtnClick(object sender, RoutedEventArgs e)
 {
     FadeExtension.FadeOutBoxOf(PayTipsBox, PayTipsBoxContent);
 }
Exemplo n.º 8
0
 private void showPayTipsBox()
 {
     FadeExtension.FadeInBoxOf(PayTipsBox, PayTipsBoxContent);
 }
Exemplo n.º 9
0
 private void showConnectionBox()
 {
     FadeExtension.FadeInBoxOf(ConnectionBox, ConnectionBoxContent);
 }