public CodeSoftLabel(LabelType labelType, Dictionary <string, string> variables) { InitializeComponent(); try { _labelType = labelType; Initiate(variables); lblTitle.Text = labelType.Title; } catch { // ignored } }
public void UpdateLabelType(LabelType data) { XElement label = (from xml2 in _xDocument.Descendants("Label") where xml2.Attribute("Name")?.Value == data.Name select xml2).FirstOrDefault(); if (label != null) { label.Element("Location").Value = data.TemplateFile; label.Element("LeftOffset").Value = data.LeftOffset.ToString(); label.Element("TopOffset").Value = data.TopOffset.ToString(); label.Element("Printer").Value = data.Printer; } }