Esempio n. 1
0
 internal static void ChangeSelection(CollectionSprites col)
 {
     if (instance != null)
     {
         instance.Collections.ForEach(c => { if (c != col)
                                             {
                                                 c.Deselect();
                                             }
                                      });
     }
     CurrentSelected = col;
 }
Esempio n. 2
0
        private void del_OnClick(object sender, EventArgs e)
        {
            if (CurrentSelected == null)
            {
                NotificationManager.ShowMessageMassive(LocalisationManager.GetString(OsuString.CollectionDialog_SelectACollectionFirst), 1500);
                GameBase.ShowDialog(new CollectionDialog(closeAction));
                return;
            }

            Close();

            pDialog pd = new pDialogConfirmation(string.Format(LocalisationManager.GetString(OsuString.CollectionDialog_ConfirmDeleteCollection), CurrentSelected.Name), delegate
            {
                CollectionManager.Remove(CurrentSelected.Name);
                CurrentSelected = null;
                GameBase.ShowDialog(new CollectionDialog(closeAction));
            }, delegate
            {
                GameBase.ShowDialog(new CollectionDialog(closeAction));
            });

            GameBase.ShowDialog(pd);
        }