Atmo.UI.DevEx.MainForm.barButtonItemFirmwareUpdateV2_ItemClick C# (CSharp) Method

barButtonItemFirmwareUpdateV2_ItemClick() private method

private barButtonItemFirmwareUpdateV2_ItemClick ( object sender, DevExpress e ) : void
sender object
e DevExpress
return void
        private void barButtonItemFirmwareUpdateV2_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if(!(_deviceConnection is UsbDaqConnection)) {
                MessageBox.Show("Device is not supported.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            try {
                timerQueryTime.Stop();
                timerLive.Stop();
                var patchForm = new PatcherForm2(_deviceConnection as UsbDaqConnection);
                patchForm.ShowDialog();
            }
            catch(Exception ex) {
                Log.Error("Firmware update failed.", ex);
            }
            finally {
                timerLive.Start();
                timerQueryTime.Start();
            }
        }
MainForm