private void UnpackAllFilesClicked(object sender, EventArgs e) { var dialog = new FolderBrowserDialog(); if (dialog.ShowDialog() == DialogResult.OK) { var runningTask = Task.Run(() => _resourcePacker.UnpackFiles(_packedFiles, dialog.SelectedPath)); var loadingIndicator = new LoadingIndicator("Unpacking Files...", runningTask); loadingIndicator.ShowDialog(); } }
private void RepackButtonClicked(object sender, EventArgs e) { _resourcePacker.Dispose(); var runningTask = Task.Run(() => ResourceFilePacker.PackFile(_packedFiles, _resrouceFile)); var loadingIndicator = new LoadingIndicator($"Packing Files... '{_resrouceFile}'", runningTask); loadingIndicator.ShowDialog(); _resourcePacker = new ResourceFilePacker(_resrouceFile); Directory.Delete(UNPACK_DIRECTORY, true); repackButton.Enabled = false; ResetDisplayLayout(); Text = $"{_windowTitle} - Packed '{Path.GetFullPath(_resrouceFile)}'"; }