// Get AVRDUDE version private void GetVersion() { version = ""; Launch("", CommandType.GET_VERSION, OutputTo.Log); WaitForExit(); if (outputLog != null) { string log = outputLog; int pos = log.IndexOf("avrdude version"); if (pos > -1) { log = log.Substring(pos); version = log.Substring(0, log.IndexOf(',')); } } OnVersionChange?.Invoke(this, EventArgs.Empty); }
private void GetVersion() { Version = ""; Launch("-V", CommandType.GET_VERSION, OutputTo.Log); WaitForExit(); if (outputLog != null) { string log = outputLog; int pos = log.IndexOf(EXECUTABLE_NAME_DFU_UTIL); if (pos > -1) { log = log.Substring(pos); Version = log.Substring(0, log.IndexOf("\r\n")); } } OnVersionChange?.Invoke(this, EventArgs.Empty); }