Exemple #1
0
        /// <summary>
        /// Updates all dir lists from combobox list
        /// Из элемента формы обновляются данные в XML и в переменных
        /// </summary>
        private void IQP_SaveDirList()
        {
            //1. Empty current lists
            //Monitoring list
            IQP_FileMonitorPath.Clear();
            //Config
            ConfigManagement.ClearSection("monitorPath"); //clear entire section

            //2. Make new lists
            for (int i = 0; i < cmbIQPMonitorPath.Items.Count; i++)
            {
                string curDir = cmbIQPMonitorPath.GetItemText(cmbIQPMonitorPath.Items[i]);

                //Add to monitor list
                IQP_FileMonitorPath.Add(curDir);
                //Add to config list
                ConfigManagement.UpdateConfigValue("monitorPath", "Dir" + (i + 1), curDir);
            }

            //3. Save config
            ConfigManagement.Save();

            //4. Обновить инфо о количестве подакаталогов
            lblDirsMonitoringCount.Text = cmbIQPMonitorPath.Items.Count.ToString();
        }
Exemple #2
0
        private void IQP_SaveSettingsToConfigFile()
        {
            //1. Update ConfigXML

            //Save dirlist
            ConfigManagement.ClearSection("monitorPath"); //clear entire section
            for (int i = 0; i < cmbIQPMonitorPath.Items.Count; i++)
            {
                string curDir = cmbIQPMonitorPath.GetItemText(cmbIQPMonitorPath.Items[i]);
                ConfigManagement.UpdateConfigValue("monitorPath", "Dir" + (i + 1), curDir);
            }

            ConfigManagement.UpdateConfigValue("IQP_options", "ScanSubDirs", chkSearchSubdirs.Checked.ToString());
            //ConfigManagement.UpdateConfigValue("IQP_options", "AUTOSTARTMONITORING", chkSettings_Autostart.Checked.ToString());
            //ConfigManagement.UpdateConfigValue("IQP_options", "DSS_PATH", txtSettings_DSS.Text);
            //ConfigManagement.UpdateConfigValue("IQP_options", "Language", cmbLang.SelectedValue.ToString());

            //ConfigManagement.UpdateConfigValue("IQP_options", "PUBLISHTOGROUP", chkSettings_publishgroup.Checked.ToString());
            //ConfigManagement.UpdateConfigValue("publishURL", "url1", txtSettings_urlgorup.Text);
            //ConfigManagement.UpdateConfigValue("publishURL", "key1", txtServerKey_Group.Text);

            //ConfigManagement.UpdateConfigValue("IQP_options", "PUBLISHTOPRIVATE", chkSettings_publishprivate.Checked.ToString());
            //ConfigManagement.UpdateConfigValue("publishURL", "url2", txtSettings_urlprivate.Text);
            //ConfigManagement.UpdateConfigValue("publishURL", "key2", txtServerKey_Private.Text);

            //hidden settings
            ConfigManagement.UpdateConfigValue("IQP_options", "extensionsToSearch", ObsControl.objIQPEngine.MonitorObj.settingsExtensionToSearch);
            ConfigManagement.UpdateConfigValue("IQP_options", "checkThreads_max", ObsControl.objIQPEngine.ProcessingObj.settingsMaxThreads.ToString());
            ConfigManagement.UpdateConfigValue("IQP_options", "checkDirIMS", ObsControl.objIQPEngine.ProcessingObj.settingsSkipIMSfiles.ToString());
            ConfigManagement.UpdateConfigValue("IQP_options", "alwaysRebuildDSSInfoFile", ObsControl.objIQPEngine.ProcessingObj.settingsDSSForceRecheck.ToString());
            ConfigManagement.UpdateConfigValue("IQP_options", "RunDSSHidden", ObsControl.objIQPEngine.ProcessingObj.settingsDSSForceRunHidden.ToString());
            ConfigManagement.UpdateConfigValue("IQP_options", "autoDeleteDSSInfoFile", ObsControl.objIQPEngine.ProcessingObj.settingsDSSInfoFileAutoDelete.ToString());
            ConfigManagement.UpdateConfigValue("IQP_options", "publishLightFramesOnly", ObsControl.objIQPEngine.ProcessingObj.settingsPublishLightFramesOnly.ToString());

            //Filter settings
            ConfigManagement.UpdateConfigValue("IQP_filters", "excludedirs", String.Join(";", ObsControl.objIQPEngine.MonitorObj.settingsFilterDirName_ExcludeSt.ToArray()));
            ConfigManagement.UpdateConfigValue("IQP_filters", "excludefiles", string.Join(";", ObsControl.objIQPEngine.MonitorObj.settingsFilterFileName_ExcludeSt.ToArray()));
            ConfigManagement.UpdateConfigValue("IQP_filters", "observer", ObsControl.objIQPEngine.ProcessingObj.settingsFilterObserverTag_Contains);
            ConfigManagement.UpdateConfigValue("IQP_filters", "telescop", ObsControl.objIQPEngine.ProcessingObj.settingsFilterTelescopTag_Contains);
            ConfigManagement.UpdateConfigValue("IQP_filters", "instrume", ObsControl.objIQPEngine.ProcessingObj.settingsFilterInstrumeTag_Contains);
            ConfigManagement.UpdateConfigValue("IQP_filters", "historycount", ObsControl.objIQPEngine.ProcessingObj.settingsFilterHistoryTag_MaxCount.ToString());
            ConfigManagement.UpdateConfigValue("IQP_filters", "minstars", ObsControl.objIQPEngine.ProcessingObj.settingsFilterStarsNum_MinCount.ToString());
            ConfigManagement.UpdateConfigValue("IQP_filters", "maxfwhm", ObsControl.objIQPEngine.ProcessingObj.settingsFilterFWHM_MaxVal.ToString());
            ConfigManagement.UpdateConfigValue("IQP_filters", "minaltitude", ObsControl.objIQPEngine.ProcessingObj.settingsFilterMinAltitude_MinVal.ToString());
            ConfigManagement.UpdateConfigValue("IQP_filters", "maxbackground", ObsControl.objIQPEngine.ProcessingObj.settingsFilterBackground_MaxVal.ToString());
        }