private void refreshCPUTable() { CPUDataGrid.DataSource = myServer.ASMan.DataTableFromQuery(CPUQuery); foreach (DataGridViewTextBoxColumn col in CPUDataGrid.Columns) { col.ToolTipText = ActivityViewer.ProgramManager.GetToolTipText(col.HeaderText); } CPUDataGrid.AutoResizeColumns(); }
private void SnapshotCPUPanel_VisibleChanged(object sender, EventArgs e) { if (this.Visible) { if (myServer.dataRefreshInterval != 0) { RefreshCPUTimer.Interval = myServer.dataRefreshInterval; RefreshCPUTimer.Start(); } CPUDataGrid.AutoResizeColumns(); } else { if (myServer.dataRefreshInterval != 0) { RefreshCPUTimer.Stop(); } } }