Beispiel #1
0
        public void Open(OdgeControl control)
        {
            if (control._manager != null && control._manager != this)
            {
                throw new OdgeComponentUsedException("OdgeControl has already been added to another OdgeUI manager.");
            }
            control._manager = this;

            if (control.Style == null)
            {
                control.Style = GlobalStyle;
            }

            controlStack.Push(control);
            control.OnOpened();
        }
Beispiel #2
0
        public void Close(OdgeControl control)
        {
            Stack <OdgeControl> temp = new Stack <OdgeControl>();

            while (controlStack.Count > 0)
            {
                OdgeControl con = controlStack.Pop();
                if (con == control)
                {
                    break;
                }
                else
                {
                    temp.Push(con);
                }
            }

            while (temp.Count > 0)
            {
                controlStack.Push(temp.Pop());
            }
        }