コード例 #1
0
        public ProcessTree()
        {
            InitializeComponent();

            var column = new TreeColumn("CPU History", 60);

            column.IsVisible      = false;
            column.MinColumnWidth = 10;
            treeProcesses.Columns.Add(column);
            treeProcesses.NodeControls.Add(new ProcessHacker.Components.NodePlotter()
            {
                DataPropertyName = "CpuHistory",
                ParentColumn     = column
            });

            column                = new TreeColumn("I/O History", 60);
            column.IsVisible      = false;
            column.MinColumnWidth = 10;
            treeProcesses.Columns.Add(column);
            treeProcesses.NodeControls.Add(new ProcessHacker.Components.NodePlotter()
            {
                DataPropertyName = "IoHistory",
                ParentColumn     = column
            });

            treeProcesses.KeyDown     += new KeyEventHandler(ProcessTree_KeyDown);
            treeProcesses.MouseDown   += new MouseEventHandler(treeProcesses_MouseDown);
            treeProcesses.MouseUp     += new MouseEventHandler(treeProcesses_MouseUp);
            treeProcesses.DoubleClick += new EventHandler(treeProcesses_DoubleClick);

            nodeName.ToolTipProvider = _tooltipProvider = new ProcessToolTipProvider(this);

            // make it draw when we want it to draw :)
            treeProcesses.BeginUpdate();
        }
コード例 #2
0
ファイル: ProcessTree.cs プロジェクト: andyvand/ProcessHacker
        public ProcessTree()
        {
            InitializeComponent();

            var column = new TreeColumn("CPU History", 60);

            column.IsVisible = false;
            column.MinColumnWidth = 10;
            treeProcesses.Columns.Add(column);
            treeProcesses.NodeControls.Add(new ProcessHacker.Components.NodePlotter()
            {
                DataPropertyName = "CpuHistory",
                ParentColumn = column
            });

            column = new TreeColumn("I/O History", 60);
            column.IsVisible = false;
            column.MinColumnWidth = 10;
            treeProcesses.Columns.Add(column);
            treeProcesses.NodeControls.Add(new ProcessHacker.Components.NodePlotter()
            {
                DataPropertyName = "IoHistory",
                ParentColumn = column
            });

            treeProcesses.KeyDown += new KeyEventHandler(ProcessTree_KeyDown);
            treeProcesses.MouseDown += new MouseEventHandler(treeProcesses_MouseDown);
            treeProcesses.MouseUp += new MouseEventHandler(treeProcesses_MouseUp);
            treeProcesses.DoubleClick += new EventHandler(treeProcesses_DoubleClick);

            nodeName.ToolTipProvider = _tooltipProvider = new ProcessToolTipProvider(this);

            // make it draw when we want it to draw :)
            treeProcesses.BeginUpdate();
        }
コード例 #3
0
        public string GetTooltipText(ProcessToolTipProvider provider)
        {
            int tickCount = Environment.TickCount;

            if (tickCount - _lastTooltipTickCount >= Settings.Instance.RefreshInterval)
            {
                _tooltipText          = provider.GetToolTip(this);
                _lastTooltipTickCount = tickCount;
            }

            return(_tooltipText);
        }
コード例 #4
0
        public ProcessTree()
        {
            InitializeComponent();

            TreeColumn column = new TreeColumn("CPU History", 60)
            {
                IsVisible      = false,
                MinColumnWidth = 10
            };

            treeProcesses.Columns.Add(column);
            treeProcesses.NodeControls.Add(new Components.NodePlotter
            {
                DataPropertyName = "CpuHistory",
                ParentColumn     = column
            });

            column = new TreeColumn("I/O History", 60)
            {
                IsVisible      = false,
                MinColumnWidth = 10
            };
            treeProcesses.Columns.Add(column);
            treeProcesses.NodeControls.Add(new Components.NodePlotter
            {
                DataPropertyName = "IoHistory",
                ParentColumn     = column
            });

            treeProcesses.KeyDown     += this.ProcessTree_KeyDown;
            treeProcesses.MouseDown   += this.treeProcesses_MouseDown;
            treeProcesses.MouseUp     += this.treeProcesses_MouseUp;
            treeProcesses.DoubleClick += this.treeProcesses_DoubleClick;

            nodeName.ToolTipProvider = _tooltipProvider = new ProcessToolTipProvider(this);

            // make it draw when we want it to draw :)
            treeProcesses.BeginUpdate();
        }
コード例 #5
0
        public ProcessTree()
        {
            InitializeComponent();

            TreeColumn column = new TreeColumn("CPU History", 60)
            {
                IsVisible = false, 
                MinColumnWidth = 10
            };

            treeProcesses.Columns.Add(column);
            treeProcesses.NodeControls.Add(new Components.NodePlotter
            {
                DataPropertyName = "CpuHistory",
                ParentColumn = column
            });

            column = new TreeColumn("I/O History", 60)
            {
                IsVisible = false, 
                MinColumnWidth = 10
            };
            treeProcesses.Columns.Add(column);
            treeProcesses.NodeControls.Add(new Components.NodePlotter
            {
                DataPropertyName = "IoHistory",
                ParentColumn = column
            });

            treeProcesses.KeyDown += this.ProcessTree_KeyDown;
            treeProcesses.MouseDown += this.treeProcesses_MouseDown;
            treeProcesses.MouseUp += this.treeProcesses_MouseUp;
            treeProcesses.DoubleClick += this.treeProcesses_DoubleClick;

            nodeName.ToolTipProvider = _tooltipProvider = new ProcessToolTipProvider(this);

            // make it draw when we want it to draw :)
            treeProcesses.BeginUpdate();
        }
コード例 #6
0
ファイル: ProcessNode.cs プロジェクト: andyvand/ProcessHacker
        public string GetTooltipText(ProcessToolTipProvider provider)
        {
            int tickCount = Environment.TickCount;

            if (tickCount - _lastTooltipTickCount >= Settings.RefreshInterval)
            {
                _tooltipText = provider.GetToolTip(this);
                _lastTooltipTickCount = tickCount;
            }

            return _tooltipText;
        }