protected override void OnLoad(EventArgs e) { base.OnLoad(e); var validate = Props.Get(ConfigProperties.ValidateOnSave, ConfigProperties.DefaultValidateOnSave); chkValidateOnSave.Checked = validate; var useLocal = Props.Get(ConfigProperties.UseLocalPreview, ConfigProperties.DefaultUseLocalPreview); chkUseLocalPreview.Checked = useLocal; var addWmd = Props.Get(ConfigProperties.AddDebugWatermark, ConfigProperties.DefaultAddDebugWatermark); chkAddDebugWatermark.Checked = addWmd; var path = Props.Get(ConfigProperties.XsdSchemaPath, ConfigProperties.DefaultXsdSchemaPath); txtXsdPath.Text = path; var useGrid = Props.Get(ConfigProperties.UseGridStyleEditor, ConfigProperties.DefaultUseGridStyleEditor); chkUseGridBasedStyleEditor.Checked = useGrid; txtPreviewLocale.Text = Props.Get(ConfigProperties.PreviewLocale, ConfigProperties.DefaultPreviewLocale); txtReactBaseUrl.Text = Props.Get(ConfigProperties.ReactLayoutBaseUrl, ConfigProperties.DefaultReactLayoutBaseUrl); }
private bool Apply <T>(string key, T newValue) { if (Props.Get(key).Equals((object)newValue)) { return(false); } Props.Set(key, newValue); return(true); }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); var bShow = Props.Get(ScriptingConfigProperties.ShowIronPythonConsole, ScriptingConfigProperties.DefaultShowIronPythonConsole); chkShowOnStartup.Checked = bShow; txtModulePaths.Text = Props.Get(ScriptingConfigProperties.IronPythonModulePath, ScriptingConfigProperties.DefaultIronPythonModulePath); }
private bool Apply <T>(string key, T newValue) { //2nd condition is for booleans if (Props.Get(key).Equals((object)newValue) || Props.Get(key).ToString().Equals(newValue.ToString())) { return(false); } Props.Set(key, newValue); return(true); }
public void ApplyDefaults() { Props.Set(ScriptingConfigProperties.ShowIronPythonConsole, ScriptingConfigProperties.DefaultShowIronPythonConsole); Props.Set(ScriptingConfigProperties.IronPythonModulePath, ScriptingConfigProperties.DefaultIronPythonModulePath); }