internal void CopyPropToDockForm(DockForm form)
 {
     form.AllowDock       = this.allowDock;
     form.FormBorderStyle = base.FormBorderStyle;
     form.Icon            = base.Icon;
     form.Text            = this.Text;
 }
Beispiel #2
0
 internal static void UnRegisterForm(DockForm form)
 {
     if (formList.Contains(form))
     {
         formList.Remove(form);
     }
 }
Beispiel #3
0
        public static void ReadXml(string file)
        {
            XmlTextReader reader = null;

            try
            {
                reader = new XmlTextReader(file)
                {
                    WhitespaceHandling = WhitespaceHandling.None
                };
                while (reader.Read())
                {
                    string str;
                    if (!reader.IsStartElement())
                    {
                        continue;
                    }
                    string name = reader.Name;
                    if (name != null)
                    {
                        if (!(name == "form"))
                        {
                            if (name == "manager")
                            {
                                goto Label_0099;
                            }
                        }
                        else
                        {
                            DockForm form = new DockForm {
                                Opacity = 0.0
                            };
                            form.Show();
                            form.ReadXml(reader.ReadSubtree());
                            form.Opacity = 1.0;
                        }
                    }
                    continue;
Label_0099:
                    str = reader.GetAttribute("parent");
                    if (str != null)
                    {
                        foreach (DockManager manager in managerList)
                        {
                            if (manager.Parent.GetType().FullName == str)
                            {
                                manager.ReadXml(reader.ReadSubtree(), true);
                            }
                        }
                    }
                }
            }
            finally
            {
                if (reader != null)
                {
                    reader.Close();
                }
            }
        }
Beispiel #4
0
 internal static void FormActivated(DockForm form)
 {
     if (formList.Contains(form))
     {
         formList.Remove(form);
         formList.Insert(0, form);
     }
 }
 internal void CopyToDockForm(DockForm form)
 {
     form.Location = base.Location;
     form.Size     = base.Size;
     form.RootContainer.Controls.Add(this.controlContainer);
     form.RootContainer.DockType = this.DockType;
     this.CopyPropToDockForm(form);
 }
        private void LoadDockForm()
        {
            DockForm form = new DockForm();

            this.CopyToDockForm(form);
            if (this.showFormAtOnLoad)
            {
                form.Show();
            }
        }
Beispiel #7
0
 internal static void RegisterForm(DockForm form)
 {
     if (!formList.Contains(form))
     {
         if (form == null)
         {
             throw new ArgumentNullException("The form must not be null.");
         }
         form.Disposed += new EventHandler(DockManager.ObjectDisposed);
         formList.Add(form);
     }
 }
Beispiel #8
0
 internal static DockForm GetFormAtPoint(Point pt, int startIndex)
 {
     for (int i = startIndex; i < formList.Count; i++)
     {
         DockForm form = formList[i] as DockForm;
         if (form.Bounds.Contains(pt) & form.Visible)
         {
             return(form);
         }
     }
     return(null);
 }
Beispiel #9
0
 internal static int GetZIndex(DockForm form)
 {
     return(formList.IndexOf(form));
 }