MissionPlanner.Sikradio.getFirmwareLocal C# (CSharp) Method

getFirmwareLocal() private method

private getFirmwareLocal ( ) : bool
return bool
        private bool getFirmwareLocal()
        {
            using (var openFileDialog1 = new OpenFileDialog())
            {
                openFileDialog1.Filter = "Firmware|*.hex;*.ihx;*.bin";
                openFileDialog1.RestoreDirectory = true;
                openFileDialog1.Multiselect = false;

                if (openFileDialog1.ShowDialog() == DialogResult.OK)
                {
                    try
                    {
                        File.Copy(openFileDialog1.FileName, firmwarefile, true);
                    }
                    catch (Exception ex)
                    {
                        CustomMessageBox.Show("Error copying file\n" + ex, "ERROR");
                        return false;
                    }
                    return true;
                }

                return false;
            }
        }