コード例 #1
0
ファイル: Form1.cs プロジェクト: QuantAsylum/QA350
        /// <summary>
        /// Called when user selects the menu item to reflash
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void reflashToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //if (Hardware.IsConnected == false)
            //    return;

            // Bugbug: From here on out, redirect all console output to a listbox
            AcqTimer.Enabled       = false;
            LEDKickerTimer.Enabled = false;
            SetUsbStatus("Reflashing...");

            if (MessageBox.Show("You are about to reflash the firmware. If you proceed, it will take 3-4 minutes without any updates until the end. Proceed?", "Important!", MessageBoxButtons.OKCancel) != DialogResult.OK)
            {
                LEDKickerTimer.Enabled = true;
                AcqTimer.Enabled       = true;
                return;
            }

            AcqTimer.Enabled       = false;
            LEDKickerTimer.Enabled = false;
            Bootloader.EnterBootloader(FlashStatusUpdate);

            MessageBox.Show("Restart the application and replug the hardware");
            Close();
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: QuantAsylum/QA350
 /// <summary>
 /// A virgin device is a device with no executable code present. It's fresh from
 /// the factory.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void flashVirginDeviceToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Bootloader.EnterBootloader(FlashStatusUpdate);
     MessageBox.Show("Restart the application and replug the hardware");
     Close();
 }