示例#1
0
        private void RecalculateColumn()
        {
            ResetTotals();

            for (int row = 0; row < 10; row++)
            {
                switch (_board[_cellNumber, row])
                {
                case '0':
                    NumberOf0s++;
                    break;

                case '1':
                    NumberOf1s++;
                    break;

                default:
                    NumberOfGaps++;
                    Gaps.Add(row);
                    break;
                }

                AsText += _board[_cellNumber, row];
            }
        }
示例#2
0
 private void AddGap(DateTime startDate, DateTime endDate)
 {
     if (HasGap(startDate, endDate))
     {
         //Gap in data would be created.  Fill with MissingValue
         throw new NotImplementedException("TODO: Resolve Overlapping gaps");
     }
     Debug.WriteLine($"UNTESTED - {this.ToString()} GAP: {startDate} - {endDate}");
     if (Gaps == null)
     {
         Gaps = new SortedDictionary <DateTime, DateTime>();
     }
     if (Gaps.ContainsKey(startDate))
     {
         var existingEnd = Gaps[startDate];
         if (existingEnd < endDate)
         {
             Gaps[startDate] = endDate;
         }
     }
     Gaps.Add(startDate, endDate);
 }
示例#3
0
        private void RecalculateRow()
        {
            ResetTotals();

            for (int column = 0; column < 10; column++)
            {
                switch (_board[column, _cellNumber])
                {
                case '0':
                    NumberOf0s++;
                    break;

                case '1':
                    NumberOf1s++;
                    break;

                default:
                    NumberOfGaps++;
                    Gaps.Add(column);
                    break;
                }
                AsText += _board[column, _cellNumber];
            }
        }