/// <summary> /// Releases the unmanaged resources that are used by the /// <see cref="T:BarcodeXmlDesigner" /> control and optionally releases /// the managed resources. /// </summary> /// <param name="disposing"> /// true to release both managed and unmanaged resources; /// false to release only unmanaged resources. /// </param> protected override void Dispose(bool disposing) { if (disposing) { _xml = null; } base.Dispose(disposing); }
/// <summary> /// Initializes the designer with the control that this instance of /// the designer is associated with. /// </summary> /// <param name="component">The associated control. </param> public override void Initialize(IComponent component) { if (!typeof(BarcodeXml).IsInstanceOfType(component)) { throw new ArgumentException("Component is not instance of BarcodeXml."); } _xml = (BarcodeXml)component; base.Initialize(component); }
public override string GetPersistInnerHtml() { BarcodeXml xml = (BarcodeXml)base.Component; string text = (string)((IControlDesignerAccessor)xml).GetDesignModeState()["OriginalContent"]; if (text != null) { return(text); } return(xml.DocumentContent); }