public void LoadElf(String elfFileName) { parser = new ElfParser(elfFileName); variablesList = new MainVariablesList(parser); valuesUpdater.SetVariablesList(variablesList); PrintVariables(); this.Text = elfFileName; }
private void button1_Click_1(object sender, EventArgs e) { parser = new ElfParser(@"D:\Projects\MASS\MCU\Debug\SuspensionStand.elf"); variablesList = new MainVariablesList(parser); variablesList.UpdateVariable("cinADCDriver", null, "cinADCDriver"); variablesList.UpdateVariable("cinBatteryVoltageProvider", null, "cinBatteryVoltageProvider"); valuesUpdater.SetVariablesList(variablesList); PrintVariables(); }
private ElfBinary <object> LoadBinary(BinaryReader reader) { ElfBinary <object> binary; try { binary = ElfParser.ParseFile <object>(reader, loadedDataType); } catch (ElfContentNotFoundException) { MyMessageBox.Show(this, "The file is empty.", "TOK ELF Editor", MessageBoxResult.OK, MessageBoxButton.OK, MessageBoxImage.Information); // Load empty.elf Stream emptyElfStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("TOKElfTool.empty.elf"); return(LoadBinary(new BinaryReader(emptyElfStream !))); } return(binary); }
public MainVariablesList(ElfParser parser) { this.parser = parser; }