Пример #1
0
 public void InitializeConfiguration(ConfigurationContent configContent)
 {
   if(configContent == null)
   {
     throw new NullParameterException("Configuration content is null!");
   }
   _configContent = configContent;
   BuildConfigurationItems();
 }
Пример #2
0
        public static void LoadFromConfig(ConfigurationContent configContent)
        {
            if (configContent == null)
            {
                throw new NullParameterException("Configuration content parameter is null!");
            }

            foreach (ScriptEditorActions action in configContent.ScriptEditorShortcuts.Keys)
            {
                SetShortCut(action, configContent.ScriptEditorShortcuts[action]);
            }
        }
Пример #3
0
		public static void ShowConfigurationDlg(ConfigurationContent configContent, string initialEditor, ConfigFinalSelectionEventHandler onFinalSelectionHandler)
		{
			if (configContent == null)
			{
				throw new NullParameterException("Configuration content is null!");
			}

			if (_instance == null)
				_instance = new frmConfigurationDlg();

			_instance.FinalSelection += onFinalSelectionHandler;
			_instance.InitializeConfiguration(configContent);
			ConficSvc.FireDialogOpenedEvent();
			_instance.Show();
			_instance.ShowOptionsEditor(initialEditor);
		}
Пример #4
0
        public bool LoadContent(ConfigurationContent configContent)
        {
            if (configContent == null)
            {
                throw new NullParameterException("Configuration content param is null!");
            }

            if (configContent.ScriptEditorShortcuts == null)
            {
                throw new NullPropertyException("Configuration content does not contain ScriptEditorShortcuts item!");
            }

            _configContent         = configContent;
            _scriptEditorShortcuts = _configContent.ScriptEditorShortcuts;
            LoadInitial();
            _isContentLoaded = true;
            return(true);
        }
Пример #5
0
        public static ConfigurationContent LoadConfigurationFrom(string fileName)
        {
            ConfigurationContent result = null;

            if (!File.Exists(fileName))
            {
                _current = new ConfigurationContent();
                return(_current);
            }

            result = ObjectXMLSerializer <ConfigurationContent> .Load(fileName);

            if (result == null)
            {
                result = new ConfigurationContent();
            }
            _current = result;
            return(result);
        }
Пример #6
0
        public bool LoadContent(ConfigurationContent configContent)
        {
            if (configContent == null)
            {
                throw new NullParameterException("Configuration content param is null!");
            }

            if (configContent.SystemFileAssociationOptions == null)
            {
                throw new NullPropertyException("Configuration content does not contain SystemFileAssociationOptions item!");
            }

            _configContent = configContent;
            _options       = _configContent.SystemFileAssociationOptions;


            LoadInitial();

            _isContentLoaded = true;
            return(true);
        }
Пример #7
0
        public bool LoadContent(ConfigurationContent configContent)
        {
            if (configContent == null)
            {
                throw new NullParameterException("Configuration content param is null!");
            }

            if (configContent.PragmaSqlDbConn == null)
            {
                throw new NullPropertyException("Configuration content does not contain PragmaSqlDbConn item!");
            }

            _configContent = configContent;
            _connParams    = _configContent.PragmaSqlDbConn;


            LoadInitial();

            _isContentLoaded = true;
            return(true);
        }
Пример #8
0
        public bool LoadContent(ConfigurationContent configContent)
        {
            if (configContent == null)
            {
                throw new NullParameterException("Configuration content param is null!");
            }

            if (configContent.SharedScriptsOptions == null)
            {
                throw new NullPropertyException("Configuration content does not contain SharedScriptsOptions item!");
            }

            _configContent = configContent;
            _helpSettings  = _configContent.HelpSettings;


            LoadInitial();

            _isContentLoaded = true;
            return(true);
        }
Пример #9
0
        public bool LoadContent(ConfigurationContent content)
        {
            if (content == null)
            {
                throw new NullParameterException("Configuration content param is null!");
            }

            if (content.WebSearchOptions == null)
            {
                throw new NullPropertyException("Configuration content does not contain WebSearchOptions item!");
            }

            _isInitializing = true;
            _sourceSites    = content.WebSearchOptions;
            _sites.Clear();
            foreach (WebSearchSite site in _sourceSites)
            {
                _sites.Add(site.Copy());
            }
            _bs.DataSource  = _sites;
            grd.DataSource  = _bs;
            _isInitializing = false;
            return(true);
        }
Пример #10
0
 public bool LoadContent(ConfigurationContent configContent)
 {
     throw new Exception("Use \"public bool Load()\" insetead of \"public bool LoadContent( ConfigurationContent configContent )\" ");
 }
Пример #11
0
 public static void SaveConfigurationAs(ConfigurationContent configContent, string fileName)
 {
     ObjectXMLSerializer <ConfigurationContent> .Save(configContent, fileName);
 }
Пример #12
0
 public static void SaveAsDefault(ConfigurationContent configContent)
 {
     SaveConfigurationAs(configContent, defaultFileName);
 }
Пример #13
0
		public static void ShowConfigurationDlg(ConfigurationContent configContent,ConfigFinalSelectionEventHandler onFinalSelectionHandler )
    {
			ShowConfigurationDlg(configContent, String.Empty, onFinalSelectionHandler);
    }
Пример #14
0
		public static void ShowConfigurationDlg(ConfigurationContent configContent, OptionEditorType editorType , ConfigFinalSelectionEventHandler onFinalSelectionHandler)
		{
			ShowConfigurationDlg(configContent, editorType == OptionEditorType.None ? String.Empty : editorType.ToString() , onFinalSelectionHandler);
		}