public void OnFocus() { ConfigToolContext.Instance.ToolForm.SetControlState(false); if (wbXml != null) { wbXml.Dispose(); Controls.Clear(); } wbXml = new WebBrowserEx(); wbXml.Dock = DockStyle.Fill; Controls.Add(wbXml); var root = ConfigToolContext.Instance.ToolDrawArea.Root as FrameProperty; var page = ConfigToolContext.Instance.ToolDrawArea.Schema; var doc = PageTransToXml.Instance.ToXml(page, root); wbXml.DocumentXml = doc; }
private void ShowXml(String xml) { if (!String.IsNullOrEmpty(xml)) { wbXml = new WebBrowserEx(); wbXml.Dock = DockStyle.Fill; tabPage2.Controls.Add(wbXml); var doc = new XmlDocument(); doc.LoadXml(xml); wbXml.DocumentXml = doc; } }