コード例 #1
0
        public UnitTestsPad()
        {
            instance = this;

            panel                 = new Panel();
            treeView              = CreateTestTreeView();
            treeView.Dock         = DockStyle.Fill;
            treeView.DoubleClick += TestTreeViewDoubleClick;
            treeView.KeyPress    += TestTreeViewKeyPress;
            panel.Controls.Add(treeView);

            toolStrip           = CreateToolStrip("/SharpDevelop/Pads/UnitTestsPad/Toolbar");
            toolStrip.GripStyle = ToolStripGripStyle.Hidden;
            panel.Controls.Add(toolStrip);

            // Add the load solution projects thread ended handler before
            // we try to display the open solution so the event does not
            // get missed.
            ParserService.LoadSolutionProjectsThreadEnded += LoadSolutionProjectsThreadEnded;
            OnAddedLoadSolutionProjectsThreadEndedHandler();

            // Display currently open solution.

            if (!IsParserLoadingSolution)
            {
                Solution openSolution = GetOpenSolution();
                if (openSolution != null)
                {
                    SolutionLoaded(openSolution);
                }
            }

            ParserService.ParseInformationUpdated += ParseInformationUpdated;
            ProjectService.SolutionClosed         += SolutionClosed;
            ProjectService.SolutionFolderRemoved  += SolutionFolderRemoved;
            ProjectService.ProjectAdded           += ProjectAdded;
            ProjectService.ProjectItemAdded       += ProjectItemAdded;
            ProjectService.ProjectItemRemoved     += ProjectItemRemoved;

            treeView.ContextMenuStrip = CreateContextMenu("/SharpDevelop/Pads/UnitTestsPad/ContextMenu");
        }
コード例 #2
0
		public UnitTestsPad()
		{
			instance = this;
			
			panel = new Panel();
			treeView = CreateTestTreeView();
			treeView.Dock = DockStyle.Fill;
			treeView.DoubleClick += TestTreeViewDoubleClick;
			treeView.KeyPress += TestTreeViewKeyPress;
			panel.Controls.Add(treeView);
			
			toolStrip = CreateToolStrip("/SharpDevelop/Pads/UnitTestsPad/Toolbar");
			toolStrip.GripStyle = ToolStripGripStyle.Hidden;
			panel.Controls.Add(toolStrip);

			// Add the load solution projects thread ended handler before
			// we try to display the open solution so the event does not
			// get missed.
			ParserService.LoadSolutionProjectsThreadEnded += LoadSolutionProjectsThreadEnded;
			OnAddedLoadSolutionProjectsThreadEndedHandler();

			// Display currently open solution.

			if (!IsParserLoadingSolution) {
				Solution openSolution = GetOpenSolution();
				if (openSolution != null) {
					SolutionLoaded(openSolution);
				}
			}
			
			ParserService.ParseInformationUpdated += ParseInformationUpdated;
			ProjectService.SolutionClosed += SolutionClosed;
			ProjectService.SolutionFolderRemoved += SolutionFolderRemoved;
			ProjectService.ProjectAdded += ProjectAdded;
			ProjectService.ProjectItemAdded += ProjectItemAdded;
			ProjectService.ProjectItemRemoved += ProjectItemRemoved;
			
			treeView.ContextMenuStrip = CreateContextMenu("/SharpDevelop/Pads/UnitTestsPad/ContextMenu");
		}