public NotificationForm(Settings settings) { InitializeComponent(); this.settings = settings; this.labelCharname.Font = new Font(this.labelCharname.Font.FontFamily, settings.NotificationFontSize); this.labelText.Font = new Font(this.labelCharname.Font.FontFamily, settings.NotificationFontSize); this.Opacity = Convert.ToDouble(settings.NotificationOpacity) / 100.0; this.Show(); this.Visible = false; }
public static void toXML(Settings settings, string path) { DataContractSerializer ser = new DataContractSerializer(typeof(Settings)); using (var w = XmlWriter.Create(path, new XmlWriterSettings { Indent = true })) ser.WriteObject(w, settings); }