Beispiel #1
0
 public override string ToString()
 {
     return(BlueA.ToString() + "-" +
            BlueB.ToString() + "-" +
            BlueC.ToString() + " vs " +
            RedA.ToString() + "-" +
            RedB.ToString() + "-" +
            RedC.ToString());
 }
Beispiel #2
0
        private void AnythingChanged(object sender, TextChangedEventArgs e)
        {
            RedABox.Text  = RedA.ToString();
            RedBBox.Text  = RedB.ToString();
            RedCBox.Text  = RedC.ToString();
            BlueABox.Text = BlueA.ToString();
            BlueBBox.Text = BlueB.ToString();
            BlueCBox.Text = BlueC.ToString();

            if (RedA == -1 || RedB == -1 || RedC == -1 ||
                BlueA == -1 || BlueB == -1 || BlueC == -1 ||
                MatchID == -1)
            {
                OKBtn.IsEnabled = false;
            }
            else
            {
                OKBtn.IsEnabled = true;
            }
        }
        public void UpdateIndicators(Match match)
        {
            if (match == null)
            {
                RedA.SetNumber(-1);
                RedB.SetNumber(-1);
                RedC.SetNumber(-1);
                BlueA.SetNumber(-1);
                BlueB.SetNumber(-1);
                BlueC.SetNumber(-1);

                return;
            }

            RedA.SetNumber(match.RedAlliance.TeamA_ID);
            RedB.SetNumber(match.RedAlliance.TeamB_ID);
            RedC.SetNumber(match.RedAlliance.TeamC_ID);
            BlueA.SetNumber(match.BlueAlliance.TeamA_ID);
            BlueB.SetNumber(match.BlueAlliance.TeamB_ID);
            BlueC.SetNumber(match.BlueAlliance.TeamC_ID);
        }