private void pauseToolStripMenuItem_Click(object sender, EventArgs e) { if (isPaused) { return; } isPaused = true; pauseToolStripMenuItem.Checked = isPaused; logUpdater.Pause(); }
void StopCoreWorker(Action next) { bookKeeper?.Pause(); try { GetParent().InvokeEventOnCoreClosing(); v2rayCore.StopCore(); } finally { next?.Invoke(); } }
private void pauseToolStripMenuItem_Click(object sender, EventArgs e) { var pause = !pauseToolStripMenuItem.Checked; pauseToolStripMenuItem.Checked = pause; if (pause) { logDisplayer.Pause(); } else { logDisplayer.Run(); } }