private void btnEditAsXml_Click(object sender, EventArgs e)
        {
            string          xml  = _comp.ToXml();
            XmlEditorDialog diag = new XmlEditorDialog();

            diag.OnlyValidateWellFormedness = true;
            diag.XmlContent = xml;
            if (diag.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                _comp.UpdateFromXml(diag.XmlContent);
                RefreshPreviews(true, false);
                lstInstances.Clear();
                imgPreviews.Images.Clear();
                foreach (var sym in _comp.SymbolInstance)
                {
                    AddInstance(sym, false);
                }
            }
        }