public void Recycle() { this.id = 0; this.Selected = false; this.BackColor = idleBackColor; StaticObjectPool.Push(this); }
public static MessageBoxResult Show(Window owner, string messageText, string title = "Toggl Desktop", MessageBoxButton buttons = MessageBoxButton.OK, string okButtonText = "OK") { var box = StaticObjectPool.PopOrDefault <MessageBox>() ?? new MessageBox(); var result = box.showDialog(owner, messageText, title, buttons, okButtonText); StaticObjectPool.Push(box); return(result); }
public void Recycle() { this.id = 0; this.IsSelected = false; StaticObjectPool.Push(this); }