Пример #1
0
        public NavigationSimulatorForm()
        {
            InitializeComponent();
            buttonStopTraining.Enabled = false;
            buttonStopSim.Enabled      = false;

            timerDiv          = 0;
            cameraCarPosition = new CameraObjectPositionProvider(pictureBoxCamPreview);
            simulation        = true;
            carRunning        = false;
            makeNewItemManager();

            //add serial port names to list
            comboBoxSerial.Items.AddRange(SerialPort.GetPortNames());
            comboBoxSerial.SelectedIndex = comboBoxSerial.Items.Count - 1;

            carModelGraphicControl1.Invalidate();
            carModelGraphicControl1.OnRefreshed += new CarModelGraphicControlRefreshedDelegate(refreshTextboxes);



            checkBoxShowNNOutput_CheckedChanged(this, null);
            trackBarMu_Scroll(this, null);

            pictureBoxCarMarker.Image    = Image.FromFile("marker1.png");
            pictureBoxFinishMarker.Image = Image.FromFile("marker5.png");
            pictureBoxBackground.Image   = Image.FromFile("background.png");
            checkCamImages();
            timer1.Enabled = true;
        }
Пример #2
0
        public NavigationSimulatorForm()
        {
            InitializeComponent();
            buttonStopTraining.Enabled = false;
            buttonStopSim.Enabled = false;            

            timerDiv = 0;
            cameraCarPosition = new CameraObjectPositionProvider(pictureBoxCamPreview);
            simulation = true;
            carRunning = false;
            makeNewItemManager();
        
            //add serial port names to list
            comboBoxSerial.Items.AddRange(SerialPort.GetPortNames());
            comboBoxSerial.SelectedIndex = comboBoxSerial.Items.Count - 1;            

            carModelGraphicControl1.Invalidate();
            carModelGraphicControl1.OnRefreshed += new CarModelGraphicControlRefreshedDelegate(refreshTextboxes);
            
            

            checkBoxShowNNOutput_CheckedChanged(this, null);
            trackBarMu_Scroll(this, null);

            pictureBoxCarMarker.Image = Image.FromFile("marker1.png");
            pictureBoxFinishMarker.Image = Image.FromFile("marker5.png");
            pictureBoxBackground.Image = Image.FromFile("background.png");
            checkCamImages();
            timer1.Enabled = true;
        }