private void SaveMenuItem_Click(object sender, EventArgs e) { try { m_backupManager.CreateBackup(m_firmwareFile, m_configuration.BackupCreationMode); if (m_firmware.IsEncrypted) { m_loader.SaveEncrypted(m_firmwareFile, m_firmware); } else if (m_firmware.IsEncrypted == false) { m_loader.SaveDecrypted(m_firmwareFile, m_firmware); } m_tabPages.ForEach(x => x.IsDirty = false); } catch (Exception ex) { InfoBox.Show("Unable to save firmware.\n{0}", ex.Message); } }
private void SaveEncryptedMenuItem_Click(object sender, EventArgs e) { OpenDialogAndSaveFirmwareOnOk((filePath, firmware) => m_loader.SaveEncrypted(filePath, firmware)); }