Beispiel #1
0
        public void BerekenKolonies(PictureBox picturebox, bool bgSelect, ResultModel resultModel)
        {
            try
            {
                ColonyController c = new ColonyController();
                c.RangeRed   = new AForge.IntRange(239, 239);
                c.RangeGreen = new AForge.IntRange(228, 228);
                c.RangeBlue  = new AForge.IntRange(176, 176);
                // PROCESS IMAGE
                resultModel.ColonyList = c.ProcessImage(picturebox, bgSelect);

                // SET AANTAL COUNTED CELLS
                resultModel.Kolonies = resultModel.ColonyList.Count;
                Console.WriteLine(resultModel.ColonyList.Count);
            }
            catch (Exception) { }
        }
Beispiel #2
0
        /// <summary>
        /// All the variables are initialized here.
        /// </summary>
        private void Initialize()
        {
            //Other
            this.resultModelList = new List <ResultModel>();
            this.resultList      = new ArrayList();

            //Model
            dbConnection = new ConnectionModel();

            //View
            this.mainForm       = new MainForm();
            this.mainView       = new MainView(this);
            this.adminLoginView = new AdminLoginView();
            this.inleesView     = new InleesView(this);
            this.resultView     = new ResultView(this);
            this.loadMapView    = new LoadMapView(this);
            this.statisticView  = new StatisticView(this);

            //Controller
            this.mainViewController     = new MainViewController(this);
            this.inleesViewController   = new InleesViewController(this);
            this.resultController       = new ResultController(this);
            this.resultDialogController = new ResultDialogController(this);
            this.colonyController       = new ColonyController();
            this.fileSelectController   = new FileController(this);
            this.statisticController    = new StatisticController(this);

            // ADD INLEESVIEW AND RESULTVIEW TO MAINVIEW
            this.mainViewController.AddToPage(inleesView, 0);
            this.mainViewController.AddToPage(resultView, 1);
            this.mainViewController.AddToPage(statisticView, 2);
            this.mainForm.Controls.Add(mainView);
            this.mainView.Dock      = DockStyle.Fill;
            this.resultView.Dock    = DockStyle.Fill;
            this.statisticView.Dock = DockStyle.Fill;

            // START APP
            Application.EnableVisualStyles();
            Application.Run(mainForm);
        }
Beispiel #3
0
        /// <summary>
        /// All the variables are initialized here.
        /// </summary>
        private void Initialize()
        {
            //Other
            this.resultModelList = new List<ResultModel>();
            this.resultList = new ArrayList();

            //Model
            dbConnection = new ConnectionModel();

            //View
            this.mainForm = new MainForm();
            this.mainView = new MainView(this);
            this.adminLoginView = new AdminLoginView();
            this.inleesView = new InleesView(this);
            this.resultView = new ResultView(this);
            this.loadMapView = new LoadMapView(this);
            this.statisticView = new StatisticView(this);

            //Controller
            this.mainViewController = new MainViewController(this);
            this.inleesViewController = new InleesViewController(this);
            this.resultController = new ResultController(this);
            this.resultDialogController = new ResultDialogController(this);
            this.colonyController = new ColonyController();
            this.fileSelectController = new FileController(this);
            this.statisticController = new StatisticController(this);

            // ADD INLEESVIEW AND RESULTVIEW TO MAINVIEW
            this.mainViewController.AddToPage(inleesView, 0);
            this.mainViewController.AddToPage(resultView, 1);
            this.mainViewController.AddToPage(statisticView, 2);
            this.mainForm.Controls.Add(mainView);
            this.mainView.Dock = DockStyle.Fill;
            this.resultView.Dock = DockStyle.Fill;
            this.statisticView.Dock = DockStyle.Fill;

            // START APP
            Application.EnableVisualStyles();
            Application.Run(mainForm);
        }
        public void BerekenKolonies(PictureBox picturebox, bool bgSelect, ResultModel resultModel)
        {
            try
            {
                ColonyController c = new ColonyController();
                c.RangeRed = new AForge.IntRange(239, 239);
                c.RangeGreen = new AForge.IntRange(228, 228);
                c.RangeBlue = new AForge.IntRange(176, 176);
                // PROCESS IMAGE
                resultModel.ColonyList = c.ProcessImage(picturebox, bgSelect);

                // SET AANTAL COUNTED CELLS
                resultModel.Kolonies = resultModel.ColonyList.Count;
                Console.WriteLine(resultModel.ColonyList.Count);
            }
            catch (Exception) { }
        }