/// <summary> /// Reads the complete hierarchy from a file. /// </summary> /// <param name="file">The source XML file.</param> public static void ReadXml(string file) { XmlTextReader reader = null; try { // Load the reader with the data file and ignore all white space nodes. reader = new XmlTextReader(file); reader.WhitespaceHandling = WhitespaceHandling.None; // Parse the file and display each of the nodes. while (reader.Read()) { if (!reader.IsStartElement()) { continue; } switch (reader.Name) { case "form": Console.WriteLine("form"); DockForm form = new DockForm(); form.Opacity = 0; form.Show(); form.ReadXml(reader.ReadSubtree()); //if (!form.RootContainer.IsEmpty) form.Opacity = 1; //else // form.Close(); break; case "manager": Console.WriteLine("manager"); string hostType = reader.GetAttribute("parent"); if (hostType != null) { foreach (DockManager m in managerList) { if (m.Parent.GetType().FullName == hostType) { m.ReadXml(reader.ReadSubtree()); } } } break; } } } finally { if (reader != null) { reader.Close(); } } }
private void LoadDockForm() { DockForm form = new DockForm(); CopyToDockForm(form); if (showFormAtOnLoad) { form.Show(); } }
private void FloatWindow() { Rectangle rc = RectangleToScreen(this.ClientRectangle); DockForm form = new DockForm(dragObject); form.Show(); form.Location = new Point(MousePosition.X, MousePosition.Y); if (!DockManager.FastMoveDraw) form.Opacity = 1; form.StartMoving(new Point(MousePosition.X + 10, MousePosition.Y + 10)); dragObject = null; if ((panList.Count == 0) & (dockType == DockContainerType.Document) & (removeable) & (this.Parent is DockContainer)) (this.Parent as DockContainer).Controls.Remove(this); }
private void LoadDockForm() { DockForm form = new DockForm(); CopyToDockForm(form); if (showFormAtOnLoad) form.Show(); }
/// <summary> /// Reads the complete hierarchy from a file. /// </summary> /// <param name="file">The source XML file.</param> public static void ReadXml(string file) { XmlTextReader reader = null; try { // Load the reader with the data file and ignore all white space nodes. reader = new XmlTextReader(file); reader.WhitespaceHandling = WhitespaceHandling.None; // Parse the file and display each of the nodes. while (reader.Read()) { if (!reader.IsStartElement()) continue; switch (reader.Name) { case "form": Console.WriteLine("form"); DockForm form = new DockForm(); form.Opacity = 0; form.Show(); form.ReadXml(reader.ReadSubtree()); //if (!form.RootContainer.IsEmpty) form.Opacity = 1; //else // form.Close(); break; case "manager": Console.WriteLine("manager"); string hostType = reader.GetAttribute("parent"); if (hostType != null) { foreach (DockManager m in managerList) if (m.Parent.GetType().FullName == hostType) m.ReadXml(reader.ReadSubtree()); } break; } } } finally { if (reader != null) reader.Close(); } }