void worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { txtBox_Text = (string)e.Result; textBox.Rtf = txtBox_Text; if (frmPixSettings.MavpixelVersion != null) { textBox.Rtf = txtBox_Text.Trim('}') + UpdateWorker.horizontalBarRtf + @"\par Checking for updates to Mavpixel firmware (v" + frmPixSettings.MavpixelVersion.ToString() + @")..\par}"; firmwareWorker = new FirmwareDownloader(); firmwareWorker.worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(firmwareWorkerCompleted); string url = "https://raw.githubusercontent.com/prickle/Mavpixel/master/versions.xml"; firmwareWorker.getVersions(url); } else { textBox.Rtf = txtBox_Text.Trim('}') + UpdateWorker.horizontalBarRtf + @"\par Please connect to Mavpixel to also check for firmware updates.\par}"; } }
//----------------------------------------------------------------------- //Utilities //Get version database private void getVersions() { string url = "https://raw.githubusercontent.com/prickle/Mavpixel/master/versions.xml"; downloader.getVersions(url); }