private void ResetDataflashButton_Click(object sender, EventArgs e)
 {
     try
     {
         m_connector.ResetDataflash();
         UpdateStatusLabel.Text = @"Dataflash has been reseted.";
     }
     catch (Exception ex)
     {
         InfoBox.Show("An error occured during dataflash reset.\n" + ex.Message);
     }
 }
        private void ResetButton_Click(object sender, EventArgs e)
        {
            if (!ValidateConnectionStatus())
            {
                return;
            }

            m_worker.RunWorkerAsync(new AsyncProcessWrapper(worker =>
            {
                try
                {
                    m_usbConnector.ResetDataflash();
                    m_dataflash = ReadDataflash(worker);
                    UpdateUI(() => InitializeWorkspaceFromDataflash(m_dataflash));
                }
                catch (Exception ex)
                {
                    s_logger.Warn(ex);
                    InfoBox.Show(GetErrorMessage("resetting settings"));
                }
            }));
        }