Example #1
0
        public void MoveUp(ResourcePack pack)
        {
            int index = EnabledPacks.IndexOf(pack);

            if (index != 0)
            {
                EnabledPacks.Remove(pack);
                EnabledPacks.Insert(index - 1, pack);
            }
        }
Example #2
0
        public void MoveDown(ResourcePack pack)
        {
            int index = EnabledPacks.IndexOf(pack);

            if (index != EnabledPacks.Count - 1)
            {
                EnabledPacks.Remove(pack);
                EnabledPacks.Insert(index + 1, pack);
            }
        }
Example #3
0
 public void Disable(ResourcePack pack)
 {
     EnabledPacks.Remove(pack);
     pack.IsEnabled = false;
     DisabledPacks.Insert(0, pack);
 }
Example #4
0
 public async void Delete(ResourcePack pack)
 {
     bool _ = (pack.IsEnabled) ? EnabledPacks.Remove(pack) : DisabledPacks.Remove(pack);
     await _resourcePackService.DeleteFromDiskAsync(pack);
 }