private void ApplyStyleByName(ReportComponentBase component, string styleName) { foreach (Style subStyle in Report.Styles) { if (subStyle.Name == styleName) { Font f = new Font("Arial", 10, FontStyle.Regular); if (component is TextObject) { f = (component as TextObject).Font; } component.Style = styleName; component.ApplyStyle(subStyle); string descr = GetObjectDescription(component.Name); string useFont = GetPropertyValue("UseFont", descr); if (useFont != string.Empty) { if (!UnitsConverter.ConvertBool(useFont)) { (component as TextObject).Font = f; } } return; } } }
private void LoadCheckBox(XmlNode node, Base parent) { CheckBoxObject checkBox = ComponentsFactory.CreateCheckBoxObject(node.Name, parent); AddLocalizationItemsAttributes(node); LoadComponent(node, checkBox); LoadSize(node, checkBox); LoadBorder(node, checkBox.Border); checkBox.Checked = UnitsConverter.ConvertBool(GetAttribute(node, "Checked")); }