private void LoadSettings() { XmlSerializer xmlSerializer = new XmlSerializer(typeof(SQLFormatterOptions)); using (var memStream = new MemoryStream(Encoding.UTF8.GetBytes(Properties.Settings.Default.SQLFormatterOptions))) { try { _Options = (SQLFormatterOptions)xmlSerializer.Deserialize(memStream); _Options.SetCallbacks(this.SaveSettings, this.LoadSettings); } catch { } } }
public SQLFormatterPlugin() { _Options = new SQLFormatterOptions(this.SaveSettings, this.LoadSettings); LoadSettings(); }