Пример #1
0
        /// <summary>
        /// Set the specified label to the specified number.
        /// </summary>
        /// <param name="num">Number to set the label to.</param>
        /// <param name="label">Label to set the number on.</param>
        private void ChangeDisplayLabel(int num, LABELS label)
        {
            if (num < 0)
            {
                throw new ArgumentOutOfRangeException("The number to write to the label cannot be negative.", nameof(num));
            }

            switch (label)
            {
            case LABELS.Wins:
                this.WinsDisplay = WINS_DISPLAY_LABEL + num.ToString();
                RaisePropertyChanged(nameof(WinsDisplay));
                break;

            case LABELS.Ties:
                this.TiesDisplay = TIES_DISPLAY_LABEL + num.ToString();
                RaisePropertyChanged(nameof(TiesDisplay));
                break;

            case LABELS.Losses:
                this.LossesDisplay = LOSSES_DISPLAY_LABEL + num.ToString();
                RaisePropertyChanged(nameof(LossesDisplay));
                break;
            }

            return;
        }
Пример #2
0
 private void DefineLabels()
 {
     for (int i = 0; i < COMMANDS.Length; i++)
     {
         if (COMMANDS[i].Contains(':'))
         {
             LABELS.Add(COMMANDS[i].Replace(":", ""), i + 1);
         }
     }
 }