예제 #1
0
        public void SaveAutomationOptionsInfo(AutomationOptionsInfo info)
        {
            _automation_options_info = info;
            string category = "automation";

            INIManipulator.WriteValue(_config_file, category, "monitoringEnabled", info.IsMonitoringEnabled.ToString());
            INIManipulator.WriteValue(_config_file, category, "stopMonitoringOnBattery", info.StopAutoUpdateOnBattery.ToString());
        }
예제 #2
0
        public void SaveSystemOptionsInfo(SystemOptionsInfo info)
        {
            _system_options_info = info;
            string category = "system";

            INIManipulator.WriteValue(_config_file, category, "updateTime", info.UpdateTime.ToString());
            INIManipulator.WriteValue(_config_file, category, "stopAutoUpdateOnBattery", info.StopAutoUpdateOnBattery.ToString());
            INIManipulator.WriteValue(_config_file, category, "autoUpdate", info.AutoUpdates.ToString());
        }
예제 #3
0
        public void SaveInterfaceInfo(InterfaceInfo info)
        {
            _interface_info = info;
            string category = "interface";

            INIManipulator.WriteValue(_config_file, category, "suggestions", info.NumberOfSuggestions.ToString());
            INIManipulator.WriteValue(_config_file, category, "location_x", info.WindowLocation.X.ToString());
            INIManipulator.WriteValue(_config_file, category, "location_y", info.WindowLocation.Y.ToString());
        }
예제 #4
0
        public void SaveLoadablePlugins(PluginInfo info)
        {
            _plugin_info = info;
            string category = "plugins";

            INIManipulator.DeleteCategory(_config_file, category);
            foreach (string plugin in info.Names)
            {
                INIManipulator.WriteValue(_config_file, category, plugin, info.Enabled[plugin].ToString());
            }
        }
예제 #5
0
        public void SaveAssistantHotKey(HotKey key)
        {
            _ahotkey = null;
            _ahotkey = key;
            string category           = "interaction";
            string hotkeyAssistantkey = "hotkeyAssistantkey";

            INIManipulator.WriteValue(_config_file, category, hotkeyAssistantkey, key.Key.ToString());
            category           = null;
            hotkeyAssistantkey = null;
        }
예제 #6
0
        public void SaveSettings()
        {
            string category = Name;
            int    len      = _prompt_command_names.Count;

            INIManipulator.DeleteCategory(CommonInfo.ConfigFile, category);
            for (int i = 0; i < len; i++)
            {
                int pos = i + 1;
                INIManipulator.WriteValue(CommonInfo.ConfigFile, category, pos.ToString() + "\\name", _pompt_commands[i].Name);
                INIManipulator.WriteValue(CommonInfo.ConfigFile, category, pos.ToString() + "\\path", _pompt_commands[i].Path);
                INIManipulator.WriteValue(CommonInfo.ConfigFile, category, pos.ToString() + "\\arguments", _pompt_commands[i].Arguments);
            }
        }
예제 #7
0
        public void SaveMainHotKey(HotKey key)
        {
            _hotkey = null;
            _hotkey = key;
            string category            = "interaction";
            string hotkeyMainkey       = "hotkeyMainkey";
            string hotkeyModifierAlt   = "hotkeyModifierAlt";
            string hotkeyModifierCtrl  = "hotkeyModifierCtrl";
            string hotkeyModifierShift = "hotkeyModifierShift";
            string hotkeyModifierWin   = "hotkeyModifierWin";

            INIManipulator.WriteValue(_config_file, category, hotkeyMainkey, key.Key.ToString());
            INIManipulator.WriteValue(_config_file, category, hotkeyModifierAlt, key.IsAlt.ToString());
            INIManipulator.WriteValue(_config_file, category, hotkeyModifierCtrl, key.IsCtrl.ToString());
            INIManipulator.WriteValue(_config_file, category, hotkeyModifierShift, key.IsShift.ToString());
            INIManipulator.WriteValue(_config_file, category, hotkeyModifierWin, key.IsWin.ToString());
            category            = null;
            hotkeyMainkey       = null;
            hotkeyModifierAlt   = null;
            hotkeyModifierCtrl  = null;
            hotkeyModifierShift = null;
            hotkeyModifierWin   = null;
        }
예제 #8
0
        public void SaveDirectories(DirInfo dirs)
        {
            _directories = null;
            _directories = dirs;
            List <string> directories = dirs.Directories;
            Dictionary <string, List <string> > extensions          = dirs.Extensions;
            Dictionary <string, bool>           includeDirectories  = dirs.IncludeDirectories;
            Dictionary <string, bool>           indexSubdirectories = dirs.IndexSubdirectories;
            Dictionary <string, List <string> > dirPlugins          = dirs.Plugins;
            string category = "indexer";
            int    len      = directories.Count;

            INIManipulator.DeleteCategory(_config_file, category);
            for (int i = 0; i < len; i++)
            {
                string dir = directories[i];
                int    pos = i + 1;
                INIManipulator.WriteValue(_config_file, category, pos.ToString() + "\\name", dir);
                INIManipulator.WriteValue(_config_file, category, pos.ToString() + "\\extensions", ArrayToStr(extensions[dir].ToArray()));
                INIManipulator.WriteValue(_config_file, category, pos.ToString() + "\\includeDirectories", includeDirectories[dir].ToString());
                INIManipulator.WriteValue(_config_file, category, pos.ToString() + "\\indexSubdirectories", indexSubdirectories[dir].ToString());
                INIManipulator.WriteValue(_config_file, category, pos.ToString() + "\\plugins", ArrayToStr(dirPlugins[dir].ToArray()));
            }
        }