private void handleEnd(string msg, bool error) { activeDisplay = null; activeMode = false; btnPause.Checked = true; btnPause.Enabled = false; setToolbarState(); MessageBox.Show(msg, "End of session", MessageBoxButtons.OK, error ? MessageBoxIcon.Error : MessageBoxIcon.Information); }
private void lstLogs_DoubleClick(object sender, EventArgs e) { if (lstLogs.SelectedIndex == lstLogs.Items.Count - 1) { if (frmDisplay.activeDisplay.IsDisposed) { frmDisplay.activeDisplay = new frmDisplay(allLogs.Last()); frmDisplay.activeDisplay.Text = "Log #" + allLogs.Count + " (active)"; } frmDisplay.activeDisplay.Show(); if (frmDisplay.activeDisplay.WindowState == FormWindowState.Minimized) { frmDisplay.activeDisplay.WindowState = FormWindowState.Normal; } frmDisplay.activeDisplay.BringToFront(); } else { var disp = new frmDisplay(allLogs[lstLogs.SelectedIndex], false); disp.Text = lstLogs.SelectedItem.ToString(); disp.Show(); disp.BringToFront(); } }