public void Close(OdgePopUp popup) { int c = popupQ.Count; for (int p = 0; p < c; p++) { OdgePopUp pop = popupQ.Dequeue(); if (!(pop == popup)) { popupQ.Enqueue(pop); } } }
public void UpdatePopup() { if (popupQ.Count > 0) { // Check for style changes. foreach (OdgePopUp odge in popupQ) { if (odge.Style.IsChanged) { odge.OnStyleChanged(); odge.Style.AcceptChanges(); } } // Reset Style.IsChanged flag separately, to avoid skips. foreach (OdgePopUp odge in popupQ) { if (odge.Style.IsChanged) { odge.Style.AcceptChanges(); } } if (RunAllPopUps) { int c = popupQ.Count; for (int p = 0; p < c; p++) { OdgePopUp pop = popupQ.Dequeue(); if (pop.Timeout > 0) { pop.Update(); popupQ.Enqueue(pop); } } } else { if (popupQ.Peek().Timeout > 0) { popupQ.Peek().Update(); } else { popupQ.Dequeue(); } } } }
public void Open(OdgePopUp popup) { if (popup._manager != null && popup._manager != this) { throw new OdgeComponentUsedException("OdgePopUp has already been added to another OdgeUI manager."); } popup._manager = this; if (popup.Style == null) { popup.Style = GlobalStyle; } popupQ.Enqueue(popup); popup.OnOpened(); }