/// <summary> /// stops the timer when panel is no longer visible, and starts it again when it is. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void AllAlertsList_VisibleChanged(object sender, EventArgs e) { if (AllAlertsGrid.Visible) { ConnectionRefreshTimer_Tick(null, null); AllAlertsTimer.Start(); ConnectionRefreshTimer.Start(); } else { AllAlertsTimer.Stop(); ConnectionRefreshTimer.Stop(); } }
public ActivityViewerForm() { pm = new ProgramManager(); InitializeComponent(); //install any servers loaded in initialization into the UI pm.InitializeProgram(); foreach (ServerManager sm in pm.servers) { InstallExistingServer(sm); } foreach (DataGridViewTextBoxColumn col in ConnectionDataGrid.Columns) { if (col.HeaderText == "Connection") { col.ToolTipText = "Name of the server connection"; } else if (col.HeaderText == "IO Read KB") { col.ToolTipText = "Size of distinct input/output reads measured in KB for this connection"; } else if (col.HeaderText == "IO Write KB") { col.ToolTipText = "Size of distinct input/output writes measured in KB for this connection"; } else if (col.HeaderText == "Memory") { col.ToolTipText = "Size of the memory currently used by session"; } else if (col.HeaderText == "CPU") { col.ToolTipText = "Size of CPU usage consumed by the user"; } } EditInstanceOverview.Enabled = false; DeleteInstanceOverview.Enabled = false; AllAlertsDetailsButton.Enabled = false; AllAlertsTimer.Start(); }