Ejemplo n.º 1
0
        private void frmMain_Load(object sender, EventArgs e)
        {
            cbShowSteps_CheckedChanged(new object(), new EventArgs());
            //call check box event to update form based on check box initial state
            detectChars  = new DetectChars(this);
            detectPlates = new DetectPlates(this);
            bool blnKNNTrainingSuccessful = detectChars.loadKNNDataAndTrainKNN();

            //attempt KNN training

            //if KNN training was not successful
            if ((blnKNNTrainingSuccessful == false))
            {
                txtInfo.AppendText("\r\n error: KNN traning was not successful \r\n");
                //show message on text box
                MessageBox.Show("error: KNN traning was not successful");
                //also show message box
                btnOpenFile.Enabled = false;
                //disable open file button
                return;
                //and bail
            }
            MyPlates = new List <string>();
            MyPlates.Add("SWD03541");
            MyPlates.Add("WE984KV");
            MyPlates.Add("SWDO3541");
        }
Ejemplo n.º 2
0
 public DetectPlates(frmMain frmmain)
 {
     frm         = frmmain;
     detectChars = frm.detectChars;
 }