public virtual void Update() { for (int i = Overlays.Count - 1; i >= 0; i--) { Overlays[i].Update(); } for (int i = Toasts.Count - 1; i >= 0; i--) { BaseToast toast = Toasts[i]; toast.Update(); if (toast.IsComplete()) { Toasts.RemoveAt(i); } } for (int i = Widgets.Count - 1; i >= 0; i--) { Widget widget = Widgets[i]; if (widget.Visible) { widget.Update(); } } }
/// <summary> /// Creates a new instance of the toast /// </summary> /// <param name="toast"></param> public ToastItem(BaseToast toast) { this.Toast = toast; this.Id = toast.TemplateType; this.Description = toast.GetDescription(); this.Xml = System.Xml.Linq.XDocument.Parse(toast.ToString()).ToString(); }
public void PushToast(BaseToast toast) { Toasts.Insert(0, toast); toast.Start(); }