private void buttonUpdate_Click(object sender, EventArgs e) { if (selectedFilePaths == null) { MessageBox.Show("Please choose file(s) to update their names.", "No Files Selected", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } if (outputDirectory == null) { MessageBox.Show("Please select an output folder.", "No Directory Selected", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } UpdateManager updater = new UpdateManager(); FormProcessingUpdate processWindow = new FormProcessingUpdate(); updater.SendFeedback += processWindow.OnSendFeedback; ProcessingWindow.Show(processWindow, new Action((MethodInvoker) delegate { updater.DoUpdates(selectedFilePaths, outputDirectory, checkIncludeDirs.Checked); })); int successfulUpdatesCount = updater.getSuccessCount(); int totalFileCount = updater.getTotalCount(); if (successfulUpdatesCount > 0) { MessageBox.Show(string.Format("{0} of {1} Filename(s) successfully updated.", successfulUpdatesCount, totalFileCount), "Update Results", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("No filename updates were found.", "Process Complete", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void buttonStart_Click(object sender, EventArgs e) { ConvertManager converter = new ConvertManager(); FormProcessingConversion processWindow = new FormProcessingConversion(); converter.SendFeedback += processWindow.OnSendFeedback; if (inputDirectory != null) { if (outputDirectory != null) { ProcessingWindow.Show(processWindow, new Action((MethodInvoker) delegate { converter.DoMassConversion(inputDirectory, outputDirectory, checkConvertSubfolders.Checked); })); int conversionFailedCount = converter.GetFailureCount(); int conversionTryCount = converter.GetTryCount(); if (conversionFailedCount > 0) { MessageBox.Show(string.Format("Process Complete.\n\n{0} of {1} file(s) could not be converted (missing .ftexs).", conversionFailedCount, conversionTryCount), "Process Complete", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else { MessageBox.Show(string.Format("{0} file(s) converted.", conversionTryCount), "Process Complete", MessageBoxButtons.OK, MessageBoxIcon.Information); } } else { MessageBox.Show("Please select an output folder.", "Missing Output Directory", MessageBoxButtons.OK, MessageBoxIcon.Information); } } else { MessageBox.Show("Please select an input folder.", "Missing Input Directory", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
public EventStreamProcessor(IEventStream eventStream, TimeSpan processingWindow, TimeSpan processingLag, IConfig config) { _eventStream = eventStream; _config = config; _logger = config.GetLoggerFactory().CreateLogger <EventStreamProcessor>(); if (processingWindow != TimeSpan.Zero) { _processingWindow = new ProcessingWindow(eventStream, processingWindow, processingLag, _logger); } }
private void buttonAggregate_Click(object sender, EventArgs e) { if (!checkTPPMasterFileListExists()) { return; } errorList = new List <string>(); UnpackManager unpacker = new UnpackManager(); AggregateManager aggregator = new AggregateManager(); ConvertManager converter = new ConvertManager(); FormProcessing processWindow = new FormProcessing(); unpacker.SendFeedback += processWindow.OnSendFeedback; aggregator.SendFeedback += processWindow.OnSendFeedback; converter.SendFeedback += processWindow.OnSendFeedback; string[] unpackedPaths = { }; ProcessingWindow.Show(processWindow, new Action((MethodInvoker) delegate { unpackedPaths = unpacker.DoUnpack(pftxsFullPath, textOutDir.Text, condense); })); if (unpacker.err != "") { DisplayError(unpacker.err); return; } string[] pulledFtexsPaths = { }; ProcessingWindow.Show(processWindow, new Action((MethodInvoker) delegate { pulledFtexsPaths = aggregator.DoAggregate(unpackedPaths, textArchiveDir.Text, textOutDir.Text, condense); })); if (checkConvertDDS.Checked) { ProcessingWindow.Show(processWindow, new Action((MethodInvoker) delegate { converter.DoMassConversion(textOutDir.Text, textOutDir.Text, !condense); })); DialogResult dialogResult = MessageBox.Show("The .ftex files have been converted to .dds files.\n\nWould you like to delete the leftover .ftex and .ftexs files?", "Delete Fox Files?", MessageBoxButtons.YesNo, MessageBoxIcon.Information); if (dialogResult == DialogResult.Yes) { ProcessingWindow.Show(processWindow, new Action((MethodInvoker) delegate { aggregator.DeleteFoxTextures(unpackedPaths, pulledFtexsPaths, textOutDir.Text, condense); })); } } errorList.AddRange(aggregator.errorList); errorList.AddRange(converter.errorList); if (errorList.Count() > 0) { DisplayErrorList(); return; } MessageBox.Show("Done!", "Process Complete", MessageBoxButtons.OK, MessageBoxIcon.Information); }
private void buttonStart_Click(object sender, EventArgs e) { TransferManager transferrer = new TransferManager(); FormProcessingTransfer processWindow = new FormProcessingTransfer(); transferrer.SendFeedback += processWindow.OnSendFeedback; ProcessingWindow.Show(processWindow, new Action((MethodInvoker) delegate { transferrer.Transfer(gzTextureG0s, mgoTextureDat, tppMasterDir); })); if (transferrer.errorOccurred != "") { MessageBox.Show("An error occurred while attempting to transfer data:\n" + transferrer.errorOccurred); } if (transferrer.successfulTransfers.Count > 0) { MessageBox.Show("The following archives were transferred successfully: " + transferrer.GetSuccessfulTransfers()); } else { MessageBox.Show("No archives were transferred."); } }
private void buttonStart_Click(object sender, EventArgs e) { UnpackManager archiveUnpacker = new UnpackManager(); FormProcessesingUnpack processWindow = new FormProcessesingUnpack(); archiveUnpacker.SendFeedback += processWindow.OnSendFeedback; if (archivePaths != null) { if (outputDir != null) { ProcessingWindow.Show(processWindow, new Action((MethodInvoker) delegate { archiveUnpacker.DoUnpack(archivePaths, outputDir, checkCondenseDir.Checked); })); MessageBox.Show("Done!", "Process Complete", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("Please select an output folder.", "Missing Output Directory", MessageBoxButtons.OK, MessageBoxIcon.Information); } } else { MessageBox.Show("Please choose which archives to unpack.", "No Archives Selected", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
public static void OnProcessComplete() { ProcessingWindow.Close(); ProcessingWindow = null; }
private void buttonProliferate_Click(object sender, EventArgs e) { if (!File.Exists("TppMasterFileList.txt")) { MessageBox.Show("TppMasterFileList.txt is missing from the File Proliferator.exe folder.", "Missing TppMasterFileList.txt", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } if (selectedFilePaths == null) { MessageBox.Show("Please choose file(s) to build directories for.", "No Files Selected", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } if (outputDirectory == null) { MessageBox.Show("Please select an output folder.", "Missing Output Directory", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } if (checkRefFile.Checked && referenceFileName == null) { MessageBox.Show("Please select a Reference File.", "No Reference File Selected", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } if (checkPullTextures.Checked && VanillaTexturesPath == null) { MessageBox.Show("Please set a Texture Directory.", "No Reference File Selected", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } UpdateManager updateManager = new UpdateManager(); TextureManager textureManager = new TextureManager(); ProliferateManager proliferator = new ProliferateManager(); FormProcessingProliferation processWindow = new FormProcessingProliferation(); updateManager.SendFeedback += processWindow.OnSendFeedback; proliferator.SendFeedback += processWindow.OnSendFeedback; textureManager.SendFeedback += processWindow.OnSendFeedback; string err = ""; if (checkConvertDds.Checked) { ProcessingWindow.Show(processWindow, new Action((MethodInvoker) delegate { selectedFilePaths = textureManager.convertDdsToFtex(selectedFilePaths); })); err = textureManager.errorMsg; if (err != "") { DisplayError(err); return; } } Console.WriteLine("Ftex Conversion Complete"); int ddsConversionFailedCount = textureManager.getConversionFailedCount(); if (ddsConversionFailedCount > 0) { DialogResult dialogResult = MessageBox.Show(string.Format("There were {0} .dds file(s) that failed to convert to .ftex formatting. Unconverted .dds files will not be included in the Directory Structure.\n\nWould you still like to build the Directory Structure?", ddsConversionFailedCount), "Missing _pftxs Textures", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (dialogResult != DialogResult.Yes) { return; } } if (checkNameUpdates.Checked) { ProcessingWindow.Show(processWindow, new Action((MethodInvoker) delegate { selectedFilePaths = updateManager.DoUpdates(selectedFilePaths); })); err = updateManager.errorMsg; if (err != "") { DisplayError(err); return; } } if (!checkRefFile.Checked) { ProcessingWindow.Show(processWindow, new Action((MethodInvoker) delegate { proliferator.DoProliferate(selectedFilePaths, outputDirectory); })); } else { ProcessingWindow.Show(processWindow, new Action((MethodInvoker) delegate { proliferator.DoProliferateFromReference(selectedFilePaths, outputDirectory, checkSetRefRoot.Checked, referenceFileName); })); } err = proliferator.errorMsg; if (err != "") { DisplayError(err); return; } Console.WriteLine("DoProliferate Complete"); if (checkPullTextures.Checked) { if (checkRefFile.Checked) { ProcessingWindow.Show(processWindow, new Action((MethodInvoker) delegate { textureManager.PullVanillaTextures(outputDirectory, VanillaTexturesPath, referenceFileName); })); } else { ProcessingWindow.Show(processWindow, new Action((MethodInvoker) delegate { textureManager.PullVanillaTextures(outputDirectory, VanillaTexturesPath, selectedFilePaths); })); //textureManager.PullVanillaTextures(outputDirectory, VanillaTexturesPath, selectedFilePaths); } err = textureManager.errorMsg; if (err != "") { DisplayError(err); return; } Console.WriteLine("PullVanillaTextures Complete"); } int texturePullsFailed = textureManager.getTextureNotFoundCount(); if (checkPackPftxs.Checked && textureManager.getPftxsDirCount(outputDirectory) > 0) { bool doPftxsPack = true; if (texturePullsFailed > 0) { DialogResult dialogResult = MessageBox.Show(string.Format("There are {0} texture file(s) that could not be found in {1}. These textures were not pulled into the _pftxs folder(s).\n\nWould you still like to pack the _pftxs folders into .pftxs files?", texturePullsFailed, Path.GetFileName(VanillaTexturesPath)), "Missing _pftxs Textures", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); doPftxsPack = (dialogResult == DialogResult.Yes); } if (doPftxsPack) { ProcessingWindow.Show(processWindow, new Action((MethodInvoker) delegate { textureManager.PackPftxsFolders(outputDirectory); })); err = textureManager.errorMsg; if (err != "") { DisplayError(err); return; } DialogResult dialogResult = MessageBox.Show("The _pftxs folders have been packed into .pftxs files.\n\nWould you like to delete the leftover _pftxs folders?", "Delete _pftxs Folders?", MessageBoxButtons.YesNo, MessageBoxIcon.Information); if (dialogResult == DialogResult.Yes) { ProcessingWindow.Show(processWindow, new Action((MethodInvoker) delegate { textureManager.DeletePftxsFolders(outputDirectory); })); err = textureManager.errorMsg; if (err != "") { DisplayError(err); return; } } } Console.WriteLine("Pack _PFTXS Complete"); } if (texturePullsFailed > 0) { MessageBox.Show(string.Format("Process Complete. There were {0} texture file(s) that could not be found in {1}.\n\nThese textures were not pulled into the _pftxs folder(s).", texturePullsFailed, Path.GetFileName(VanillaTexturesPath)), "Process Complete", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("Done!", "Process Complete", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void CreateButton_Click(object sender, RoutedEventArgs e) { processWindow = new ProcessingWindow(); processWindow.SetModel(_model); processWindow.ShowDialog(); }