Пример #1
0
        public void TestGetTotalFutureRngPositions()
        {
            StealFutureRng future = new StealFutureRng();

            Assert.AreEqual(0, future.GetTotalFutureRngPositions());
            future.AddNextRngInstance(GetStealFutureRngInstance());
            Assert.AreEqual(1, future.GetTotalFutureRngPositions());
            future.AddNextRngInstance(GetStealFutureRngInstance());
            Assert.AreEqual(2, future.GetTotalFutureRngPositions());
        }
Пример #2
0
        private void UpdateDataGridView()
        {
            int positionsCalculated = _futureRng.GetTotalFutureRngPositions();

            for (int i = 0; i < positionsCalculated; i++)
            {
                StealFutureRngInstance rngInstance = _futureRng.GetRngInstanceAt(i);
                int             rowNumber          = dataGridView.Rows.Add();
                DataGridViewRow row = dataGridView.Rows[rowNumber];

                UpdateRowInfo(rngInstance, row);

                if (rngInstance.IsPastRng)
                {
                    row.DefaultCellStyle.BackColor = Color.LightGreen;
                }
            }
        }