private void OpenOutputDir(string OutputDir) { if (this.InvokeRequired) { PassStringDelegate Delegate = OpenOutputDir; string[] Args = { OutputDir }; this.Invoke(Delegate, Args); } else { if (DialogResult.Yes == MessageBox.Show("Show output folder?", "Show output folder", MessageBoxButtons.YesNo)) { Process.Start(OutputDir); } } }
private void ShowLog(string Line) { if (this.InvokeRequired) { PassStringDelegate Delegate = ShowLog; object[] Args = { Line }; this.Invoke(Delegate, Args); } else { if (!Logs.Visible) { Logs.Show(); } Logs.ShowLog(Line); } }
private void ReportPakCreated(string PakName) { if (this.InvokeRequired) { PassStringDelegate Delegate = ReportPakCreated; object[] Args = { PakName }; this.Invoke(Delegate, Args); } else { BatchCount--; ShowLog($"{BatchTotal - BatchCount} of {BatchTotal} - Pak file created: {PakName}"); if (BatchCount == 0) { ShowLog("////////////////////// DONE BATCH PACKING ///////////////////////"); } } }
private void ProcessListOutput(string FileName) { if (TV_ListPak.InvokeRequired) { PassStringDelegate Delegate = ProcessListOutput; string[] Args = { FileName }; TV_ListPak.Invoke(Delegate, Args); } else { TV_ListPak.BeginUpdate(); bool bFoundMountPoint = false; TreeNode FileNameNode = new TreeNode("File Name", new TreeNode[] { new TreeNode(FileName) }); TreeNode MountPointNode = new TreeNode("Mount Point"); TV_ListPak.Nodes.Add(FileNameNode); TV_ListPak.Nodes.Add(MountPointNode); foreach (string Line in ListOutput) { if (Line.Contains("Error")) { MessageBox.Show("An error has occurred during list operation. Please check the logs.", "Error"); TV_ListPak.EndUpdate(); return; } if (!bFoundMountPoint && Line.Contains("Mount point")) { MountPointNode.Nodes.Add(Line.Substring(Line.IndexOf("Mount point") + 11)); bFoundMountPoint = true; } } TV_ListPak.ExpandAll(); TV_ListPak.EndUpdate(); } }
private void ProcessListOutput(string FileName) { if (TV_ListPak.InvokeRequired) { PassStringDelegate Delegate = ProcessListOutput; string[] Args = { FileName }; TV_ListPak.Invoke(Delegate, Args); } else { TV_ListPak.BeginUpdate(); bool bFoundMountPoint = false; TreeNode FileNameNode = new TreeNode("File Name", new TreeNode[] { new TreeNode(FileName) }); TreeNode MountPointNode = new TreeNode("Mount Point"); TreeNode FilesNode = new TreeNode("Files"); TV_ListPak.Nodes.Add(FileNameNode); TV_ListPak.Nodes.Add(MountPointNode); TV_ListPak.Nodes.Add(FilesNode); foreach (string Line in ListOutput) { if (Line.Contains(" Error: ")) { MessageBox.Show("An error has occurred during list operation. Please check the logs.", "Error"); TV_ListPak.EndUpdate(); return; } if (!bFoundMountPoint) { if (Line.Contains("Mount point")) { MountPointNode.Nodes.Add(Line.Substring(Line.IndexOf("Mount point") + 11)); bFoundMountPoint = true; } } else { if (Line.StartsWith("LogPakFile: Display: ")) { string LineSubStr = Line.Substring(21); if (LineSubStr.StartsWith("\"")) { FilesNode.Nodes.Add(LineSubStr); } else if (LineSubStr.StartsWith("Unreal pak executed in")) { } else { FilesNode.Text += " - " + LineSubStr; } } } } FileNameNode.Expand(); MountPointNode.Expand(); FilesNode.Collapse(); TV_ListPak.EndUpdate(); } }