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(); }
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()); } }