internal override void Close(bool isCancel = false) { if (instance == this) { instance = null; } base.Close(isCancel); }
internal CollectionDialog(EventHandler onClose) : base(LocalisationManager.GetString(OsuString.CollectionDialog_Collection), true) { channelButtonList = new pScrollableArea(new Rectangle(0, 60, 550, 250), Vector2.Zero, false, 0, defaultTargetType); instance = this; Closed += onClose; closeAction = onClose; currentVerticalSpace = 320; AddOption(LocalisationManager.GetString(OsuString.CollectionDialog_DeleteCollection), Color.Red, del_OnClick); AddOption(LocalisationManager.GetString(OsuString.General_Close), Color.Gray, null, true); Collections = new List <CollectionSprites>(); foreach (KeyValuePair <string, List <string> > pair in CollectionManager.Collections) { Collections.Add(new CollectionSprites(pair.Key)); } refresh(); }