/// <summary>
        /// Adds children window to list binded to its parent in structure manager.
        /// </summary>
        public static void Add_Children_Window(IMainWindow_Children children_Window)
        {
            Add_Children(children_Window);

            if (children_Window is IOptionsWindow_Show options_Window)
            {
                Options_Windows_List.Add(options_Window);
            }
        }
        /// <summary>
        /// Removes given children window out of structure manager.
        /// </summary>
        static void Remove_Children_Window(IMainWindow_Children Children_Window)
        {
            if (Children_Window is IOptionsWindow_Show options_Window)
            {
                Options_Windows_List.Remove(options_Window);
            }

            Remove_children(Children_Window);
        }
Esempio n. 3
0
 /// <summary>
 /// Adds children window to list binded to its parent.
 /// </summary>
 static private void Add_Children(IMainWindow_Children children_Window)
 {
     foreach (MainWindow_Children_List Children_List in MainWindows_List)
     {
         if (Children_List.This_MainWindow == children_Window.Parent_MainWindow)
         {
             Children_List.This_Children_List.Add(children_Window);
         }
     }
 }
        /// <summary>
        /// Removes given children window out of binding to MainWindow.
        /// </summary>
        private static void Remove_children(IMainWindow_Children Children_Window)
        {
            foreach (MainWindow_Children_List Children_List in MainWindows_List)
            {
                foreach (IMainWindow_Children Children in Children_List.This_Children_List)
                {
                    if (Children == Children_Window)
                    {
                        Children_List.This_Children_List.Remove(Children);

                        return;
                    }
                }
            }
        }