Example #1
0
        private void Init(System.Configuration.Configuration config)
        {
            HotkeysSection hotkeys;
            if (config.GetSection("Hotkeys") == null)
            {
                hotkeys = new HotkeysSection();
                hotkeys.SectionInformation.ForceSave = true;
                config.Sections.Add("Hotkeys", hotkeys);
            }
            else
            {

                hotkeys = config.Sections["Hotkeys"] as HotkeysSection;
            }

            if (hotkeys.Select.Key == "")
            {
                hotkeys.Select = new HotkeyElement("R", "Alt+Shift");
            }

            StoragesSection storages;
            if (config.GetSection("Storages") == null)
            {
                storages = new StoragesSection();
                storages.SectionInformation.ForceSave = true;
                config.Sections.Add("Storages", storages);
            }
        }
Example #2
0
        private void Init(System.Configuration.Configuration config)
        {
            HotkeysSection hotkeys;

            if (config.GetSection("Hotkeys") == null)
            {
                hotkeys = new HotkeysSection();
                hotkeys.SectionInformation.ForceSave = true;
                config.Sections.Add("Hotkeys", hotkeys);
            }
            else
            {
                hotkeys = config.Sections["Hotkeys"] as HotkeysSection;
            }

            if (hotkeys.Select.Key == "")
            {
                hotkeys.Select = new HotkeyElement("R", "Alt+Shift");
            }

            StoragesSection storages;

            if (config.GetSection("Storages") == null)
            {
                storages = new StoragesSection();
                storages.SectionInformation.ForceSave = true;
                config.Sections.Add("Storages", storages);
            }
        }