Example #1
0
        protected ProcessMdiWindow LaunchApplicationForTest(AbstractLaunchWizard wizard, bool copyPreviousWindow)
        {
            Cursor.Current = Cursors.WaitCursor;
            ProcessMdiWindow newWindow = new ProcessMdiWindow();

            newWindow.MdiParent = this;

            newWindow.PredefineTests = wizard.PredefineTests;
            newWindow.ProcessChain = wizard.ProcessChain;
            newWindow.UseProcessFile = false;
            newWindow.UseProcessID = false;
            newWindow.AppPaused = wizard.AppPaused;

            newWindow.FilteredOutFunctions = wizard.FilteredOutFunctions;

            if ((this.GetActiveChildWindow() != null) && (copyPreviousWindow))
                newWindow.SetFaultsLimitsAndFilters(this.GetActiveChildWindow());

            if (wizard.UseProcessFile)
            {
                newWindow.UseProcessFile = true;
                newWindow.ProcessFile = wizard.ProcessPath;
                newWindow.LaunchApp();

                int PID = newWindow.AppProcessID;
                newWindow.Text = PID.ToString() + " : " + newWindow.ProcessFile;
                RegistryHelper.getInstance().AddRecentItem(newWindow.ProcessFile);
            }
            else
            {
                newWindow.UseProcessID = true;
                newWindow.ProcessID = int.Parse(wizard.ProcessList.SelectedItems[0].Text);
                newWindow.AttachApp(null);

                string processPath = wizard.ProcessList.SelectedItems[0].SubItems[1].Text;
                newWindow.Text = newWindow.ProcessID + " : " + processPath;
            }

            if (wizard.AppPaused)
            {
                this.applicationPauseMenuItem.Text = "&Resume";
                newWindow.Text += " - Paused!";
            }

            newWindow.Show();
            mdiWindowList.Add(newWindow);
            Cursor.Current = Cursors.Default;

            return newWindow;
        }
Example #2
0
        private void OpenLogFile(String logFileName)
        {
            if (logFileName == null)
                return;

            ProcessMdiWindow window = new ProcessMdiWindow(logFileName);
            window.MdiParent = this;
            window.Show();
            mdiWindowList.Add(window);
        }