Ejemplo n.º 1
0
        private void NewPlayableList_ListElementChanged(object sender, ListElementChangedArgs e)
        {
            if (!Global.Loading)
            {
                switch (e.Operation)
                {
                case GenericListOperation.Addition:
                    if (IsMainSpellList)
                    {
                        SaveManager.SaveUnique <Spell>(e.Element);
                    }
                    break;

                case GenericListOperation.Deletion:
                    if (IsMainSpellList)
                    {
                        SaveManager.DeleteUnique <Spell>(e.Element);
                    }
                    break;

                case GenericListOperation.Modification:
                    if (IsMainSpellList)
                    {
                        SaveManager.SaveUnique <Spell>(e.Element);
                    }
                    break;

                case GenericListOperation.Sort:
                    break;
                }
            }
        }
 public void OnListElementChanged(ListElementChangedArgs e)
 {
     if (ListElementChanged != null)
     {
         ListElementChanged(this, e);
     }
 }
 private void CustomVerboseStatusList_ListElementChanged(object sender, ListElementChangedArgs e)
 {
     if (e.Operation == GenericListOperation.Deletion)
     {
         if (e.Element is IDisposable disposable)
         {
             disposable.Dispose();
         }
     }
 }