protected override void OnSave() { EditorXmlDocument editorXmlDocument = new EditorXmlDocument(); editorXmlDocument.Settings.DisplayLineNumbers.Value = this.DisplayLineNumbers; editorXmlDocument.Settings.AllowOutlining.Value = this.AllowOutlining; editorXmlDocument.Settings.AutoSave.Enabled = this.AutoSaveEnabled; editorXmlDocument.Settings.AutoSave.Interval = this.AutoSaveInterval; ((XmlDocument) editorXmlDocument).Save(this.configFile.FullName); }
protected override void OnSave() { EditorXmlDocument editorXmlDocument = new EditorXmlDocument(); editorXmlDocument.Settings.DisplayLineNumbers.Value = this.DisplayLineNumbers; editorXmlDocument.Settings.AllowOutlining.Value = this.AllowOutlining; editorXmlDocument.Settings.AutoSave.Enabled = this.AutoSaveEnabled; editorXmlDocument.Settings.AutoSave.Interval = this.AutoSaveInterval; ((XmlDocument)editorXmlDocument).Save(this.configFile.FullName); }
protected override void OnLoad() { if (this.configFile.Exists) { EditorXmlDocument editorXmlDocument = new EditorXmlDocument(); ((XmlDocument)editorXmlDocument).Load(this.configFile.FullName); this.DisplayLineNumbers = editorXmlDocument.Settings.DisplayLineNumbers.Value; this.AllowOutlining = editorXmlDocument.Settings.AllowOutlining.Value; this.AutoSaveEnabled = editorXmlDocument.Settings.AutoSave.Enabled; this.AutoSaveInterval = editorXmlDocument.Settings.AutoSave.Interval; } else { this.DisplayLineNumbers = false; this.AllowOutlining = true; this.AutoSaveEnabled = false; this.AutoSaveInterval = TimeSpan.FromMinutes(1.0); } }
protected override void OnLoad() { if (this.configFile.Exists) { EditorXmlDocument editorXmlDocument = new EditorXmlDocument(); ((XmlDocument) editorXmlDocument).Load(this.configFile.FullName); this.DisplayLineNumbers = editorXmlDocument.Settings.DisplayLineNumbers.Value; this.AllowOutlining = editorXmlDocument.Settings.AllowOutlining.Value; this.AutoSaveEnabled = editorXmlDocument.Settings.AutoSave.Enabled; this.AutoSaveInterval = editorXmlDocument.Settings.AutoSave.Interval; } else { this.DisplayLineNumbers = false; this.AllowOutlining = true; this.AutoSaveEnabled = false; this.AutoSaveInterval = TimeSpan.FromMinutes(1.0); } }