Esempio n. 1
0
 private void btnTest_Click(object sender, EventArgs e)
 {
     MainGrid.Cols = Convert.ToInt16(numCols.Value);
     MainGrid.Rows = Convert.ToInt16(numRows.Value);
     MainGrid.ClearShapes();
     MainGrid.DrawLines();
 }
Esempio n. 2
0
        private void RegressionTrainingRandomLocation(Object thisShape, EventArgs myEventArgs)
        {
            TrainTimerCount += 1;
            // stop training if you reach specified number of trials
            if (TrainTimerCount == 20)
            {
                TrainTimer.Stop();
                TrainTimer.Dispose();
                MainGrid.ClearShapes();
            }
            else
            {
                // put test shape in random grid location
                Random rnd  = new Random();
                var    freq = rnd.Next(10, 25);
                ClassificationShape.Col   = rnd.Next(0, MainGrid.Cols);
                ClassificationShape.Row   = rnd.Next(0, MainGrid.Rows);
                ClassificationShape.Hertz = freq;
                ClassificationShape.Text  = freq.ToString();
                if (TrainTimerCount != 0)
                {
                    MainGrid.RedrawGrid();
                }

                ClassificationShape.DrawBox();
            }
        }
Esempio n. 3
0
 private void btnClear_Click(object sender, EventArgs e)
 {
     MainGrid.ClearShapes();
 }