private void btnStop_Click(object sender, EventArgs e) { if (_engine.MiningMode == MiningModeEnum.Stopped) { return; } _engine.MiningMode = MiningModeEnum.Stopped; UpdateButtons(); _engine.RequestStop(); UpdateGrid(); }
private void MainWindow_FormClosing(object sender, FormClosingEventArgs e) { _engine.RequestStop(); _engine.Cleanup(); }