ME3Explorer.KFreonTPFTools3.CloseFilesButton_Click C# (CSharp) Method

CloseFilesButton_Click() private method

private CloseFilesButton_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        private void CloseFilesButton_Click(object sender, EventArgs e)
        {
            if (!CancelButton.Visible)
            {
                DebugOutput.PrintLn("Terminating remote access...");


                MainTreeView.Nodes.Clear();
                LoadedTexes.Clear();
                GeneralInfoRTB.Text = "";
                HashTextBox.Clear();
                PCCsCheckListBox.Items.Clear();
                zippys.Clear();
                AttemptedAnalyse = false;

                DebugOutput.PrintLn("Deleting runtimes...");
                Previews?.Clear();

                // KFreon: Reset picturebox
                if (PreviewBox.Image != null)
                {
                    foreach (var preview in Previews)
                        preview.Value.Dispose();

                    PreviewBox.Image = null;
                    PreviewBox.Refresh();
                }
                DebugOutput.PrintLn("Removing archives... (legion rules!)");

                InitialiseGUI();
                gooey.ModifyControl("ExtractTOP", false);
                gooey.ModifyControl("ClearAll", false);
                gooey.ModifyControl("Rebuild", false);
                gooey.ModifyControl("RunAutofix", false);
                gooey.ModifyControl("extractInvalid", false);
                gooey.ModifyControl("extractValids", false);
                gooey.ChangeState(true);

                Cleanup();
                DisappearDuplicatesBox(true);
                ShowPCCContextPanel(false);
                ShowContextPanel(false);

                GC.Collect();
            }
        }
KFreonTPFTools3