コード例 #1
0
        public static object rigInfoGet(string profile, string webcam, infoEnum property)
        {
            foreach (cameraSpecificInfo infoI in camInfo)
            {
                if (infoI.profileName == profile && infoI.webcam == webcam)
                {
                    if (property == infoEnum.friendlyName)
                    {
                        return(infoI.friendlyName);
                    }
                    if (property == infoEnum.areaDetection)
                    {
                        return(infoI.areaDetection);
                    }
                    if (property == infoEnum.areaDetectionWithin)
                    {
                        return(infoI.areaDetectionWithin);
                    }
                    if (property == infoEnum.areaOffAtMotion)
                    {
                        return(infoI.areaOffAtMotion);
                    }
                    if (property == infoEnum.rectX)
                    {
                        return(infoI.rectX);
                    }
                    if (property == infoEnum.rectY)
                    {
                        return(infoI.rectY);
                    }
                    if (property == infoEnum.rectWidth)
                    {
                        return(infoI.rectWidth);
                    }
                    if (property == infoEnum.rectHeight)
                    {
                        return(infoI.rectHeight);
                    }
                    if (property == infoEnum.movementVal)
                    {
                        return(infoI.movementVal);
                    }
                    if (property == infoEnum.timeSpike)
                    {
                        return(infoI.timeSpike);
                    }
                    if (property == infoEnum.toleranceSpike)
                    {
                        return(infoI.toleranceSpike);
                    }
                    if (property == infoEnum.lightSpike)
                    {
                        return(infoI.lightSpike);
                    }
                    if (property == infoEnum.alarmActive)
                    {
                        return(infoI.alarmActive);
                    }
                    if (property == infoEnum.publishActive)
                    {
                        return(infoI.publishActive);
                    }

                    if (property == infoEnum.pubImage)
                    {
                        return(infoI.pubImage);
                    }
                    if (property == infoEnum.pubTime)
                    {
                        return(infoI.pubTime);
                    }
                    if (property == infoEnum.pubHours)
                    {
                        return(infoI.pubHours);
                    }
                    if (property == infoEnum.pubMins)
                    {
                        return(infoI.pubMins);
                    }
                    if (property == infoEnum.pubSecs)
                    {
                        return(infoI.pubSecs);
                    }
                    if (property == infoEnum.publishWeb)
                    {
                        return(infoI.publishWeb);
                    }
                    if (property == infoEnum.publishLocal)
                    {
                        return(infoI.publishLocal);
                    }
                    if (property == infoEnum.timerOn)
                    {
                        return(infoI.timerOn);
                    }
                    if (property == infoEnum.fileURLPubWeb)
                    {
                        return(infoI.fileURLPubWeb);
                    }
                    if (property == infoEnum.filenamePrefixPubWeb)
                    {
                        return(infoI.filenamePrefixPubWeb);
                    }
                    if (property == infoEnum.cycleStampCheckedPubWeb)
                    {
                        return(infoI.cycleStampCheckedPubWeb);
                    }
                    if (property == infoEnum.startCyclePubWeb)
                    {
                        return(infoI.startCyclePubWeb);
                    }
                    if (property == infoEnum.endCyclePubWeb)
                    {
                        return(infoI.endCyclePubWeb);
                    }
                    if (property == infoEnum.currentCyclePubWeb)
                    {
                        return(infoI.currentCyclePubWeb);
                    }
                    if (property == infoEnum.stampAppendPubWeb)
                    {
                        return(infoI.stampAppendPubWeb);
                    }
                    if (property == infoEnum.fileDirPubLoc)
                    {
                        return(infoI.fileDirPubLoc);
                    }
                    if (property == infoEnum.filenamePrefixPubLoc)
                    {
                        return(infoI.filenamePrefixPubLoc);
                    }
                    if (property == infoEnum.fileDirPubCust)
                    {
                        return(infoI.fileDirPubCust);
                    }
                    if (property == infoEnum.cycleStampCheckedPubLoc)
                    {
                        return(infoI.cycleStampCheckedPubLoc);
                    }
                    if (property == infoEnum.startCyclePubLoc)
                    {
                        return(infoI.startCyclePubLoc);
                    }
                    if (property == infoEnum.endCyclePubLoc)
                    {
                        return(infoI.endCyclePubLoc);
                    }
                    if (property == infoEnum.currentCyclePubLoc)
                    {
                        return(infoI.currentCyclePubLoc);
                    }
                    if (property == infoEnum.stampAppendPubLoc)
                    {
                        return(infoI.stampAppendPubLoc);
                    }

                    if (property == infoEnum.publishFirst)
                    {
                        return(infoI.publishFirst);
                    }
                    if (property == infoEnum.lastPublished)
                    {
                        return(infoI.lastPublished);
                    }

                    if (property == infoEnum.ipWebcamAddress)
                    {
                        return(infoI.ipWebcamAddress);
                    }
                    if (property == infoEnum.ipWebcamUser)
                    {
                        return(infoI.ipWebcamUser);
                    }
                    if (property == infoEnum.ipWebcamPassword)
                    {
                        return(infoI.ipWebcamPassword);
                    }
                }
            }

            return(null);
        }
コード例 #2
0
        public static void addInfo(infoEnum infoType, object val)
        {
            if (infoType == infoEnum.webcam)
            {
                //newcode
                //rigItem rig_item = new rigItem();
                //rig_item.cameraName = (string)val;
                //rig.Add(rig_item);
                //newcode

                infoIdx++;
                cameraSpecificInfo p_item = new cameraSpecificInfo();
                camInfo.Add(p_item);
                camInfo[infoIdx].webcam = (string)val;
            }

            if (camInfo.Count > 0)
            {
                if (infoType == infoEnum.profileName)
                {
                    camInfo[infoIdx].profileName = (string)val;
                }
                if (infoType == infoEnum.friendlyName)
                {
                    camInfo[infoIdx].friendlyName = (string)val;
                }

                if (infoType == infoEnum.areaDetection)
                {
                    camInfo[infoIdx].areaDetection = (bool)val;
                }
                if (infoType == infoEnum.areaDetectionWithin)
                {
                    camInfo[infoIdx].areaDetectionWithin = (bool)val;
                }


                if (infoType == infoEnum.alarmActive)
                {
                    camInfo[infoIdx].alarmActive = (bool)val;
                }
                if (infoType == infoEnum.publishActive)
                {
                    camInfo[infoIdx].publishActive = (bool)val;
                }


                //may be of use in future
                if (infoType == infoEnum.areaOffAtMotion)
                {
                    camInfo[infoIdx].areaOffAtMotion = (bool)val;
                }
                //may be of use in future

                if (infoType == infoEnum.rectX)
                {
                    camInfo[infoIdx].rectX = (int)val;
                }
                if (infoType == infoEnum.rectY)
                {
                    camInfo[infoIdx].rectY = (int)val;
                }
                if (infoType == infoEnum.rectWidth)
                {
                    camInfo[infoIdx].rectWidth = (int)val;
                }
                if (infoType == infoEnum.rectHeight)
                {
                    camInfo[infoIdx].rectHeight = (int)val;
                }
                if (infoType == infoEnum.movementVal)
                {
                    camInfo[infoIdx].movementVal = (double)val;
                }
                if (infoType == infoEnum.timeSpike)
                {
                    camInfo[infoIdx].timeSpike = (int)val;
                }
                if (infoType == infoEnum.toleranceSpike)
                {
                    camInfo[infoIdx].toleranceSpike = (int)val;
                }
                if (infoType == infoEnum.lightSpike)
                {
                    camInfo[infoIdx].lightSpike = (bool)val;
                }
                if (infoType == infoEnum.displayButton)
                {
                    camInfo[infoIdx].displayButton = (int)val;
                }



                if (infoType == infoEnum.pubImage)
                {
                    camInfo[infoIdx].pubImage = (bool)val;
                }
                if (infoType == infoEnum.pubTime)
                {
                    camInfo[infoIdx].pubTime = (int)val;
                }
                if (infoType == infoEnum.pubHours)
                {
                    camInfo[infoIdx].pubHours = (bool)val;
                }
                if (infoType == infoEnum.pubMins)
                {
                    camInfo[infoIdx].pubMins = (bool)val;
                }
                if (infoType == infoEnum.pubSecs)
                {
                    camInfo[infoIdx].pubSecs = (bool)val;
                }
                if (infoType == infoEnum.publishWeb)
                {
                    camInfo[infoIdx].publishWeb = (bool)val;
                }
                if (infoType == infoEnum.publishLocal)
                {
                    camInfo[infoIdx].publishLocal = (bool)val;
                }
                if (infoType == infoEnum.timerOn)
                {
                    camInfo[infoIdx].timerOn = (bool)val;
                }
                if (infoType == infoEnum.fileURLPubWeb)
                {
                    camInfo[infoIdx].fileURLPubWeb = (string)val;
                }
                if (infoType == infoEnum.filenamePrefixPubWeb)
                {
                    camInfo[infoIdx].filenamePrefixPubWeb = (string)val;
                }
                if (infoType == infoEnum.cycleStampCheckedPubWeb)
                {
                    camInfo[infoIdx].cycleStampCheckedPubWeb = (int)val;
                }
                if (infoType == infoEnum.startCyclePubWeb)
                {
                    camInfo[infoIdx].startCyclePubWeb = (int)val;
                }
                if (infoType == infoEnum.endCyclePubWeb)
                {
                    camInfo[infoIdx].endCyclePubWeb = (int)val;
                }
                if (infoType == infoEnum.currentCyclePubWeb)
                {
                    camInfo[infoIdx].currentCyclePubWeb = (int)val;
                }
                if (infoType == infoEnum.stampAppendPubWeb)
                {
                    camInfo[infoIdx].stampAppendPubWeb = (bool)val;
                }
                if (infoType == infoEnum.fileDirPubLoc)
                {
                    camInfo[infoIdx].fileDirPubLoc = (string)val;
                }
                if (infoType == infoEnum.filenamePrefixPubLoc)
                {
                    camInfo[infoIdx].filenamePrefixPubLoc = (string)val;
                }
                if (infoType == infoEnum.fileDirPubCust)
                {
                    camInfo[infoIdx].fileDirPubCust = (bool)val;
                }
                if (infoType == infoEnum.cycleStampCheckedPubLoc)
                {
                    camInfo[infoIdx].cycleStampCheckedPubLoc = (int)val;
                }
                if (infoType == infoEnum.startCyclePubLoc)
                {
                    camInfo[infoIdx].startCyclePubLoc = (int)val;
                }
                if (infoType == infoEnum.endCyclePubLoc)
                {
                    camInfo[infoIdx].endCyclePubLoc = (int)val;
                }
                if (infoType == infoEnum.currentCyclePubLoc)
                {
                    camInfo[infoIdx].currentCyclePubLoc = (int)val;
                }
                if (infoType == infoEnum.stampAppendPubLoc)
                {
                    camInfo[infoIdx].stampAppendPubLoc = (bool)val;
                }

                if (infoType == infoEnum.publishFirst)
                {
                    camInfo[infoIdx].publishFirst = (bool)val;
                }
                if (infoType == infoEnum.lastPublished)
                {
                    camInfo[infoIdx].lastPublished = (int)val;
                }


                if (infoType == infoEnum.ipWebcamAddress)
                {
                    camInfo[infoIdx].ipWebcamAddress = (string)val;
                }
                if (infoType == infoEnum.ipWebcamUser)
                {
                    camInfo[infoIdx].ipWebcamUser = (string)val;
                }
                if (infoType == infoEnum.ipWebcamPassword)
                {
                    camInfo[infoIdx].ipWebcamPassword = (string)val;
                }
            }
        }
コード例 #3
0
        public static void updateInfo(string profileName, string webcam, infoEnum infoType, object val)
        {
            if (camerasAttached())
            {
                foreach (cameraSpecificInfo infoI in camInfo)
                {
                    if (infoI.profileName == profileName && infoI.webcam == webcam)
                    {
                        if (infoType == infoEnum.friendlyName)
                        {
                            infoI.friendlyName = (string)val;
                        }

                        if (infoType == infoEnum.areaDetection)
                        {
                            infoI.areaDetection = (bool)val;
                        }
                        if (infoType == infoEnum.areaDetectionWithin)
                        {
                            infoI.areaDetectionWithin = (bool)val;
                        }
                        if (infoType == infoEnum.alarmActive)
                        {
                            infoI.alarmActive = (bool)val;
                        }
                        if (infoType == infoEnum.publishActive)
                        {
                            infoI.publishActive = (bool)val;
                        }


                        //may be of use in future
                        if (infoType == infoEnum.areaOffAtMotion)
                        {
                            infoI.areaOffAtMotion = (bool)val;
                        }
                        //may be of use in future

                        if (infoType == infoEnum.rectX)
                        {
                            infoI.rectX = (int)val;
                        }
                        if (infoType == infoEnum.rectY)
                        {
                            infoI.rectY = (int)val;
                        }
                        if (infoType == infoEnum.rectWidth)
                        {
                            infoI.rectWidth = (int)val;
                        }
                        if (infoType == infoEnum.rectHeight)
                        {
                            infoI.rectHeight = (int)val;
                        }
                        if (infoType == infoEnum.movementVal)
                        {
                            infoI.movementVal = (double)val;
                        }
                        if (infoType == infoEnum.timeSpike)
                        {
                            infoI.timeSpike = (int)val;
                        }
                        if (infoType == infoEnum.toleranceSpike)
                        {
                            infoI.toleranceSpike = (int)val;
                        }
                        if (infoType == infoEnum.lightSpike)
                        {
                            infoI.lightSpike = (bool)val;
                        }
                        if (infoType == infoEnum.displayButton)
                        {
                            infoI.displayButton = (int)val;
                        }

                        if (infoType == infoEnum.pubImage)
                        {
                            infoI.pubImage = (bool)val;
                        }
                        if (infoType == infoEnum.pubTime)
                        {
                            infoI.pubTime = (int)val;
                        }
                        if (infoType == infoEnum.pubHours)
                        {
                            infoI.pubHours = (bool)val;
                        }
                        if (infoType == infoEnum.pubMins)
                        {
                            infoI.pubMins = (bool)val;
                        }
                        if (infoType == infoEnum.pubSecs)
                        {
                            infoI.pubSecs = (bool)val;
                        }
                        if (infoType == infoEnum.publishWeb)
                        {
                            infoI.publishWeb = (bool)val;
                        }
                        if (infoType == infoEnum.publishLocal)
                        {
                            infoI.publishLocal = (bool)val;
                        }
                        if (infoType == infoEnum.timerOn)
                        {
                            infoI.timerOn = (bool)val;
                        }
                        if (infoType == infoEnum.fileURLPubWeb)
                        {
                            infoI.fileURLPubWeb = (string)val;
                        }
                        if (infoType == infoEnum.filenamePrefixPubWeb)
                        {
                            infoI.filenamePrefixPubWeb = (string)val;
                        }
                        if (infoType == infoEnum.cycleStampCheckedPubWeb)
                        {
                            infoI.cycleStampCheckedPubWeb = (int)val;
                        }
                        if (infoType == infoEnum.startCyclePubWeb)
                        {
                            infoI.startCyclePubWeb = (int)val;
                        }
                        if (infoType == infoEnum.endCyclePubWeb)
                        {
                            infoI.endCyclePubWeb = (int)val;
                        }
                        if (infoType == infoEnum.currentCyclePubWeb)
                        {
                            infoI.currentCyclePubWeb = (int)val;
                        }
                        if (infoType == infoEnum.stampAppendPubWeb)
                        {
                            infoI.stampAppendPubWeb = (bool)val;
                        }
                        if (infoType == infoEnum.fileDirPubLoc)
                        {
                            infoI.fileDirPubLoc = (string)val;
                        }
                        if (infoType == infoEnum.filenamePrefixPubLoc)
                        {
                            infoI.filenamePrefixPubLoc = (string)val;
                        }
                        if (infoType == infoEnum.fileDirPubCust)
                        {
                            infoI.fileDirPubCust = (bool)val;
                        }
                        if (infoType == infoEnum.cycleStampCheckedPubLoc)
                        {
                            infoI.cycleStampCheckedPubLoc = (int)val;
                        }
                        if (infoType == infoEnum.startCyclePubLoc)
                        {
                            infoI.startCyclePubLoc = (int)val;
                        }
                        if (infoType == infoEnum.endCyclePubLoc)
                        {
                            infoI.endCyclePubLoc = (int)val;
                        }
                        if (infoType == infoEnum.currentCyclePubLoc)
                        {
                            infoI.currentCyclePubLoc = (int)val;
                        }
                        if (infoType == infoEnum.stampAppendPubLoc)
                        {
                            infoI.stampAppendPubLoc = (bool)val;
                        }

                        if (infoType == infoEnum.publishFirst)
                        {
                            infoI.publishFirst = (bool)val;
                        }
                        if (infoType == infoEnum.lastPublished)
                        {
                            infoI.lastPublished = (int)val;
                        }

                        if (infoType == infoEnum.ipWebcamAddress)
                        {
                            infoI.ipWebcamAddress = (string)val;
                        }
                        if (infoType == infoEnum.ipWebcamUser)
                        {
                            infoI.ipWebcamUser = (string)val;
                        }
                        if (infoType == infoEnum.ipWebcamPassword)
                        {
                            infoI.ipWebcamPassword = (string)val;
                        }
                    }
                }
            }
        }
コード例 #4
0
        public static void updateInfo(string profileName, string webcam, infoEnum infoType, object val)
        {
            if (camerasAttached())
            {

                foreach (cameraSpecificInfo infoI in camInfo)
                {

                    if (infoI.profileName == profileName && infoI.webcam == webcam)
                    {

                        if (infoType == infoEnum.friendlyName) { infoI.friendlyName = (string)val; }

                        if (infoType == infoEnum.areaDetection) { infoI.areaDetection = (bool)val; }
                        if (infoType == infoEnum.areaDetectionWithin) { infoI.areaDetectionWithin = (bool)val; }
                        if (infoType == infoEnum.alarmActive) { infoI.alarmActive = (bool)val; }
                        if (infoType == infoEnum.publishActive) { infoI.publishActive = (bool)val; }

                        //may be of use in future
                        if (infoType == infoEnum.areaOffAtMotion) { infoI.areaOffAtMotion = (bool)val; }
                        //may be of use in future

                        if (infoType == infoEnum.rectX) { infoI.rectX = (int)val; }
                        if (infoType == infoEnum.rectY) { infoI.rectY = (int)val; }
                        if (infoType == infoEnum.rectWidth) { infoI.rectWidth = (int)val; }
                        if (infoType == infoEnum.rectHeight) { infoI.rectHeight = (int)val; }
                        if (infoType == infoEnum.movementVal) { infoI.movementVal = (double)val; }
                        if (infoType == infoEnum.timeSpike) { infoI.timeSpike = (int)val; }
                        if (infoType == infoEnum.toleranceSpike) { infoI.toleranceSpike = (int)val; }
                        if (infoType == infoEnum.lightSpike) { infoI.lightSpike = (bool)val; }
                        if (infoType == infoEnum.displayButton) { infoI.displayButton = (int)val; }

                        if (infoType == infoEnum.pubImage) { infoI.pubImage = (bool)val; }
                        if (infoType == infoEnum.pubTime) { infoI.pubTime = (int)val; }
                        if (infoType == infoEnum.pubHours) { infoI.pubHours = (bool)val; }
                        if (infoType == infoEnum.pubMins) { infoI.pubMins = (bool)val; }
                        if (infoType == infoEnum.pubSecs) { infoI.pubSecs = (bool)val; }
                        if (infoType == infoEnum.publishWeb) { infoI.publishWeb = (bool)val; }
                        if (infoType == infoEnum.publishLocal) { infoI.publishLocal = (bool)val; }
                        if (infoType == infoEnum.timerOn) { infoI.timerOn = (bool)val; }
                        if (infoType == infoEnum.fileURLPubWeb) { infoI.fileURLPubWeb = (string)val; }
                        if (infoType == infoEnum.filenamePrefixPubWeb) { infoI.filenamePrefixPubWeb = (string)val; }
                        if (infoType == infoEnum.cycleStampCheckedPubWeb) { infoI.cycleStampCheckedPubWeb = (int)val; }
                        if (infoType == infoEnum.startCyclePubWeb) { infoI.startCyclePubWeb = (int)val; }
                        if (infoType == infoEnum.endCyclePubWeb) { infoI.endCyclePubWeb = (int)val; }
                        if (infoType == infoEnum.currentCyclePubWeb) { infoI.currentCyclePubWeb = (int)val; }
                        if (infoType == infoEnum.stampAppendPubWeb) { infoI.stampAppendPubWeb = (bool)val; }
                        if (infoType == infoEnum.fileDirPubLoc) { infoI.fileDirPubLoc = (string)val; }
                        if (infoType == infoEnum.filenamePrefixPubLoc) { infoI.filenamePrefixPubLoc = (string)val; }
                        if (infoType == infoEnum.fileDirPubCust) { infoI.fileDirPubCust = (bool)val; }
                        if (infoType == infoEnum.cycleStampCheckedPubLoc) { infoI.cycleStampCheckedPubLoc = (int)val; }
                        if (infoType == infoEnum.startCyclePubLoc) { infoI.startCyclePubLoc = (int)val; }
                        if (infoType == infoEnum.endCyclePubLoc) { infoI.endCyclePubLoc = (int)val; }
                        if (infoType == infoEnum.currentCyclePubLoc) { infoI.currentCyclePubLoc = (int)val; }
                        if (infoType == infoEnum.stampAppendPubLoc) { infoI.stampAppendPubLoc = (bool)val; }

                        if (infoType == infoEnum.publishFirst) { infoI.publishFirst = (bool)val; }
                        if (infoType == infoEnum.lastPublished) { infoI.lastPublished = (int)val; }

                        if (infoType == infoEnum.ipWebcamAddress) { infoI.ipWebcamAddress = (string)val; }
                        if (infoType == infoEnum.ipWebcamUser) { infoI.ipWebcamUser = (string)val; }
                        if (infoType == infoEnum.ipWebcamPassword) { infoI.ipWebcamPassword = (string)val; }

                    }

                }

            }
        }
コード例 #5
0
        public static object rigInfoGet(string profile, string webcam, infoEnum property)
        {
            foreach (cameraSpecificInfo infoI in camInfo)
            {

                if (infoI.profileName == profile && infoI.webcam == webcam)
                {

                    if (property == infoEnum.friendlyName) return infoI.friendlyName;
                    if (property == infoEnum.areaDetection) return infoI.areaDetection;
                    if (property == infoEnum.areaDetectionWithin) return infoI.areaDetectionWithin;
                    if (property == infoEnum.areaOffAtMotion) return infoI.areaOffAtMotion;
                    if (property == infoEnum.rectX) return infoI.rectX;
                    if (property == infoEnum.rectY) return infoI.rectY;
                    if (property == infoEnum.rectWidth) return infoI.rectWidth;
                    if (property == infoEnum.rectHeight) return infoI.rectHeight;
                    if (property == infoEnum.movementVal) return infoI.movementVal;
                    if (property == infoEnum.timeSpike) return infoI.timeSpike;
                    if (property == infoEnum.toleranceSpike) return infoI.toleranceSpike;
                    if (property == infoEnum.lightSpike) return infoI.lightSpike;
                    if (property == infoEnum.alarmActive) return infoI.alarmActive;
                    if (property == infoEnum.publishActive) return infoI.publishActive;

                    if (property == infoEnum.pubImage) return infoI.pubImage;
                    if (property == infoEnum.pubTime) return infoI.pubTime;
                    if (property == infoEnum.pubHours) return infoI.pubHours;
                    if (property == infoEnum.pubMins) return infoI.pubMins;
                    if (property == infoEnum.pubSecs) return infoI.pubSecs;
                    if (property == infoEnum.publishWeb) return infoI.publishWeb;
                    if (property == infoEnum.publishLocal) return infoI.publishLocal;
                    if (property == infoEnum.timerOn) return infoI.timerOn;
                    if (property == infoEnum.fileURLPubWeb) return infoI.fileURLPubWeb;
                    if (property == infoEnum.filenamePrefixPubWeb) return infoI.filenamePrefixPubWeb;
                    if (property == infoEnum.cycleStampCheckedPubWeb) return infoI.cycleStampCheckedPubWeb;
                    if (property == infoEnum.startCyclePubWeb) return infoI.startCyclePubWeb;
                    if (property == infoEnum.endCyclePubWeb) return infoI.endCyclePubWeb;
                    if (property == infoEnum.currentCyclePubWeb) return infoI.currentCyclePubWeb;
                    if (property == infoEnum.stampAppendPubWeb) return infoI.stampAppendPubWeb;
                    if (property == infoEnum.fileDirPubLoc) return infoI.fileDirPubLoc;
                    if (property == infoEnum.filenamePrefixPubLoc) return infoI.filenamePrefixPubLoc;
                    if (property == infoEnum.fileDirPubCust) return infoI.fileDirPubCust;
                    if (property == infoEnum.cycleStampCheckedPubLoc) return infoI.cycleStampCheckedPubLoc;
                    if (property == infoEnum.startCyclePubLoc) return infoI.startCyclePubLoc;
                    if (property == infoEnum.endCyclePubLoc) return infoI.endCyclePubLoc;
                    if (property == infoEnum.currentCyclePubLoc) return infoI.currentCyclePubLoc;
                    if (property == infoEnum.stampAppendPubLoc) return infoI.stampAppendPubLoc;

                    if (property == infoEnum.publishFirst) return infoI.publishFirst;
                    if (property == infoEnum.lastPublished) return infoI.lastPublished;

                    if (property == infoEnum.ipWebcamAddress) return infoI.ipWebcamAddress;
                    if (property == infoEnum.ipWebcamUser) return infoI.ipWebcamUser;
                    if (property == infoEnum.ipWebcamPassword) return infoI.ipWebcamPassword;

                }

            }

            return null;
        }
コード例 #6
0
        public static void addInfo(infoEnum infoType, object val)
        {
            if (infoType == infoEnum.webcam)
            {

                //newcode
                //rigItem rig_item = new rigItem();
                //rig_item.cameraName = (string)val;
                //rig.Add(rig_item);
                //newcode

                infoIdx++;
                cameraSpecificInfo p_item = new cameraSpecificInfo();
                camInfo.Add(p_item);
                camInfo[infoIdx].webcam = (string)val;

            }

            if (camInfo.Count > 0)
            {

                if (infoType == infoEnum.profileName) { camInfo[infoIdx].profileName = (string)val; }
                if (infoType == infoEnum.friendlyName) { camInfo[infoIdx].friendlyName = (string)val; }

                if (infoType == infoEnum.areaDetection) { camInfo[infoIdx].areaDetection = (bool)val; }
                if (infoType == infoEnum.areaDetectionWithin) { camInfo[infoIdx].areaDetectionWithin = (bool)val; }

                if (infoType == infoEnum.alarmActive) { camInfo[infoIdx].alarmActive = (bool)val; }
                if (infoType == infoEnum.publishActive) { camInfo[infoIdx].publishActive = (bool)val; }

                //may be of use in future
                if (infoType == infoEnum.areaOffAtMotion) { camInfo[infoIdx].areaOffAtMotion = (bool)val; }
                //may be of use in future

                if (infoType == infoEnum.rectX) { camInfo[infoIdx].rectX = (int)val; }
                if (infoType == infoEnum.rectY) { camInfo[infoIdx].rectY = (int)val; }
                if (infoType == infoEnum.rectWidth) { camInfo[infoIdx].rectWidth = (int)val; }
                if (infoType == infoEnum.rectHeight) { camInfo[infoIdx].rectHeight = (int)val; }
                if (infoType == infoEnum.movementVal) { camInfo[infoIdx].movementVal = (double)val; }
                if (infoType == infoEnum.timeSpike) { camInfo[infoIdx].timeSpike = (int)val; }
                if (infoType == infoEnum.toleranceSpike) { camInfo[infoIdx].toleranceSpike = (int)val; }
                if (infoType == infoEnum.lightSpike) { camInfo[infoIdx].lightSpike = (bool)val; }
                if (infoType == infoEnum.displayButton) { camInfo[infoIdx].displayButton = (int)val; }

                if (infoType == infoEnum.pubImage) { camInfo[infoIdx].pubImage = (bool)val; }
                if (infoType == infoEnum.pubTime) { camInfo[infoIdx].pubTime = (int)val; }
                if (infoType == infoEnum.pubHours) { camInfo[infoIdx].pubHours = (bool)val; }
                if (infoType == infoEnum.pubMins) { camInfo[infoIdx].pubMins = (bool)val; }
                if (infoType == infoEnum.pubSecs) { camInfo[infoIdx].pubSecs = (bool)val; }
                if (infoType == infoEnum.publishWeb) { camInfo[infoIdx].publishWeb = (bool)val; }
                if (infoType == infoEnum.publishLocal) { camInfo[infoIdx].publishLocal = (bool)val; }
                if (infoType == infoEnum.timerOn) { camInfo[infoIdx].timerOn = (bool)val; }
                if (infoType == infoEnum.fileURLPubWeb) { camInfo[infoIdx].fileURLPubWeb = (string)val; }
                if (infoType == infoEnum.filenamePrefixPubWeb) { camInfo[infoIdx].filenamePrefixPubWeb = (string)val; }
                if (infoType == infoEnum.cycleStampCheckedPubWeb) { camInfo[infoIdx].cycleStampCheckedPubWeb = (int)val; }
                if (infoType == infoEnum.startCyclePubWeb) { camInfo[infoIdx].startCyclePubWeb = (int)val; }
                if (infoType == infoEnum.endCyclePubWeb) { camInfo[infoIdx].endCyclePubWeb = (int)val; }
                if (infoType == infoEnum.currentCyclePubWeb) { camInfo[infoIdx].currentCyclePubWeb = (int)val; }
                if (infoType == infoEnum.stampAppendPubWeb) { camInfo[infoIdx].stampAppendPubWeb = (bool)val; }
                if (infoType == infoEnum.fileDirPubLoc) { camInfo[infoIdx].fileDirPubLoc = (string)val; }
                if (infoType == infoEnum.filenamePrefixPubLoc) { camInfo[infoIdx].filenamePrefixPubLoc = (string)val; }
                if (infoType == infoEnum.fileDirPubCust) { camInfo[infoIdx].fileDirPubCust = (bool)val; }
                if (infoType == infoEnum.cycleStampCheckedPubLoc) { camInfo[infoIdx].cycleStampCheckedPubLoc = (int)val; }
                if (infoType == infoEnum.startCyclePubLoc) { camInfo[infoIdx].startCyclePubLoc = (int)val; }
                if (infoType == infoEnum.endCyclePubLoc) { camInfo[infoIdx].endCyclePubLoc = (int)val; }
                if (infoType == infoEnum.currentCyclePubLoc) { camInfo[infoIdx].currentCyclePubLoc = (int)val; }
                if (infoType == infoEnum.stampAppendPubLoc) { camInfo[infoIdx].stampAppendPubLoc = (bool)val; }

                if (infoType == infoEnum.publishFirst) { camInfo[infoIdx].publishFirst = (bool)val; }
                if (infoType == infoEnum.lastPublished) { camInfo[infoIdx].lastPublished = (int)val; }

                if (infoType == infoEnum.ipWebcamAddress) { camInfo[infoIdx].ipWebcamAddress = (string)val; }
                if (infoType == infoEnum.ipWebcamUser) { camInfo[infoIdx].ipWebcamUser = (string)val; }
                if (infoType == infoEnum.ipWebcamPassword) { camInfo[infoIdx].ipWebcamPassword = (string)val; }

            }
        }