private void SaveResourcePack() { if (string.IsNullOrWhiteSpace(ResourcePackName)) { return; } bool doSave = true; if (ResourcePacks.Contains(ResourcePackName)) { SaveResourcePackConfirmationRequest.Raise(new Confirmation { Title = "Overwrite Resource Pack?", Content = "A resource pack with that name already exists.\n\nAre you sure you want to overwrite it?" }, delegate(IConfirmation confirmation) { doSave = confirmation.Confirmed; }); } if (doSave) { Notification.Content = ResourcePackName; ResourcePackName = string.Empty; FinishInteraction(); } }
private void AddPackage() { if (string.IsNullOrWhiteSpace(SelectedAvailableResourcePack) || ResourcePacks.Contains(SelectedAvailableResourcePack)) { return; } ResourcePacks.Add(SelectedAvailableResourcePack); SelectedResourcePack = ResourcePacks.Last(); }