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(); }
public string GetTooltipText(ProcessToolTipProvider provider) { int tickCount = Environment.TickCount; if (tickCount - _lastTooltipTickCount >= Settings.Instance.RefreshInterval) { _tooltipText = provider.GetToolTip(this); _lastTooltipTickCount = tickCount; } return(_tooltipText); }
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(); }
public string GetTooltipText(ProcessToolTipProvider provider) { int tickCount = Environment.TickCount; if (tickCount - _lastTooltipTickCount >= Settings.RefreshInterval) { _tooltipText = provider.GetToolTip(this); _lastTooltipTickCount = tickCount; } return _tooltipText; }