コード例 #1
0
ファイル: SearchLogDialog.cs プロジェクト: uvbs/Holodeck
        public SearchLogDialog(ProcessMdiWindow parentWindow)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
            this.LogWindow = parentWindow;
        }
コード例 #2
0
ファイル: LogListView.cs プロジェクト: uvbs/Holodeck
        public LogListView(ProcessMdiWindow parent)
        {
            this.parentWindow = parent;

            // This call is required by the Windows.Forms Form Designer.
            InitializeComponent();

            lv_ToolTip = new ToolTip();
            lv_ToolTip.AutoPopDelay = 4000;
            lv_ToolTip.InitialDelay = 500;
            lv_ToolTip.ReshowDelay = 500;
            lv_ToolTip.ShowAlways = true;
        }
コード例 #3
0
ファイル: MainWindow.cs プロジェクト: uvbs/Holodeck
 //*************************************************************************
 // Method:	 EnumerateCheckAndSaveFaults
 //
 // Description: Uses Reflection to enumerate all Faults in each specified category
 //                and checks to see if they are enabled, if so, they are saved.
 // Parameters:
 //    categoryName - the category name for which to enumerate and check faults
 //    xwriter - reference to an existing XmlTextWriter object which is used to write
 //
 // Return Value: none
 //*************************************************************************
 private void EnumerateCheckAndSaveFaults(String categoryName, ref XmlTextWriter xwriter, ProcessMdiWindow window)
 {
     foreach (PropertyInfo pi in window.GetType().GetProperties())
     {
         if (pi.Name.StartsWith ("Inject" + categoryName))
         {
             bool IsFaultInjected = (bool) window.GetType().InvokeMember (pi.Name, BindingFlags.GetProperty, null, window, null);
             if (IsFaultInjected)
             {
                 xwriter.WriteStartElement (categoryName + "Fault");
                 xwriter.WriteAttributeString ("Name", pi.Name.Replace("Inject" + categoryName, ""));
                 xwriter.WriteFullEndElement ();
             }
         }
     }
 }
コード例 #4
0
ファイル: MainWindow.cs プロジェクト: uvbs/Holodeck
        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;
        }
コード例 #5
0
ファイル: MainWindow.cs プロジェクト: uvbs/Holodeck
        private void ParseAUTPost(XPathNavigator navigator, ProcessMdiWindow window)
        {
            XPathNavigator nav = navigator.Clone();

            bool hasMoreElements = false;

            if (nav.HasChildren)
            {
                hasMoreElements = true;
                nav.MoveToFirstChild();
            }

            while (hasMoreElements)
            {
                switch(nav.Name)
                {
                    case "Faults":
                        ParseFaults(nav);
                        break;
                    case "Limits":
                        ParseLimits(nav);
                        break;
                    case "ScheduledTests":
                    {
                        Queue tests = ParseScheduledTests(nav);
                        if ((window != null) && (tests != null))
                        {

                        }
                        break;
                    }
                }

                hasMoreElements = nav.MoveToNext();
            }
        }
コード例 #6
0
ファイル: MainWindow.cs プロジェクト: uvbs/Holodeck
        private void OpenLogFile(String logFileName)
        {
            if (logFileName == null)
                return;

            ProcessMdiWindow window = new ProcessMdiWindow(logFileName);
            window.MdiParent = this;
            window.Show();
            mdiWindowList.Add(window);
        }
コード例 #7
0
ファイル: ProcessMdiWindow.cs プロジェクト: uvbs/Holodeck
        // copies the properties of the window passed in
        public void SetFaultsLimitsAndFilters(ProcessMdiWindow window)
        {
            if (window != null)
            {
                this.InjectDiskAccessDenied = window.InjectDiskAccessDenied;
                this.InjectDiskAlreadyExists = window.InjectDiskAlreadyExists;
                this.InjectDiskCannotAccess = window.InjectDiskCannotAccess;
                this.InjectDiskCannotBeCreated = window.InjectDiskCannotBeCreated;
                this.InjectDiskCannotBeRemoved = window.InjectDiskCannotBeRemoved;
                this.InjectDiskCorruptStructure = window.InjectDiskCorruptStructure;
                this.InjectDiskCrcDataError = window.InjectDiskCrcDataError;
                this.InjectDiskDirectoryNotEmpty = window.InjectDiskDirectoryNotEmpty;
                this.InjectDiskDiskFull = window.InjectDiskDiskFull;
                this.InjectDiskDriveCannotSeekDisk = window.InjectDiskDriveCannotSeekDisk;
                this.InjectDiskFileInUse = window.InjectDiskFileInUse;
                this.InjectDiskFileNotFound = window.InjectDiskFileNotFound;
                this.InjectDiskLocked = window.InjectDiskLocked;
                this.InjectDiskNameTooLong = window.InjectDiskNameTooLong;
                this.InjectDiskPathInvalid = window.InjectDiskPathInvalid;
                this.InjectDiskPathNotFound = window.InjectDiskPathNotFound;
                this.InjectDiskReadOnlyDirectory = window.InjectDiskReadOnlyDirectory;
                this.InjectDiskWriteProtected = window.InjectDiskWriteProtected;
                this.InjectMemoryInsufficientMemory = window.InjectMemoryInsufficientMemory;
                this.InjectMemoryInvalidAccess = window.InjectMemoryInvalidAccess;
                this.InjectMemoryInvalidAddress = window.InjectMemoryInvalidAddress;
                this.InjectMemoryPagingFileTooSmall = window.InjectMemoryPagingFileTooSmall;
                this.InjectMemorySegmentIsLocked = window.InjectMemorySegmentIsLocked;
                this.InjectNetworkDisconnect = window.InjectNetworkDisconnect;
                this.InjectNetworkNetworkDown = window.InjectNetworkNetworkDown;
                this.InjectNetworkNoPorts = window.InjectNetworkNoPorts;
                this.InjectNetworkNotInstalled = window.InjectNetworkNotInstalled;
                this.InjectNetworkWrongWinsock = window.InjectNetworkWrongWinsock;

                this.LimitDiskUsage = window.LimitDiskUsage;
                this.LimitMemoryUsage = window.LimitMemoryUsage;
                this.LimitNetworkSpeed = window.LimitNetworkSpeed;
                this.MaxDiskUsage = window.MaxDiskUsage;
                this.MaxMemoryUsage = window.MaxMemoryUsage;
                this.MaxNetworkSpeed = window.MaxNetworkSpeed;
                this.MaxDiskUsageUnit = window.MaxDiskUsageUnit;
                this.MaxMemoryUsageUnit = window.MaxMemoryUsageUnit;

                this.FilteredOutFunctions = window.FilteredOutFunctions;
            }
        }