Example #1
0
        public void LoadElf(String elfFileName)
        {
            parser = new ElfParser(elfFileName);

            variablesList = new MainVariablesList(parser);

            valuesUpdater.SetVariablesList(variablesList);
            PrintVariables();

            this.Text = elfFileName;
        }
Example #2
0
        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();
        }
Example #3
0
        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);
        }
Example #4
0
 public MainVariablesList(ElfParser parser)
 {
     this.parser = parser;
 }