예제 #1
0
        private void mnuExtract_Click(object sender, EventArgs e)
        {
            BioSeqExtract frm = new BioSeqExtract();
            DialogResult  rc  = frm.ShowDialog();

            if (rc == DialogResult.OK) // then the config has the specs
            {
                Cursor.Current = Cursors.WaitCursor;
                // Parameters are in appsettings.
                WSLProxyResponse WSLResponse = ServiceCallHelper.Extract(AppConfigHelper.LoggedOnUser, AppConfigHelper.JsonConfig()); // Parameters are in appsettings.
                ServiceCallHelper.LoadConfig(AppConfigHelper.LoggedOnUser);                                                           // To retrieve StandardOutput and LastError.
                Cursor.Current = Cursors.Default;
                if (WSLResponse.ExitCode == 0)
                {
                    MessageBox.Show(AppConfigHelper.StandardOutput + Environment.NewLine + "Extract completed successfully. Result is in " +
                                    AppConfigHelper.ExtractOutputPath() + "\\" + AppConfigHelper.ExtractSampleID() + ".fasta", "Success", MessageBoxButtons.OK);
                }
                else
                {
                    MessageBox.Show("Extract completed with error code " + WSLResponse.ExitCode.ToString() + "." + Environment.NewLine + Environment.NewLine +
                                    AppConfigHelper.StandardOutput + Environment.NewLine + AppConfigHelper.LastError, "Error", MessageBoxButtons.OK);
                }
            }
        }