Example #1
0
        public static void Execute()
        {
            PresetSystem system = new PresetSystem("Test", typeof(Power));

            system.UserPath = "C:\\temp";

            system.LoadPresets();

            /*
             * if (system.AddPreset(new Power("First", PresetTypes.User)) == null)
             * {
             *  Console.WriteLine("Preset is null");
             * }
             */

            string text = "Nothing";

            while (text != "" && text != "Exit")
            {
                text = Console.ReadLine();
                ParseCommand(text, system);
            }

            system.SavePresets();

            /*
             * Console.WriteLine(system.GetPresetValue("First.Value").ToString());
             *
             * system.SetPresetValue("First.Value", 2);
             *
             * Console.WriteLine(system.GetPresetValue("First.Value").ToString());
             *
             * Console.WriteLine(system.GetPresetValue("Second.Value").ToString());
             *
             * Console.WriteLine(system.GetPresetValue("First.Value2").ToString());
             */
        }