public MainWindow(string[] args) : this() { m_firmwareFile = NFEPaths.ValidateInputArgs(args); if (!string.IsNullOrEmpty(m_firmwareFile)) { Shown += (s, e) => { OpenFirmware(m_firmwareFile, fileName => m_loader.TryLoad(fileName, m_definitions)); }; } }
private void InitializeMruMenu() { RecentFirmwaresMenuItem.DropDownItems.Clear(); var counter = 1; foreach (var item in m_mruFirmwares.Items) { var mruItem = item; RecentFirmwaresMenuItem.DropDownItems.Add(counter++ + ". " + mruItem, OpenMenuItem.Image, (s, e) => { OpenFirmware(mruItem, fileName => m_loader.TryLoad(fileName, m_definitions)); }); } RecentFirmwaresMenuItem.Enabled = RecentFirmwaresMenuItem.DropDownItems.Count > 0; }
private void OpenMenuItem_Click(object sender, EventArgs e) { OpenDialogAndReadFirmwareOnOk(Consts.EncryptedOrDecrypted, fileName => m_loader.TryLoad(fileName, m_definitions)); }