public void Stop() { routingStatusLabel.Text = "Stopped."; appButton.Enabled = false; mapper.onStateMsgChanged -= Mapper_onStateMsgChanged; mapper.stop(); mapper = null; }
public void Stop() { routingStatusLabel.Text = Properties.Resources.Stopped; appButton.Enabled = false; if (mapper != null) { mapper.onStateMsgChanged -= Mapper_onStateMsgChanged; mapper.stop(); mapper = null; } if (stats != null) { stats.Close(); stats = null; } }