private void WindowLoaded(object sender, RoutedEventArgs e)
        {
            ExtendedWindowsFormsHost ptHost1 = new ExtendedWindowsFormsHost();
            ExtendedWindowsFormsHost ptHost2 = new ExtendedWindowsFormsHost();

            //ExtendedWindowsFormsHost ptHost3 = new ExtendedWindowsFormsHost();
            ptHost1.Child = maincore.pt1;
            ptHost2.Child = maincore.pt2;
            //ptHost3.Child = maincore.pt3;
            this.ptdock1.Children.Add(ptHost1);
            this.ptdock2.Children.Add(ptHost2);
            //this.ptdock3.Children.Add(ptHost3);
            getPorts();
            //Bind portList to comboBoxes
            this.comboBox1SerialPort1.ItemsSource = portList;
            maincore.pt1.PerformAutoScale();
            this.comboBox1SerialPort2.ItemsSource = portList;

            this.checkBoxAutoConnect1.IsChecked = port1Open;
            this.checkBoxAutoConnect2.IsChecked = port2Open;
        }
Esempio n. 2
0
        //This function is called after MainWindow loads - PUT INITIALIZATION FUNCTIONS HERE
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            maincore             = new ATCore();
            maincore.clock.Tick += new EventHandler(timer_Tick);
            maincore.clock.Start();

            maincore.sclock.Tick += new EventHandler(timer2_Tick);
            maincore.sclock.Start();

            //-----Sonar EMGUCV ImageBoxes-----\\
            ExtendedWindowsFormsHost sonarhost1 = new ExtendedWindowsFormsHost();
            ExtendedWindowsFormsHost sonarhost2 = new ExtendedWindowsFormsHost();

            //ExtendedWindowsFormsHost sonarhost3 = new ExtendedWindowsFormsHost();
            sonarhost1.Child = maincore.son1.imgBx;
            sonarhost2.Child = maincore.son2.imgBx;
            //sonarhost3.Child = maincore.son3.imgBx;
            this.sonar1.Children.Add(sonarhost1);
            this.sonar2.Children.Add(sonarhost2);
            //this.sonar3.Children.Add(sonarhost3);

            //-----Video EMGUCV ImageBoxes-----\\
            ExtendedWindowsFormsHost videohost1 = new ExtendedWindowsFormsHost();
            ExtendedWindowsFormsHost videohost2 = new ExtendedWindowsFormsHost();

            //ExtendedWindowsFormsHost videohost3 = new ExtendedWindowsFormsHost();
            videohost1.Child             = maincore.cam1.imgBx;
            maincore.cam1.imgBx.SizeMode = PictureBoxSizeMode.StretchImage;
            videohost2.Child             = maincore.cam2.imgBx;
            maincore.cam2.imgBx.SizeMode = PictureBoxSizeMode.StretchImage;
            //videohost3.Child = maincore.cam3.imgBx;
            //maincore.cam3.imgBx.SizeMode = PictureBoxSizeMode.StretchImage;
            this.video1.Children.Add(videohost1);
            this.video2.Children.Add(videohost2);
            //this.video3.Children.Add(videohost3);

            //this.graph.DataSource = maincore.hydro1.chartCollection;
            //maincore.hydro1.acquisitionStart();
        }