Exemplo n.º 1
0
 internal void CopyPropToDockForm(DockForm form)
 {
     form.AllowDock       = this.allowDock;
     form.FormBorderStyle = base.FormBorderStyle;
     form.Icon            = base.Icon;
     form.Text            = this.Text;
 }
Exemplo n.º 2
0
 internal static void UnRegisterForm(DockForm form)
 {
     if (formList.Contains(form))
     {
         formList.Remove(form);
     }
 }
Exemplo n.º 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();
                }
            }
        }
Exemplo n.º 4
0
 internal static void FormActivated(DockForm form)
 {
     if (formList.Contains(form))
     {
         formList.Remove(form);
         formList.Insert(0, form);
     }
 }
Exemplo n.º 5
0
 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);
 }
Exemplo n.º 6
0
        private void LoadDockForm()
        {
            DockForm form = new DockForm();

            this.CopyToDockForm(form);
            if (this.showFormAtOnLoad)
            {
                form.Show();
            }
        }
Exemplo n.º 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);
     }
 }
Exemplo n.º 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);
 }
Exemplo n.º 9
0
 internal static int GetZIndex(DockForm form)
 {
     return(formList.IndexOf(form));
 }