Example #1
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            feedName = txtFeedName.Text;
            feedURL = txtFeelURL.Text;
            isEntrance = (cbxDirection.SelectedIndex == 0) ? true : false;

            detector = (cbxDetector.SelectedIndex == 0)
                ? MotionDetectorInstance.DETECTIONTYPE.TWO_FRAMES_DIFFERENCE
                : MotionDetectorInstance.DETECTIONTYPE.BACKGROUND_MODELLING;

            switch (cbxProcessor.SelectedIndex)
            {
                case 0:
                {
                    processor = MotionDetectorInstance.MOTION.MOTION_AREA_HIGHLIGHTING;
                    break;
                }
                case 1:
                {
                    processor = MotionDetectorInstance.MOTION.MOTION_GRID_AREA_HIGHLIGHTING;
                    break;
                }
                case 2:
                {
                    processor = MotionDetectorInstance.MOTION.MOTION_BORDER_HIGHLIGHTING;
                    break;
                }
            }

            switch (cbxSpeed.SelectedIndex)
            {
                case 0:
                {
                    speed = MotionDetectorInstance.DETECTIONSPEED.SLOW;
                    break;
                }
                case 1:
                {
                    speed = MotionDetectorInstance.DETECTIONSPEED.MEDIUM;
                    break;
                }
                case 2:
                {
                    speed = MotionDetectorInstance.DETECTIONSPEED.FAST;
                    break;
                }
            }

            switch (cbxSensitivity.SelectedIndex)
            {
                case 0:
                {
                    sensitivity = MotionDetectorInstance.DETECTIONSENSITIVITY.LOW;
                    break;
                }
                case 1:
                {
                    sensitivity = MotionDetectorInstance.DETECTIONSENSITIVITY.MEDIUM;
                    break;
                }
                case 2:
                {
                    sensitivity = MotionDetectorInstance.DETECTIONSENSITIVITY.HIGH;
                    break;
                }
            }

            if (cbxRobustChecking.SelectedIndex == 0)
                robustChecking = true;
            else
                robustChecking = false;

            DialogResult = DialogResult.OK;
        }
Example #2
0
        public void setDetectorSettings(MotionDetectorInstance.MOTION procrs, MotionDetectorInstance.DETECTIONTYPE dtctr,
                                        MotionDetectorInstance.DETECTIONSPEED spd, MotionDetectorInstance.DETECTIONSENSITIVITY sens)
        {
            switch (sens)
            {
            case MotionDetectorInstance.DETECTIONSENSITIVITY.LOW:
            {
                cbxSensitivity.SelectedIndex = 0;
                break;
            }

            case MotionDetectorInstance.DETECTIONSENSITIVITY.MEDIUM:
            {
                cbxSensitivity.SelectedIndex = 1;
                break;
            }

            case MotionDetectorInstance.DETECTIONSENSITIVITY.HIGH:
            {
                cbxSensitivity.SelectedIndex = 2;
                break;
            }
            }

            switch (procrs)
            {
            case MotionDetectorInstance.MOTION.MOTION_AREA_HIGHLIGHTING:
            {
                cbxProcessor.SelectedIndex = 0;
                break;
            }

            case MotionDetectorInstance.MOTION.MOTION_GRID_AREA_HIGHLIGHTING:
            {
                cbxProcessor.SelectedIndex = 1;
                break;
            }

            case MotionDetectorInstance.MOTION.MOTION_BORDER_HIGHLIGHTING:
            {
                cbxProcessor.SelectedIndex = 2;
                break;
            }
            }

            switch (spd)
            {
            case MotionDetectorInstance.DETECTIONSPEED.FAST:
            {
                cbxSpeed.SelectedIndex = 2;
                break;
            }

            case MotionDetectorInstance.DETECTIONSPEED.MEDIUM:
            {
                cbxSpeed.SelectedIndex = 1;
                break;
            }

            case MotionDetectorInstance.DETECTIONSPEED.SLOW:
            {
                cbxSpeed.SelectedIndex = 0;
                break;
            }
            }

            if (dtctr == MotionDetectorInstance.DETECTIONTYPE.TWO_FRAMES_DIFFERENCE)
            {
                cbxDetector.SelectedIndex = 0;
            }
            else
            {
                cbxDetector.SelectedIndex = 1;
            }
        }
Example #3
0
 public void updateMotionDetectorDetails(Rectangle[] detectionArea, MotionDetectorInstance.MOTION procrs, MotionDetectorInstance.DETECTIONTYPE dtctr,
                                         MotionDetectorInstance.DETECTIONSPEED spd, MotionDetectorInstance.DETECTIONSENSITIVITY sens)
 {
     _motionDetector.updateMotionDetectorDetails(detectionArea, procrs, dtctr, spd, sens);
 }
Example #4
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            feedName   = txtFeedName.Text;
            feedURL    = txtFeelURL.Text;
            isEntrance = (cbxDirection.SelectedIndex == 0) ? true : false;

            detector = (cbxDetector.SelectedIndex == 0)
                ? MotionDetectorInstance.DETECTIONTYPE.TWO_FRAMES_DIFFERENCE
                : MotionDetectorInstance.DETECTIONTYPE.BACKGROUND_MODELLING;

            switch (cbxProcessor.SelectedIndex)
            {
            case 0:
            {
                processor = MotionDetectorInstance.MOTION.MOTION_AREA_HIGHLIGHTING;
                break;
            }

            case 1:
            {
                processor = MotionDetectorInstance.MOTION.MOTION_GRID_AREA_HIGHLIGHTING;
                break;
            }

            case 2:
            {
                processor = MotionDetectorInstance.MOTION.MOTION_BORDER_HIGHLIGHTING;
                break;
            }
            }

            switch (cbxSpeed.SelectedIndex)
            {
            case 0:
            {
                speed = MotionDetectorInstance.DETECTIONSPEED.SLOW;
                break;
            }

            case 1:
            {
                speed = MotionDetectorInstance.DETECTIONSPEED.MEDIUM;
                break;
            }

            case 2:
            {
                speed = MotionDetectorInstance.DETECTIONSPEED.FAST;
                break;
            }
            }

            switch (cbxSensitivity.SelectedIndex)
            {
            case 0:
            {
                sensitivity = MotionDetectorInstance.DETECTIONSENSITIVITY.LOW;
                break;
            }

            case 1:
            {
                sensitivity = MotionDetectorInstance.DETECTIONSENSITIVITY.MEDIUM;
                break;
            }

            case 2:
            {
                sensitivity = MotionDetectorInstance.DETECTIONSENSITIVITY.HIGH;
                break;
            }
            }

            if (cbxRobustChecking.SelectedIndex == 0)
            {
                robustChecking = true;
            }
            else
            {
                robustChecking = false;
            }

            DialogResult = DialogResult.OK;
        }