private void ComWorker_DisconnectMeasurer(object sender, EventArgs e) { comWorker.ChangedProbePoints -= ComWorker_ChangedProbePoints; comWorker.ChangeMeasurerState -= ComWorker_ChangeMeasurerState; ActivateUiWindow(); //TODO measurerWindow: show and set active DisconnectMeasurer?.Invoke(this, e); }
private void ComReader_LostConnection(object sender, EventArgs e) { MeasurerState = new MeasurerState(); BoardState = new BoardState(); DisconnectMeasurer?.Invoke(this, e); poolingTimer.Enabled = false; reconnectTimer.Enabled = true; msgParser.ChangedProbePoints -= MsgParser_ChangedProbePoints; msgParser.ChangeBtn -= MsgParser_ChangeBtn; msgParser.ChangeFirmwareVersion -= MsgParser_ChangeFirmwareVersion; msgParser.ChangeLimit -= MsgParser_ChangeLimit; msgParser.ChangeType -= MsgParser_ChangeType; }