public async void OnDrop(ListBox listBox, DragEventArgs e) { string[] paths = e.Data.GetData(DataFormats.FileDrop) as string[]; if (listBox.Name.StartsWith("Enabled")) { EnabledPacks.AddRange(await _resourcePackService.MoveLoadAllAsync(paths, true, IsCopy)); } else { DisabledPacks.AddRange(await _resourcePackService.MoveLoadAllAsync(paths, false, IsCopy)); } }
public async void AddNew() { var dialog = new Microsoft.Win32.OpenFileDialog() { Multiselect = true, Title = _languageService.GetEntry("SelectResourcePacks"), Filter = "Minecraft resourcepack | *.zip", }; if (dialog.ShowDialog() ?? false) { DisabledPacks.AddRange(await _resourcePackService.MoveLoadAllAsync(dialog.FileNames, false, IsCopy)); } }