void Connection_eventResponseEEPROM(string response, ref RepetierHostExtender.basic.LogLevel level) { if (response.Contains("Z max")) { float.TryParse(response.Split(' ')[2], NumberStyles.Float, CultureInfo.InvariantCulture, out EEpromValue.Zmax); EEPROM_flag++; } else if (response.Contains("Tower X")) { float.TryParse(response.Split(' ')[2], NumberStyles.Float, CultureInfo.InvariantCulture, out EEpromValue.Tower[0]); EEPROM_flag++; } else if (response.Contains("Tower Y")) { float.TryParse(response.Split(' ')[2], NumberStyles.Float, CultureInfo.InvariantCulture, out EEpromValue.Tower[1]); EEPROM_flag++; } else if (response.Contains("Tower Z")) { float.TryParse(response.Split(' ')[2], NumberStyles.Float, CultureInfo.InvariantCulture, out EEpromValue.Tower[2]); EEPROM_flag++; } //Stop reccord if (EEPROM_flag >= 4) { EEPROM_flag = 0; //Remove event host.Connection.eventResponse -= Connection_eventResponseEEPROM; EEpromValue.initialised = true; } //Zmax update on advanced settings textZmax.Text = EEpromValue.Zmax.ToString(); }
private void Connection_eventResponse(string response, ref RepetierHostExtender.basic.LogLevel level) { // update position from analyzer lblPosX.Text = host.Connection.Analyzer.x.ToString(); lblPosY.Text = host.Connection.Analyzer.y.ToString(); lblPosZ.Text = host.Connection.Analyzer.z.ToString(); string h = host.Connection.extract(response, "Z-probe:"); if (h != null) { txtProbeMeasurment.Text = h; } }