Ejemplo n.º 1
0
        internal AppSettings(string[] args, JRunUI.Properties.Settings defaults )
        {
            LoadFromAppSettings(defaults);

            defaults.SettingsSaving += new System.Configuration.SettingsSavingEventHandler(defaults_SettingsSaving);

            var options = new NDesk.Options.OptionSet() {
                    { "f=|file=", "File to load shortcuts from. Default is 'Shortcuts.xml'.", s => XmlFile = s },
                    { "p=|profile'", "Profile to execute the shortcut in. Default is the first profile.", s => ProfileName = s },
                    { "s=|selector=", "Program to execute to determine which profile to use.", s => ProfileSelector = s },
                    { "r|reset", "Reset application settings to default", s => bResetAppSettings = s != null },
                    { "log", "output debug information to a log file", s => bLog = s != null },
                };

            options.Parse(args);
        }
Ejemplo n.º 2
0
 void LoadFromAppSettings(JRunUI.Properties.Settings defaults)
 {
     XmlFile = defaults.XmlFile;
     ProfileName = defaults.ProfileName;
     ProfileSelector = defaults.ProfileSelector;
 }