コード例 #1
0
        public static void addProfile()
        {
            configApplication data = new configApplication(new crypt());

            //data.configDataInit();
            profiles.Add(data);
        }
コード例 #2
0
 public static void addProfile(string profileName)
 {
     if (!profileExists(profileName))
     {
         configApplication data = new configApplication(new crypt());
         //data.configDataInit();
         data.profileName = profileName.ToLower();
         profiles.Add(data);
     }
     else
     {
         MessageBox.Show("Cannot create profile as name already exists.", "Error");
     }
 }
コード例 #3
0
 public static void deleteProfile(string profileName)
 {
     if (profileExists(profileName))
     {
         if (profiles.Count <= 1)
         {
             MessageBox.Show("Cannot delete profile as at least one profile must exist.", "Error");
         }
         else
         {
             for (int i = 0; i < profiles.Count; i++)
             {
                 configApplication tmpData = (configApplication)profiles[i];
                 if (tmpData.profileName == profileName)
                 {
                     profiles.RemoveAt(i);
                     break;
                 }
             }
         }
     }
 }
コード例 #4
0
 public static void copyProfile(string copyFrom, string copyTo)
 {
     if (!profileExists(copyTo))
     {
         //configData tmpData = (configData)profiles[i]
         foreach (configApplication data in profiles)
         {
             if (data.profileName == copyFrom)
             {
                 configApplication newData = (configApplication)data.Clone();
                 //configData newData = new configData();
                 //newData = data;
                 newData.profileName = copyTo;
                 profiles.Add(newData);
                 //bubble.configuration.Configs.Add(newData);
                 break;
             }
         }
     }
     else
     {
         MessageBox.Show("Cannot copy profile as new name already exists.", "Error");
     }
 }
コード例 #5
0
        public static bool ConvertOldProfileIfExists(Configuration config)
        {
            string fileName = bubble.xmlFolder + "config.xml";

            if (!File.Exists(fileName))
            {
                return(true);
            }

            Interfaces.IEncryption crypt      = new crypt();
            XmlTextReader          configFile = new XmlTextReader(fileName);
            configApplication      appInfo    = new configApplication();
            configWebcam           webcamInfo = new configWebcam();

            try
            {
                while (configFile.Read())
                {
                    //first line for this appInfo
                    if (configFile.LocalName.Equals("profileStart"))
                    {
                        appInfo = new configApplication();
                        config.appConfigs.Add(appInfo);
                        appInfo.profileName = configFile.ReadString();
                    }

                    //first line for this webcamInfo
                    if (configFile.LocalName.Equals("webcam"))
                    {
                        appInfo.webcam = configFile.ReadString();
                        webcamInfo     = new configWebcam();
                        appInfo.camConfigs.Add(webcamInfo);
                        webcamInfo.webcam      = appInfo.webcam;
                        webcamInfo.profileName = appInfo.profileName;
                    }


                    if (configFile.LocalName.Equals(CameraRig.infoEnum.alarmActive.ToString()))
                    {
                        webcamInfo.alarmActive = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.publishActive.ToString()))
                    {
                        webcamInfo.publishActive = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.friendlyName.ToString()))
                    {
                        webcamInfo.friendlyName = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.displayButton.ToString()))
                    {
                        webcamInfo.displayButton = Convert.ToInt32(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.pubTime.ToString()))
                    {
                        webcamInfo.pubTime = Convert.ToInt32(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.pubHours.ToString()))
                    {
                        webcamInfo.pubHours = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.pubMins.ToString()))
                    {
                        webcamInfo.pubMins = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.pubSecs.ToString()))
                    {
                        webcamInfo.pubSecs = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.publishWeb.ToString()))
                    {
                        webcamInfo.publishWeb = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.publishLocal.ToString()))
                    {
                        webcamInfo.publishLocal = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.timerOn.ToString()))
                    {
                        webcamInfo.timerOn = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.fileURLPubWeb.ToString()))
                    {
                        webcamInfo.fileURLPubWeb = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.filenamePrefixPubWeb.ToString()))
                    {
                        webcamInfo.filenamePrefixPubWeb = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.cycleStampCheckedPubWeb.ToString()))
                    {
                        webcamInfo.cycleStampCheckedPubWeb = Convert.ToInt32(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.startCyclePubWeb.ToString()))
                    {
                        webcamInfo.startCyclePubWeb = Convert.ToInt32(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.endCyclePubWeb.ToString()))
                    {
                        webcamInfo.endCyclePubWeb = Convert.ToInt32(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.currentCyclePubWeb.ToString()))
                    {
                        webcamInfo.currentCyclePubWeb = Convert.ToInt32(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.stampAppendPubWeb.ToString()))
                    {
                        webcamInfo.stampAppendPubWeb = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.fileAlertPubLoc.ToString()))
                    {
                        webcamInfo.fileDirAlertLoc = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.fileAlertPubCust.ToString()))
                    {
                        webcamInfo.fileDirAlertCust = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.fileDirPubLoc.ToString()))
                    {
                        webcamInfo.fileDirPubLoc = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.fileDirPubCust.ToString()))
                    {
                        webcamInfo.fileDirPubCust = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.filenamePrefixPubLoc.ToString()))
                    {
                        webcamInfo.filenamePrefixPubLoc = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.cycleStampCheckedPubLoc.ToString()))
                    {
                        webcamInfo.cycleStampCheckedPubLoc = Convert.ToInt32(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.startCyclePubLoc.ToString()))
                    {
                        webcamInfo.startCyclePubLoc = Convert.ToInt32(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.endCyclePubLoc.ToString()))
                    {
                        webcamInfo.endCyclePubLoc = Convert.ToInt32(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.currentCyclePubLoc.ToString()))
                    {
                        webcamInfo.currentCyclePubLoc = Convert.ToInt32(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.stampAppendPubLoc.ToString()))
                    {
                        webcamInfo.stampAppendPubLoc = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.ipWebcamAddress.ToString()))
                    {
                        webcamInfo.ipWebcamAddress = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.ipWebcamUser.ToString()))
                    {
                        webcamInfo.ipWebcamUser = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.ipWebcamPassword.ToString()))
                    {
                        webcamInfo.ipWebcamPassword = configFile.ReadString();
                    }

                    if (configFile.LocalName.Equals(CameraRig.infoEnum.areaDetection.ToString()))
                    {
                        appInfo.areaDetection    = Convert.ToBoolean(configFile.ReadString());
                        webcamInfo.areaDetection = appInfo.areaDetection;
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.areaDetectionWithin.ToString()))
                    {
                        appInfo.areaDetectionWithin    = Convert.ToBoolean(configFile.ReadString());
                        webcamInfo.areaDetectionWithin = appInfo.areaDetectionWithin;
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.areaOffAtMotion.ToString()))
                    {
                        appInfo.areaOffAtMotion    = Convert.ToBoolean(configFile.ReadString());
                        webcamInfo.areaOffAtMotion = appInfo.areaOffAtMotion;
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.rectX.ToString()))
                    {
                        appInfo.rectX    = Convert.ToInt32(configFile.ReadString());
                        webcamInfo.rectX = appInfo.rectX;
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.rectY.ToString()))
                    {
                        appInfo.rectY    = Convert.ToInt32(configFile.ReadString());
                        webcamInfo.rectY = appInfo.rectY;
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.rectWidth.ToString()))
                    {
                        appInfo.rectWidth    = Convert.ToInt32(configFile.ReadString());
                        webcamInfo.rectWidth = appInfo.rectWidth;
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.rectHeight.ToString()))
                    {
                        appInfo.rectHeight    = Convert.ToInt32(configFile.ReadString());
                        webcamInfo.rectHeight = appInfo.rectHeight;
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.movementVal.ToString()))
                    {
                        appInfo.movementVal    = Convert.ToDouble(configFile.ReadString());
                        webcamInfo.movementVal = appInfo.movementVal;
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.timeSpike.ToString()))
                    {
                        appInfo.timeSpike    = Convert.ToInt32(configFile.ReadString());
                        webcamInfo.timeSpike = appInfo.timeSpike;
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.toleranceSpike.ToString()))
                    {
                        appInfo.toleranceSpike    = Convert.ToInt32(configFile.ReadString());
                        webcamInfo.toleranceSpike = appInfo.toleranceSpike;
                    }
                    if (configFile.LocalName.Equals(CameraRig.infoEnum.lightSpike.ToString()))
                    {
                        appInfo.lightSpike    = Convert.ToBoolean(configFile.ReadString());
                        webcamInfo.lightSpike = appInfo.lightSpike;
                    }

                    if (configFile.LocalName.Equals("mysqlDriver"))
                    {
                        config.mysqlDriver = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("newsSeq"))
                    {
                        config.newsSeq = Convert.ToInt32(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("version"))
                    {
                        config.version = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("freezeGuard"))
                    {
                        appInfo.freezeGuard = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("freezeGuardWindowShow"))
                    {
                        appInfo.freezeGuardWindowShow = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("updatesNotify"))
                    {
                        appInfo.updatesNotify = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("countdownNow"))
                    {
                        appInfo.countdownNow = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("cycleStamp"))
                    {
                        appInfo.cycleStamp = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("activatecountdown"))
                    {
                        appInfo.activatecountdown = Convert.ToInt32(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("activatecountdownTime"))
                    {
                        appInfo.activatecountdownTime = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("countdownTime"))
                    {
                        appInfo.countdownTime = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("alert"))
                    {
                        appInfo.AlertOnStartup = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("maxImagesToEmail"))
                    {
                        appInfo.maxImagesToEmail = Convert.ToInt64(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("ping"))
                    {
                        appInfo.ping = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("pingAll"))
                    {
                        appInfo.pingAll = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("pingInterval"))
                    {
                        appInfo.pingInterval = Convert.ToInt32(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("captureMovementImages"))
                    {
                        appInfo.captureMovementImages = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("sendNotifyEmail"))
                    {
                        appInfo.sendNotifyEmail = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("sendFullSizeImages"))
                    {
                        appInfo.sendFullSizeImages = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("sendThumbnailImages"))
                    {
                        appInfo.sendThumbnailImages = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("sendMosaicImages"))
                    {
                        appInfo.sendMosaicImages = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("mosaicImagesPerRow"))
                    {
                        appInfo.mosaicImagesPerRow = Convert.ToInt32(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("loadImagesToFtp"))
                    {
                        appInfo.loadImagesToFtp = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("baselineVal"))
                    {
                        appInfo.baselineVal = Convert.ToDouble(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("imageSaveInterval"))
                    {
                        appInfo.imageSaveInterval = Convert.ToDouble(configFile.ReadString());
                    }


                    if (configFile.LocalName.Equals("filenamePrefix"))
                    {
                        appInfo.filenamePrefix = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("cycleStampChecked"))
                    {
                        appInfo.cycleStampChecked = Convert.ToInt32(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("startCycle"))
                    {
                        appInfo.startCycle = Convert.ToInt64(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("endCycle"))
                    {
                        appInfo.endCycle = Convert.ToInt64(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("currentCycle"))
                    {
                        appInfo.currentCycle = Convert.ToInt64(configFile.ReadString());
                    }

                    if (configFile.LocalName.Equals("sentByName"))
                    {
                        appInfo.sentByName = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("emailNotifyInterval"))
                    {
                        appInfo.emailNotifyInterval = Convert.ToInt64(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("emailUser"))
                    {
                        appInfo.emailUser = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("emailPassword"))
                    {
                        appInfo.emailPass = decrypt(crypt, configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("smtpHost"))
                    {
                        appInfo.smtpHost = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("stmpPort"))
                    {
                        appInfo.smtpPort = Convert.ToInt32(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("ssl"))
                    {
                        appInfo.EnableSsl = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("sendTo"))
                    {
                        appInfo.sendTo = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("replyTo"))
                    {
                        appInfo.replyTo = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("sentBy"))
                    {
                        appInfo.sentBy = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("pingSubject"))
                    {
                        appInfo.pingSubject = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("mailSubject"))
                    {
                        appInfo.mailSubject = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("mailBody"))
                    {
                        appInfo.mailBody = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("ftpUser"))
                    {
                        appInfo.ftpUser = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("ftpPass"))
                    {
                        appInfo.ftpPass = decrypt(crypt, configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("ftpRoot"))
                    {
                        appInfo.ftpRoot = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("pubImage"))
                    {
                        appInfo.pubImage = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("pubFtpUser"))
                    {
                        appInfo.pubFtpUser = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("pubFtpPass"))
                    {
                        appInfo.pubFtpPass = decrypt(crypt, configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("pubFtpRoot"))
                    {
                        appInfo.pubFtpRoot = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("pubStamp"))
                    {
                        appInfo.pubStamp = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("pubStampDate"))
                    {
                        appInfo.pubStampDate = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("pubStampTime"))
                    {
                        appInfo.pubStampTime = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("pubStampDateTime"))
                    {
                        appInfo.pubStampDateTime = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("timerStartPub"))
                    {
                        appInfo.timerStartPub = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("timerEndPub"))
                    {
                        appInfo.timerEndPub = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("timerOnMov"))
                    {
                        appInfo.timerOnMov = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("scheduleOnAtStart"))
                    {
                        appInfo.scheduleOnAtStart = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("activateAtEveryStartup"))
                    {
                        appInfo.activateAtEveryStartup = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("timerStartMov"))
                    {
                        appInfo.timerStartMov = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("timerEndMov"))
                    {
                        appInfo.timerEndMov = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("webUpd"))
                    {
                        appInfo.webUpd = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("webUser"))
                    {
                        appInfo.webUser = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("webPass"))
                    {
                        appInfo.webPass = decrypt(crypt, configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("webFtpPass"))
                    {
                        appInfo.webFtpPass = decrypt(crypt, configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("webFtpUser"))
                    {
                        appInfo.webFtpUser = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("webPoll"))
                    {
                        appInfo.webPoll = Convert.ToInt32(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("webInstance"))
                    {
                        appInfo.webInstance = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("webImageRoot"))
                    {
                        appInfo.webImageRoot = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("webImageFileName"))
                    {
                        appInfo.webImageFileName = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("soundAlert"))
                    {
                        appInfo.soundAlert = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("soundAlertOn"))
                    {
                        appInfo.soundAlertOn = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("logsKeep"))
                    {
                        appInfo.logsKeep = Convert.ToInt32(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("logsKeepChk"))
                    {
                        appInfo.logsKeepChk = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("imageParentFolderCust"))
                    {
                        appInfo.imageParentFolderCust = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("imageFolderCust"))
                    {
                        appInfo.imageFolderCust = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("thumbFolderCust"))
                    {
                        appInfo.thumbFolderCust = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("imageLocCust"))
                    {
                        appInfo.imageLocCust = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("startTeboCamMinimized"))
                    {
                        appInfo.startTeboCamMinimized = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("internetCheck"))
                    {
                        appInfo.internetCheck = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("toolTips"))
                    {
                        appInfo.toolTips = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("alertCompression"))
                    {
                        appInfo.alertCompression = Convert.ToInt32(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("publishCompression"))
                    {
                        appInfo.publishCompression = Convert.ToInt32(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("pingCompression"))
                    {
                        appInfo.pingCompression = Convert.ToInt32(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("onlineCompression"))
                    {
                        appInfo.onlineCompression = Convert.ToInt32(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("alertTimeStamp"))
                    {
                        appInfo.alertTimeStamp = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("alertTimeStampFormat"))
                    {
                        appInfo.alertTimeStampFormat = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("alertStatsStamp"))
                    {
                        appInfo.alertStatsStamp = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("alertTimeStampColour"))
                    {
                        appInfo.alertTimeStampColour = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("alertTimeStampPosition"))
                    {
                        appInfo.alertTimeStampPosition = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("alertTimeStampRect"))
                    {
                        appInfo.alertTimeStampRect = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("publishTimeStamp"))
                    {
                        appInfo.publishTimeStamp = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("publishTimeStampFormat"))
                    {
                        appInfo.publishTimeStampFormat = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("publishStatsStamp"))
                    {
                        appInfo.publishStatsStamp = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("publishTimeStampColour"))
                    {
                        appInfo.publishTimeStampColour = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("publishTimeStampPosition"))
                    {
                        appInfo.publishTimeStampPosition = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("publishTimeStampRect"))
                    {
                        appInfo.publishTimeStampRect = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("pingTimeStamp"))
                    {
                        appInfo.pingTimeStamp = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("pingTimeStampFormat"))
                    {
                        appInfo.pingTimeStampFormat = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("pingStatsStamp"))
                    {
                        appInfo.pingStatsStamp = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("pingTimeStampColour"))
                    {
                        appInfo.pingTimeStampColour = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("pingTimeStampPosition"))
                    {
                        appInfo.pingTimeStampPosition = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("pingTimeStampRect"))
                    {
                        appInfo.pingTimeStampRect = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("onlineTimeStamp"))
                    {
                        appInfo.onlineTimeStamp = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("onlineTimeStampFormat"))
                    {
                        appInfo.onlineTimeStampFormat = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("onlineStatsStamp"))
                    {
                        appInfo.onlineStatsStamp = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("onlineTimeStampColour"))
                    {
                        appInfo.onlineTimeStampColour = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("onlineTimeStampPosition"))
                    {
                        appInfo.onlineTimeStampPosition = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("onlineTimeStampRect"))
                    {
                        appInfo.onlineTimeStampRect = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("imageToframe"))
                    {
                        appInfo.imageToframe = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("cameraShow"))
                    {
                        appInfo.cameraShow = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("motionLevel"))
                    {
                        appInfo.motionLevel = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("selectedCam"))
                    {
                        appInfo.selectedCam = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("pulseFreq"))
                    {
                        appInfo.pulseFreq = Convert.ToDecimal(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("EmailIntelOn"))
                    {
                        appInfo.EmailIntelOn = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("emailIntelEmails"))
                    {
                        appInfo.emailIntelEmails = Convert.ToInt32(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("emailIntelMins"))
                    {
                        appInfo.emailIntelMins = Convert.ToInt32(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("EmailIntelStop"))
                    {
                        appInfo.EmailIntelStop = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("disCommOnline"))
                    {
                        appInfo.disCommOnline = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("disCommOnlineSecs"))
                    {
                        appInfo.disCommOnlineSecs = Convert.ToInt32(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("StatsToFileOn"))
                    {
                        appInfo.StatsToFileOn = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("StatsToFileLocation"))
                    {
                        appInfo.StatsToFileLocation = configFile.ReadString();
                    }
                    if (configFile.LocalName.Equals("StatsToFileTimeStamp"))
                    {
                        appInfo.StatsToFileTimeStamp = Convert.ToBoolean(configFile.ReadString());
                    }
                    if (configFile.LocalName.Equals("StatsToFileMb"))
                    {
                        appInfo.StatsToFileMb = Convert.ToDouble(configFile.ReadString());
                    }
                }
            }
            catch (Exception e)
            {
                configFile.Close();
                MessageBox.Show(e.ToString());
                return(false);
            }
            configFile.Close();
            config.WriteXMLFile(bubble.xmlFolder + FileManager.configFile + ".xml", config);

            string moveToFileName = string.Format("configPre_3.2411_{0}.xml", DateTime.Now.ToString("yyyyMMddHHmmssfff"));

            File.Move(fileName, bubble.xmlFolder + moveToFileName);
            File.Delete(bubble.xmlFolder + "config.bak");
            return(true);
        }