CSPspEmu.Gui.Winforms.PspDisplayForm.associateWithPBPAndCSOToolStripMenuItem_Click C# (CSharp) Method

associateWithPBPAndCSOToolStripMenuItem_Click() private method

private associateWithPBPAndCSOToolStripMenuItem_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        private void associateWithPBPAndCSOToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var Result = ProcessUtils.RunProgramInBackgroundAsRoot(ApplicationPaths.ExecutablePath, "/associate");
            Console.WriteLine(Result.OutputString);
            Console.WriteLine(Result.ErrorString);

            if (Result.Success)
            {
                MessageBox.Show("Associations done!", "Done", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                MessageBox.Show("Can't associate\n\n" + Result.ErrorString, "Done", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            // Now read the output of the DOS application
            //string Result = ProcessObj.StandardOutput.ReadToEnd();
        }
PspDisplayForm