diff --git a/ClassEditor.cs b/ClassEditor.cs index 858153b..e2ca1b0 100644 --- a/ClassEditor.cs +++ b/ClassEditor.cs @@ -16,6 +16,31 @@ internal class ClassEditor { + public List Ecus_Definitions_Compatible = new List(); + + //Variables for loaded rom definition + public List DefinitionsLocationsX = new List(); + public List DefinitionsLocationsY = new List(); + public List DefinitionsLocationsTable = new List(); + public List DefinitionsMathX = new List(); + public List DefinitionsMathY = new List(); + public List DefinitionsMathTable = new List(); + public List DefinitionsFormatX = new List(); + public List DefinitionsFormatY = new List(); + public List DefinitionsFormatTable = new List(); + public List DefinitionsIsSingleByteX = new List(); + public List DefinitionsIsSingleByteY = new List(); + public List DefinitionsIsSingleByteTable = new List(); + + public List DefinitionsName = new List(); + public List DefinitionsUnit1 = new List(); + public List DefinitionsUnit2 = new List(); + public List DefinitionsTableSize = new List(); + public List DefinitionsValueMin = new List(); + public List DefinitionsValueMax = new List(); + public List DefinitionsChangeAmount = new List(); + public List DefinitionsHeaders = new List(); + public List DefinitionsIsInverted = new List(); private Editortable Editortable_0; @@ -24,78 +49,34 @@ internal ClassEditor(ref Editortable Editortable_1) Editortable_0 = Editortable_1; } - /*public string smethod_0(ZipArchiveEntry zipArchiveEntry_0) - { - string text = ""; - using (Stream stream = zipArchiveEntry_0.Open()) - { - using (StreamReader streamReader = new StreamReader(stream, Encoding.GetEncoding("iso-8859-1"))) - { - text += streamReader.ReadToEnd(); - } - } - return text; - }*/ - public float smethod_1() { return Editortable.float_0; } - public string smethod_2(int int_232, int int_233, bool bool_5, bool bool_6) + public string ValueIncDec(int RowIndex, int CellIndex, bool Increasing, bool Multiply4x) { float num = this.smethod_1(); string format = "0"; - string text = Editortable_0.dataGridView_0.Rows[int_232].Cells[int_233].Value.ToString(); + string text = Editortable_0.dataGridView_0.Rows[RowIndex].Cells[CellIndex].Value.ToString(); if (text.Contains(".")) { format = "0.000"; } - if (bool_6) + if (Multiply4x) { num *= 4f; } - if (bool_5) + if (Increasing) { return (float.Parse(text) + num).ToString(format); } return (float.Parse(text) - num).ToString(format); } - public void smethod_3(KeyEventArgs keyEventArgs_0, int int_232) + public void IncDecreaseSelection(bool Decreasing, bool HoldShift) { - bool bool_ = false; - if (Control.ModifierKeys == Keys.Shift) - { - bool_ = true; - } - if (keyEventArgs_0.KeyCode == Keys.Delete || int_232 == 1) - { - int num = 0; - int num2 = 0; - int i = 0; - //if (Editortable_0.frmOBD2Scan_0 != null) - //{ - while (i < Editortable_0.dataGridView_0.Rows.Count) - { - if (Editortable_0.dataGridView_0.Rows[i].Cells[num2].Selected) - { - Editortable_0.dataGridView_0.Rows[i].Cells[num2].Value = 0; - } - if (num2 == Editortable_0.dataGridView_0.Columns.Count - 1) - { - num2 = 0; - i++; - } - else - { - num2++; - } - num++; - } - //} - } - if (keyEventArgs_0.KeyCode == Keys.W || int_232 == 2) + if (!Decreasing) { int num3 = 0; int num4 = 0; @@ -104,7 +85,7 @@ public void smethod_3(KeyEventArgs keyEventArgs_0, int int_232) { if (Editortable_0.dataGridView_0.Rows[j].Cells[num4].Selected) { - Editortable_0.dataGridView_0.Rows[j].Cells[num4].Value = this.smethod_2(j, num4, true, bool_); + Editortable_0.dataGridView_0.Rows[j].Cells[num4].Value = this.ValueIncDec(j, num4, true, HoldShift); } if (num4 == Editortable_0.dataGridView_0.Columns.Count - 1) { @@ -118,7 +99,7 @@ public void smethod_3(KeyEventArgs keyEventArgs_0, int int_232) num3++; } } - if (keyEventArgs_0.KeyCode == Keys.S || int_232 == 3) + else { int num5 = 0; int num6 = 0; @@ -127,7 +108,7 @@ public void smethod_3(KeyEventArgs keyEventArgs_0, int int_232) { if (Editortable_0.dataGridView_0.Rows[k].Cells[num6].Selected) { - Editortable_0.dataGridView_0.Rows[k].Cells[num6].Value = this.smethod_2(k, num6, false, bool_); + Editortable_0.dataGridView_0.Rows[k].Cells[num6].Value = this.ValueIncDec(k, num6, false, HoldShift); } if (num6 == Editortable_0.dataGridView_0.Columns.Count - 1) { @@ -141,6 +122,49 @@ public void smethod_3(KeyEventArgs keyEventArgs_0, int int_232) num5++; } } + } + + public void ShortcutsCommand(KeyEventArgs keyEventArgs_0, int int_232) + { + bool bool_ = false; + if (Control.ModifierKeys == Keys.Shift) + { + bool_ = true; + } + if (keyEventArgs_0.KeyCode == Keys.Delete || int_232 == 1) + { + int num = 0; + int num2 = 0; + int i = 0; + //if (Editortable_0.frmOBD2Scan_0 != null) + //{ + while (i < Editortable_0.dataGridView_0.Rows.Count) + { + if (Editortable_0.dataGridView_0.Rows[i].Cells[num2].Selected) + { + Editortable_0.dataGridView_0.Rows[i].Cells[num2].Value = 0; + } + if (num2 == Editortable_0.dataGridView_0.Columns.Count - 1) + { + num2 = 0; + i++; + } + else + { + num2++; + } + num++; + } + //} + } + if (keyEventArgs_0.KeyCode == Keys.W || int_232 == 2) + { + IncDecreaseSelection(false, bool_); + } + if (keyEventArgs_0.KeyCode == Keys.S || int_232 == 3) + { + IncDecreaseSelection(true, bool_); + } Class40 class40_0 = new Class40(); //this.smethod_4(200).ContinueWith(new Action(this.<> c.<> 9.method_0)); this.smethod_4(200, class40_0).ContinueWith(new Action(class40_0.method_0)); @@ -154,150 +178,80 @@ private Task smethod_4(int int_232, Class40 class40_0) return class40_0.taskCompletionSource_0.Task; } - public void smethod_5(string TableSize) + public void GetChanges() { - int[] array = new int[0]; - int[] tablearray = new int[0]; - bool Is1x20Table = false; + int num = this.SelectedROMLocation; + int multiplier = 2; + if (this.IsSingleByteX || this.IsSingleByteY || this.IsSingleByteTable) multiplier = 1; //############################### - if (TableSize == "10X20") + //Get all Tables values + for (int i = 0; i < this.BufferTableSize[1]; i++) { - int num = 2; - if (this.bool_3) num = 1; - int num2 = this.int_0; - array = new int[this.int_1 * num]; - for (int i = 0; i < this.int_1 * num; i++) + for (int k = 0; k < this.BufferTableSize[0]; k++) { - array[i] = (int)this.byte_0[num2]; - this.byte_0[num2] = (byte)this.int_219[i]; - num2++; + //calculate value inversed to make bytes + double ThisValue = double.Parse(Editortable_0.dataGridView_0.Rows[i].Cells[k].Value.ToString(), CultureInfo.InvariantCulture); + ThisValue = DoMath(ThisValue, BufferMath, true); + + if (multiplier == 2) + { + byte[] ThisBytesToChange = BitConverter.GetBytes((Int16) ThisValue); + if (ThisBytesToChange.Length <= 2) + { + BufferBytesArray[(i * 2)] = ThisBytesToChange[1]; + BufferBytesArray[(i * 2) + 1] = ThisBytesToChange[0]; + } + else + { + Editortable_0.GForm_Main_0.method_1("Modified Value doesn't return into '2bytes' format"); + } + } + else + { + byte ThisByteToChange = (byte) ThisValue; + BufferBytesArray[i] = ThisByteToChange; + } } - tablearray = this.int_219; - Is1x20Table = true; } - else + + byte[] array = new byte[this.SelectedTableSize * multiplier]; + for (int i = 0; i < this.SelectedTableSize * multiplier; i++) { - int num = this.int_0; - array = new int[this.int_1 * 2]; - for (int i = 0; i < this.int_1 * 2; i++) - { - array[i] = (int)this.byte_0[num]; - if (TableSize == "1X64") this.byte_0[num] = (byte)this.int_220[i]; - if (TableSize == "1X15") this.byte_0[num] = (byte)this.int_221[i]; - if (TableSize == "1X8") this.byte_0[num] = (byte)this.int_222[i]; - if (TableSize == "1X7") this.byte_0[num] = (byte)this.int_223[i]; - if (TableSize == "1X6") this.byte_0[num] = (byte)this.int_224[i]; - if (TableSize == "1X5") this.byte_0[num] = (byte)this.int_225[i]; - if (TableSize == "1X4") this.byte_0[num] = (byte)this.int_226[i]; - if (TableSize == "1X2") this.byte_0[num] = (byte)this.int_231[i]; - if (TableSize == "1X1") this.byte_0[num] = (byte)this.int_231[i]; - num++; - } - if (TableSize == "1X64") tablearray = this.int_220; - if (TableSize == "1X15") tablearray = this.int_221; - if (TableSize == "1X8") tablearray = this.int_222; - if (TableSize == "1X7") tablearray = this.int_223; - if (TableSize == "1X6") tablearray = this.int_224; - if (TableSize == "1X5") tablearray = this.int_225; - if (TableSize == "1X4") tablearray = this.int_226; - if (TableSize == "1X2") tablearray = this.int_231; - if (TableSize == "1X1") tablearray = this.int_231; + array[i] = this.byte_0[num + i]; + //Apply Changes + this.byte_0[num + i] = BufferBytesArray[i]; } + /*Console.WriteLine(BufferBytesArray[0].ToString("X2")); + Console.WriteLine(BufferBytesArray[1].ToString("X2")); + Console.WriteLine(array[0].ToString("X2")); + Console.WriteLine(array[1].ToString("X2"));*/ int num3 = 0; string text = null; - foreach (int num4 in tablearray) + foreach (int num4 in BufferBytesArray) { //if ((!this.bool_3 || num3 < 200) && num4.ToString() != array[num3].ToString()) - if (((Is1x20Table && (!this.bool_3 || num3 < 200)) || (!Is1x20Table)) && num4.ToString() != array[num3].ToString()) + //if (((Is1x20Table && (!this.IsSingleByteX || num3 < 200)) || (!Is1x20Table)) && num4.ToString() != array[num3].ToString()) + if (num4.ToString() != array[num3].ToString()) { - text = string.Concat(new string[] - { - text, - "Change at line: ", - num3.ToString(), - "[", - array[num3].ToString(), - " : ", - num4.ToString(), - "]", - Environment.NewLine - }); - Editortable_0.GForm_Main_0.method_1(string.Concat(new string[] - { - "Change at line: ", - num3.ToString(), - "[", - array[num3].ToString(), - " : ", - num4.ToString(), - "]" - })); + string BufText = "Change at line: " + num3.ToString() + "[" + array[num3].ToString("X2") + "->" + num4.ToString("X2") + "]"; + text = text + BufText + Environment.NewLine; + Editortable_0.GForm_Main_0.method_1(BufText); } num3++; } - this.string_3 = string.Concat(new string[] - { - this.string_3, - "Table: ", - TableSize, - Environment.NewLine, - "Address: ", - this.int_0.ToString(), - Environment.NewLine, - text - }); + this.string_3 = this.string_3 + "Address: " + this.SelectedROMLocation.ToString() + Environment.NewLine + text; + //this.string_3 = this.string_3 + "Table: " + TableSize + Environment.NewLine + "Address: " + this.SelectedROMLocation.ToString() + Environment.NewLine + text; } - public void smethod_15(string string_4) + public void SaveROMBytes(string string_4) { try { - if (this.bool_2 && this.int_1 != 0 && this.int_0 != 0) + if (this.bool_2 && this.SelectedTableSize != 0 && this.SelectedROMLocation != 0) { - if (this.int_1 == 200) - { - this.smethod_5("10X20"); - } - else if (this.int_1 == 64) - { - this.smethod_5("1X64"); - } - else if (this.int_1 == 15) - { - this.smethod_5("1X15"); - } - else if (this.int_1 == 8) - { - this.smethod_5("1X8"); - } - else if (this.int_1 == 7) - { - this.smethod_5("1X7"); - //this.smethod_5("1X5"); - } - else if (this.int_1 == 6) - { - this.smethod_5("1X6"); - //this.smethod_5("1X5"); - } - else if (this.int_1 == 5) - { - this.smethod_5("1X5"); - } - else if (this.int_1 == 4) - { - this.smethod_5("1X4"); - } - else if (this.int_1 == 2) - { - this.smethod_5("1X2"); - } - else if (this.int_1 == 1) - { - this.smethod_5("1X1"); - } + this.GetChanges(); this.string_2 = this.string_2 + this.string_3 + Environment.NewLine; } this.bool_2 = false; @@ -305,7 +259,7 @@ public void smethod_15(string string_4) //################################################ byte[] SavingBytes = this.byte_0; - //Remove fake bootloader section + //Remove fake bootloader section if it's a partial firmware .bin file if (!this.Editortable_0.IsFullBinary) { byte[] BufferBytes = new byte[SavingBytes.Length - 0x8000]; @@ -344,105 +298,216 @@ public void smethod_15(string string_4) } } - public void smethod_16(int[] int_232, int int_233, string string_4, string string_5, string[] string_6, Editortable.GEnum2 genum2_0, bool bool_5) + public void SetTableValues(int[] TableSize, int ROMLocationX, string TopLeftString, string RowHeaderString, string[] HeaderStringList, string ThisMathX, string ThisFormatX, bool IsInverted, int ROMLocationTable, string ThisMathTable, string ThisTableFormat) { try { - this.int_1 = int_232[0] * int_232[1]; - this.int_0 = int_233; + this.SelectedTableSize = TableSize[0] * TableSize[1]; + this.SelectedROMLocation = ROMLocationX; + BufferMath = ThisMathX; + BufferValuesArray = new int[SelectedTableSize]; + BufferTableSize = TableSize; + Editortable_0.dataGridView_0.Rows.Clear(); Editortable_0.dataGridView_0.Columns.Clear(); Editortable_0.dataGridView_0.RowTemplate.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; - Editortable_0.dataGridView_0.TopLeftHeaderCell.Value = string_4; - if (bool_5) + Editortable_0.dataGridView_0.TopLeftHeaderCell.Value = TopLeftString; + Editortable_0.dataGridView_0.AllowUserToAddRows = false; + + //Correct the Table Orientation if Bad + if ((TableSize[1] == 1 && IsInverted) || (TableSize[0] == 1 && !IsInverted)) { - Editortable_0.dataGridView_0.ColumnCount = int_232[0]; - for (int i = 0; i < int_232[1]; i++) - { - Editortable_0.dataGridView_0.Rows.Add(new object[] - { - this.smethod_18(int_233 + i * 2).ToString() - }); - Editortable_0.dataGridView_0.Rows[i].HeaderCell.Value = string_6[i].ToString(); - } + int Buf0 = TableSize[1]; + int Buf1 = TableSize[0]; + TableSize[0] = Buf0; + TableSize[1] = Buf1; } - else + + //Check if table size have more than 1x roms (or 1column if inverted) ... aka if it's a 3D table + bool IsMultiTable = false; + if (TableSize[1] > 1 && !IsInverted) IsMultiTable = true; + if (TableSize[0] > 1 && IsInverted) IsMultiTable = true; + + if (IsMultiTable) { - for (int j = 0; j < int_232[0]; j++) - { - Editortable_0.dataGridView_0.Columns.Add(string_6[j].ToString(), string_6[j].ToString()); - } - List list = new List(); - if (genum2_0 == Editortable.GEnum2.LAF_VOLTAGE) + SelectedROMLocation = ROMLocationTable; + BufferMath = ThisMathTable; + + //Apply Columns(Y) + if (IsInverted) { - for (int k = 0; k < int_232[0]; k++) + for (int i = 0; i < TableSize[1]; i++) { - ushort num = (ushort)this.smethod_18(int_233 + k * 2); - list.Add((32767f / (float)num).ToString("0.00")); + double num = 0; + if (IsSingleByteX) num = (double)this.GetSingleByteValue(ROMLocationX + i); + else num = (double)this.GetIntValue(ROMLocationX + i * 2); + + string HeaderStr = ""; + if (ThisFormatX != "") HeaderStr = DoMath(num, ThisMathX, false).ToString(ThisFormatX); + if (ThisFormatX == "") HeaderStr = DoMath(num, ThisMathX, false).ToString(); + Editortable_0.dataGridView_0.Columns.Add(HeaderStr, HeaderStr); } } else { - if (genum2_0 != Editortable.GEnum2.INJ_DEADTIME) + for (int j = 0; j < TableSize[0]; j++) Editortable_0.dataGridView_0.Columns.Add(HeaderStringList[j], HeaderStringList[j]); + } + + int index = 0; + while (true) + { + if (index >= SelectedTableSize) // More than TableSize (ex: 10x20.. more than 200) { - if (genum2_0 != Editortable.GEnum2.MIN_IPW) + int[,] numArray2 = smethod_35(BufferValuesArray, TableSize[0], TableSize[1]); + int rowIndex = 0; + while (true) { - if (genum2_0 == Editortable.GEnum2.WOT_MAP) + if ((rowIndex >= TableSize[1] && !IsInverted) || (rowIndex >= TableSize[0] && IsInverted)) //More than Y (make the 3D table) { - for (int l = 0; l < int_232[0]; l++) + int num10 = 0; + while (true) { - ushort num2 = (ushort)this.smethod_18(int_233 + l * 2); - list.Add(((double)num2 * 0.01).ToString("0.00")); + if ((num10 >= TableSize[1] && !IsInverted) || (num10 >= TableSize[0] && IsInverted)) //Another More than Y (set X Header) + { + if (!IsInverted) SetBackColor(TableSize[0], Editortable.float_1[0], Editortable.float_1[1]); + if (IsInverted) SetBackColor(TableSize[1], Editortable.float_1[0], Editortable.float_1[1]); + break; + } + //Rows(X) Math + if (IsInverted) + { + Editortable_0.dataGridView_0.Rows[num10].HeaderCell.Value = HeaderStringList[num10]; + } + else + { + double num = 0; + if (IsSingleByteX) num = (double)this.GetSingleByteValue(ROMLocationX + num10); + else num = (double)this.GetIntValue(ROMLocationX + num10 * 2); + if (ThisFormatX != "") Editortable_0.dataGridView_0.Rows[num10].HeaderCell.Value = DoMath(num, ThisMathX, false).ToString(ThisFormatX); + if (ThisFormatX == "") Editortable_0.dataGridView_0.Rows[num10].HeaderCell.Value = DoMath(num, ThisMathX, false).ToString(); + } + num10++; } - goto IL_258; + break; } - if (genum2_0 == Editortable.GEnum2.THROTTLE_REQ) + + //TableMath (Get full 1full row of value at a time) + object[] values = new object[0]; + if (IsInverted) { - for (int m = 0; m < int_232[0]; m++) + values = new object[TableSize[1]]; + for (int i = 0; i < TableSize[1]; i++) { - ushort num3 = (ushort)this.smethod_18(int_233 + m * 2); - list.Add(((double)num3 * 0.005).ToString("0.00")); + if (ThisTableFormat != "") values[i] = DoMath((double)numArray2[rowIndex, i], ThisMathTable, false).ToString(ThisTableFormat); + if (ThisTableFormat == "") values[i] = DoMath((double)numArray2[rowIndex, i], ThisMathTable, false).ToString(); } - goto IL_258; } - for (int n = 0; n < int_232[0]; n++) + else { - list.Add(this.smethod_18(int_233 + n * 2).ToString()); + values = new object[TableSize[0]]; + for (int i = 0; i < TableSize[0]; i++) + { + if (ThisTableFormat != "") values[i] = DoMath((double)numArray2[i, rowIndex], ThisMathTable, false).ToString(ThisTableFormat); + if (ThisTableFormat == "") values[i] = DoMath((double)numArray2[i, rowIndex], ThisMathTable, false).ToString(); + } } - goto IL_258; + Editortable_0.dataGridView_0.Rows.Insert(rowIndex, values); + rowIndex++; } + break; } - for (int num4 = 0; num4 < int_232[0]; num4++) + + //Math perfomed just above + if (IsSingleByteTable) BufferValuesArray[index] = GetSingleByteValue(SelectedROMLocation + index); + else BufferValuesArray[index] = GetIntValue(SelectedROMLocation + (index * 2)); + + index++; + } + } + //############################################## + else + { + if (IsSingleByteX) BufferBytesArray = new byte[SelectedTableSize]; + else BufferBytesArray = new byte[SelectedTableSize * 2]; + + //Normal 'single' table + if (IsInverted) + { + for (int i = 0; i < TableSize[0]; i++) Editortable_0.dataGridView_0.Columns.Add(RowHeaderString, RowHeaderString); + + for (int i = 0; i < TableSize[1]; i++) { - ushort num5 = (ushort)this.smethod_18(int_233 + num4 * 2); - list.Add(((double)num5 * 0.002).ToString("0.000")); + double num = 0; + if (IsSingleByteX) + { + num = (double)this.GetSingleByteValue(ROMLocationX + i); + BufferBytesArray[i] = byte_0[ROMLocationX + i]; + } + else + { + num = (double)this.GetIntValue(ROMLocationX + i * 2); + BufferBytesArray[(i * 2)] = byte_0[ROMLocationX + (i * 2)]; + BufferBytesArray[(i * 2) + 1] = byte_0[ROMLocationX + (i * 2) + 1]; + } + + BufferValuesArray[i] = (int) num; + + double FinalValue = DoMath(num, ThisMathX, false); + + if (ThisFormatX == "") Editortable_0.dataGridView_0.Rows.Add(new object[] { FinalValue.ToString() }); + if (ThisFormatX != "") Editortable_0.dataGridView_0.Rows.Add(new object[] { FinalValue.ToString(ThisFormatX) }); + + Editortable_0.dataGridView_0.Rows[i].HeaderCell.Value = HeaderStringList[i]; } } - IL_258: - Editortable_0.dataGridView_0.Rows.Add(); - for (int num6 = 0; num6 < int_232[0]; num6++) + if (!IsInverted) { - DataGridViewRow dataGridViewRow = Editortable_0.dataGridView_0.Rows[0]; - dataGridViewRow.Cells[num6].Value = list[num6]; + for (int j = 0; j < TableSize[0]; j++) Editortable_0.dataGridView_0.Columns.Add(HeaderStringList[j], HeaderStringList[j]); + List list = new List(); + + //################################################################################################################ + for (int k = 0; k < TableSize[0]; k++) + { + double num = 0; + if (IsSingleByteX) + { + num = (double)this.GetSingleByteValue(ROMLocationX + k); + BufferBytesArray[k] = byte_0[ROMLocationX + k]; + } + else + { + num = (double)this.GetIntValue(ROMLocationX + k * 2); + BufferBytesArray[(k * 2)] = byte_0[ROMLocationX + (k * 2)]; + BufferBytesArray[(k * 2) + 1] = byte_0[ROMLocationX + (k * 2) + 1]; + } + BufferValuesArray[k] = (int) num; + + if (ThisFormatX == "") list.Add(DoMath(num, ThisMathX, false).ToString()); + if (ThisFormatX != "") list.Add(DoMath(num, ThisMathX, false).ToString(ThisFormatX)); + } + //################################################################################################################ + + Editortable_0.dataGridView_0.Rows.Add(); + for (int num6 = 0; num6 < TableSize[0]; num6++) + { + DataGridViewRow dataGridViewRow = Editortable_0.dataGridView_0.Rows[0]; + dataGridViewRow.Cells[num6].Value = list[num6]; + } + Editortable_0.dataGridView_0.Rows[0].HeaderCell.Value = RowHeaderString; } - Editortable_0.dataGridView_0.Rows[0].HeaderCell.Value = string_5; } - Editortable_0.dataGridView_0.AllowUserToAddRows = false; foreach (object obj in Editortable_0.dataGridView_0.Columns) { DataGridViewColumn dataGridViewColumn = (DataGridViewColumn)obj; dataGridViewColumn.SortMode = DataGridViewColumnSortMode.NotSortable; - dataGridViewColumn.Width = 50; + //dataGridViewColumn.Width = 50; } - if (!bool_5) + foreach (object obj2 in ((IEnumerable)Editortable_0.dataGridView_0.Rows)) { - foreach (object obj2 in ((IEnumerable)Editortable_0.dataGridView_0.Rows)) - { - DataGridViewRow dataGridViewRow2 = (DataGridViewRow)obj2; - dataGridViewRow2.Height = 20; - } + DataGridViewRow dataGridViewRow2 = (DataGridViewRow)obj2; + dataGridViewRow2.Height = 20; } - this.smethod_33(int_232[0], Editortable.float_1[0], Editortable.float_1[1]); + this.SetBackColor(TableSize[0], Editortable.float_1[0], Editortable.float_1[1]); this.bool_0 = true; } catch (Exception ex) @@ -452,73 +517,305 @@ public void smethod_16(int[] int_232, int int_233, string string_4, string strin } } - public bool smethod_17(string string_4) + private int GetNearestMathIndex(string ThisMath) { - if (File.Exists(string_4)) + int IndexOfNearest = -1; + int IndexOfMathDiv = ThisMath.IndexOf('/'); + int IndexOfMathMul = ThisMath.IndexOf('*'); + int IndexOfMathAdd = ThisMath.IndexOf('+'); + //int IndexOfMathSub = ThisMath.IndexOf('-'); //don't check for sub, this is causing issue with negative number + + if (IndexOfMathDiv == 0) return 0; + if (IndexOfMathMul == 0) return 0; + if (IndexOfMathAdd == 0) return 0; + //if (IndexOfMathSub == 0) return 0; + + if (IndexOfMathDiv == -1) IndexOfMathDiv = 99; + if (IndexOfMathMul == -1) IndexOfMathMul = 99; + if (IndexOfMathAdd == -1) IndexOfMathAdd = 99; + //if (IndexOfMathSub == -1) IndexOfMathSub = 99; + + /*if (IndexOfMathDiv > 0 && IndexOfMathDiv < IndexOfMathMul && IndexOfMathDiv < IndexOfMathAdd && IndexOfMathDiv < IndexOfMathSub) IndexOfNearest = IndexOfMathDiv; + if (IndexOfMathMul > 0 && IndexOfMathMul < IndexOfMathDiv && IndexOfMathMul < IndexOfMathAdd && IndexOfMathMul < IndexOfMathSub) IndexOfNearest = IndexOfMathMul; + if (IndexOfMathAdd > 0 && IndexOfMathAdd < IndexOfMathMul && IndexOfMathAdd < IndexOfMathDiv && IndexOfMathAdd < IndexOfMathSub) IndexOfNearest = IndexOfMathAdd; + if (IndexOfMathSub > 0 && IndexOfMathSub < IndexOfMathMul && IndexOfMathSub < IndexOfMathAdd && IndexOfMathSub < IndexOfMathDiv) IndexOfNearest = IndexOfMathSub;*/ + if (IndexOfMathDiv > 0 && IndexOfMathDiv < IndexOfMathMul && IndexOfMathDiv < IndexOfMathAdd) IndexOfNearest = IndexOfMathDiv; + if (IndexOfMathMul > 0 && IndexOfMathMul < IndexOfMathDiv && IndexOfMathMul < IndexOfMathAdd) IndexOfNearest = IndexOfMathMul; + if (IndexOfMathAdd > 0 && IndexOfMathAdd < IndexOfMathMul && IndexOfMathAdd < IndexOfMathDiv) IndexOfNearest = IndexOfMathAdd; + + if (IndexOfNearest == 99) IndexOfNearest = -1; + + return IndexOfNearest; + } + + private char GetNextMath(string ThisMath) + { + int Thisindex = GetNearestMathIndex(ThisMath); + return ThisMath.Substring(Thisindex, 1)[0]; + } + + private double GetNextValue(string ThisMath) + { + double Value = 0; + //bool IsNegative = false; + + int Nearestindex = GetNearestMathIndex(ThisMath); + if (Nearestindex == 0) { - try + /*if (ThisMath[0] == '-') { - this.byte_0 = File.ReadAllBytes(string_4); + IsNegative = true; + ThisMath = ThisMath.Substring(1); + Nearestindex = GetNearestMathIndex(ThisMath); + } + else + {*/ + ThisMath = ThisMath.Substring(1); + //} + } + //Nearestindex = GetNearestMathIndex(ThisMath); - //Create a fake bootloader section - if (!Editortable_0.IsFullBinary) - { - byte[] BufferBytes = new byte[0x8000 + this.byte_0.Length]; - for (int i = 0; i < 0x8000; i++) BufferBytes[i] = 0xff; - for (int i = 0; i < this.byte_0.Length; i++) BufferBytes[0x8000 + i] = this.byte_0[i]; + if (Nearestindex == -1) + { + Value = double.Parse(ThisMath, CultureInfo.InvariantCulture); + } + else + { + string ThisVarStr = ThisMath.Substring(0, Nearestindex); + Value = double.Parse(ThisVarStr, CultureInfo.InvariantCulture); + } - this.byte_0 = BufferBytes; - } + //if (IsNegative) Value = -Value; - //Get ECU filename (33 37 38 30 35 2D -> 37805- 'in ASCII chars') (37805-RRB-A140) - this.string_0 = ""; - for (int i = 0; i < this.byte_0.Length; i++) - { - if (this.byte_0[i] == 0x33 && - this.byte_0[i + 1] == 0x37 && - this.byte_0[i + 2] == 0x38 && - this.byte_0[i + 3] == 0x30 && - (this.byte_0[i + 4] == 0x35 || this.byte_0[i + 4] == 0x36) && - this.byte_0[i + 5] == 0x2D) - { - for (int i2 = 0; i2 < 14; i2++) - { - this.string_0 += (char)this.byte_0[i + i2]; - } - break; - } - } - return true; + return Value; + } - /*this.string_0 = array[0]; //37805-RRB-A140 - this.string_1 = array[1]; //Unused + public string InvertMathString(string ThisMath) + { + string ReturnStr = ""; + List ValuesList = new List(); + List MathFuncList = new List(); + bool WeHaveVal1 = false; + while (ThisMath != "") + { + if (!WeHaveVal1) ValuesList.Add(GetNextValue(ThisMath)); + MathFuncList.Add(GetNextMath(ThisMath)); + ThisMath = ThisMath.Substring(GetNearestMathIndex(ThisMath) + 1); + ValuesList.Add(GetNextValue(ThisMath)); - using (FileStream fileStream = new FileStream(string_4, FileMode.Open)) - { - using (ZipArchive zipArchive = new ZipArchive(fileStream, ZipArchiveMode.Read)) - { - foreach (ZipArchiveEntry zipArchiveEntry in zipArchive.Entries) - { - if (zipArchiveEntry.Name == "CALID") - { - //string[] array = File.ReadAllLines(Application.StartupPath + @"\CALID\" + string_4); - string[] array = this.smethod_0(zipArchiveEntry).Split(new string[] - { - Environment.NewLine - }, StringSplitOptions.None); - this.string_0 = array[0]; - this.string_1 = array[1]; - foreach (ZipArchiveEntry zipArchiveEntry2 in zipArchive.Entries) - { - if (zipArchiveEntry2.Name == "CLOG") - { - this.string_2 = this.smethod_0(zipArchiveEntry2); - } - if (zipArchiveEntry2.Name == array[1]) - { - using (Stream stream = zipArchiveEntry2.Open()) - { - using (BinaryReader binaryReader = new BinaryReader(stream)) + int NearestIndex = GetNearestMathIndex(ThisMath); + if (NearestIndex != -1) ThisMath = ThisMath.Substring(GetNearestMathIndex(ThisMath) + 1); + + WeHaveVal1 = true; + + //if (!ThisMath.Contains("/") && !ThisMath.Contains("*") && !ThisMath.Contains("+") && !ThisMath.Contains("-")) + if (!ThisMath.Contains("/") && !ThisMath.Contains("*") && !ThisMath.Contains("+")) + { + ThisMath = ""; //No remaining maths to perform + } + } + + //Create inverted math function + for (int i = ValuesList.Count - 1; i >= 0; i--) + { + ReturnStr = ReturnStr + ValuesList[i]; + if (i > 0) + { + if (MathFuncList[i - 1] == '*') ReturnStr = ReturnStr + "/"; + if (MathFuncList[i - 1] == '/') ReturnStr = ReturnStr + "*"; + if (MathFuncList[i - 1] == '+') ReturnStr = ReturnStr + "+-"; + } + } + + return ReturnStr; + } + + public double DoMath(double ThisValue, string ThisMath, bool Reverse) + { + double ReturnVal = ThisValue; + + //No Math found, return value with no math calculation + if (ThisMath == "X" || ThisMath == "") return ReturnVal; + + //Put X at the end + if (Reverse) + { + if (ThisMath[ThisMath.Length - 1] != 'X') + { + string XandMath = ThisMath.Substring(ThisMath.IndexOf('X'), 2); + ThisMath = ThisMath.Replace(XandMath, "") + XandMath[1].ToString() + XandMath[0].ToString(); + } + } + + ThisMath = ThisMath.Replace("X", ThisValue.ToString()); + + //128/X*14.7 + //12/34*14.7 + //--- + //14.7/X*128 + if (Reverse) ThisMath = InvertMathString(ThisMath); + //if (Reverse) Console.WriteLine(ThisMath); + + bool WeHaveVal1 = false; + double Val1 = 0; + while (ThisMath != "") + { + if (!WeHaveVal1) Val1 = GetNextValue(ThisMath); + char MathChar = GetNextMath(ThisMath); + ThisMath = ThisMath.Substring(GetNearestMathIndex(ThisMath) + 1); + double Val2 = GetNextValue(ThisMath); + + if (MathChar == '*') ReturnVal = Val1 * Val2; + if (MathChar == '/') ReturnVal = Val1 / Val2; + if (MathChar == '+') ReturnVal = Val1 + Val2; + if (MathChar == '-') ReturnVal = Val1 - Val2; + + int NearestIndex = GetNearestMathIndex(ThisMath); + if (NearestIndex != -1) ThisMath = ThisMath.Substring(GetNearestMathIndex(ThisMath) + 1); + + WeHaveVal1 = true; + Val1 = ReturnVal; + + //Check for remaining maths + //if (!ThisMath.Contains("/") && !ThisMath.Contains("*") && !ThisMath.Contains("+") && !ThisMath.Contains("-")) + if (!ThisMath.Contains("/") && !ThisMath.Contains("*") && !ThisMath.Contains("+")) + { + ThisMath = ""; //No remaining maths to perform + } + } + //if (Reverse) Console.WriteLine(ReturnVal); + return ReturnVal; + } + + public string[] GetAdvancedHeader(int ValuesCount, int ThisLocation, string ThisMath, string HeaderFormat) + { + string[] strArray = new string[ValuesCount]; + for (int i = 0; i < ValuesCount; i++) + { + int Valuue = 0; + if (IsSingleByteY) Valuue = GetSingleByteValue(ThisLocation + i); + else Valuue = GetIntValue(ThisLocation + (i * 2)); + + if (HeaderFormat == "") strArray[i] = DoMath((double) Valuue, ThisMath, false).ToString(); + if (HeaderFormat != "") strArray[i] = DoMath((double) Valuue, ThisMath, false).ToString(HeaderFormat); + } + return strArray; + } + + public byte[] StringToByteArray(string hex) + { + return Enumerable.Range(0, hex.Length) + .Where(x => x % 2 == 0) + .Select(x => Convert.ToByte(hex.Substring(x, 2), 16)) + .ToArray(); + } + + /*public Int16 ToInt16BE(byte[] TwoBytes) + { + Int16 k0 = BitConverter.ToInt16(TwoBytes, 0); + Int16 k1 = BitConverter.ToInt16(BitConverter.GetBytes(k0).Reverse().ToArray(), 0); + return k1; + } + + public Int32 ToInt32BE(byte[] FourBytes) + { + Int32 k0 = BitConverter.ToInt32(FourBytes, 0); + Int32 k1 = BitConverter.ToInt32(BitConverter.GetBytes(k0).Reverse().ToArray(), 0); + return k1; + }*/ + + public int HexStringToInt(string hex) + { + string ThisStr = hex.Replace("0x", ""); + if (ThisStr.Length == 1 || ThisStr.Length == 3 || ThisStr.Length == 5 || ThisStr.Length == 7) + { + ThisStr = "0" + ThisStr; + } + byte[] ThisBytes = StringToByteArray(ThisStr); + Array.Reverse(ThisBytes); + + //Add Empty Bytes + if (ThisBytes.Length == 3) + { + byte[] buffArray = new byte[4]; + buffArray[3] = 0; + for (int i = 0; i < ThisBytes.Length; i++) buffArray[i] = ThisBytes[i]; + ThisBytes = buffArray; + } + + if (ThisBytes.Length == 2) return BitConverter.ToUInt16(ThisBytes, 0); + if (ThisBytes.Length == 4) return BitConverter.ToInt32(ThisBytes, 0); + //if (ThisBytes.Length == 8) return BitConverter.ToUInt64(ThisBytes, 0); + return 0; + } + + public bool LoadROMbytes(string string_4) + { + if (File.Exists(string_4)) + { + try + { + this.byte_0 = File.ReadAllBytes(string_4); + + //Create a fake bootloader section + if (!Editortable_0.IsFullBinary) + { + byte[] BufferBytes = new byte[0x8000 + this.byte_0.Length]; + for (int i = 0; i < 0x8000; i++) BufferBytes[i] = 0xff; + for (int i = 0; i < this.byte_0.Length; i++) BufferBytes[0x8000 + i] = this.byte_0[i]; + + this.byte_0 = BufferBytes; + } + + //Get ECU filename (33 37 38 30 35 2D -> 37805- 'in ASCII chars') (37805-RRB-A140) + this.string_ECU_Name = ""; + for (int i = 0; i < this.byte_0.Length; i++) + { + if (this.byte_0[i] == 0x33 && + this.byte_0[i + 1] == 0x37 && + this.byte_0[i + 2] == 0x38 && + this.byte_0[i + 3] == 0x30 && + (this.byte_0[i + 4] == 0x35 || this.byte_0[i + 4] == 0x36) && + this.byte_0[i + 5] == 0x2D) + { + for (int i2 = 0; i2 < 14; i2++) + { + this.string_ECU_Name += (char)this.byte_0[i + i2]; + } + break; + } + } + return true; + + /*this.string_0 = array[0]; //37805-RRB-A140 + this.string_1 = array[1]; //Unused + + using (FileStream fileStream = new FileStream(string_4, FileMode.Open)) + { + using (ZipArchive zipArchive = new ZipArchive(fileStream, ZipArchiveMode.Read)) + { + foreach (ZipArchiveEntry zipArchiveEntry in zipArchive.Entries) + { + if (zipArchiveEntry.Name == "CALID") + { + //string[] array = File.ReadAllLines(Application.StartupPath + @"\CALID\" + string_4); + string[] array = this.smethod_0(zipArchiveEntry).Split(new string[] + { + Environment.NewLine + }, StringSplitOptions.None); + this.string_0 = array[0]; + this.string_1 = array[1]; + foreach (ZipArchiveEntry zipArchiveEntry2 in zipArchive.Entries) + { + if (zipArchiveEntry2.Name == "CLOG") + { + this.string_2 = this.smethod_0(zipArchiveEntry2); + } + if (zipArchiveEntry2.Name == array[1]) + { + using (Stream stream = zipArchiveEntry2.Open()) + { + using (BinaryReader binaryReader = new BinaryReader(stream)) { this.byte_0 = binaryReader.ReadBytes((int)zipArchiveEntry2.Length); return true; @@ -542,165 +839,411 @@ public bool smethod_17(string string_4) return false; } - public int smethod_18(int int_232) + public int GetIntValue(int int_232) { return (int)((short)((int)this.byte_0[int_232] << 8 | (int)this.byte_0[int_232 + 1])); } - public int smethod_19(int int_232) + public int GetSingleByteValue(int int_232) { return (int)this.byte_0[int_232]; } - public bool smethod_21() + public void SetBackColor(int int_232, float float_0, float float_1) { - int num = 0; - int num2 = 2; - bool flag = false; - string[] array = new string[200]; - if (this.bool_3) + for (int i = 0; i < int_232; i++) { - num2 = 1; + foreach (object obj in ((IEnumerable)Editortable_0.dataGridView_0.Rows)) + { + DataGridViewRow dataGridViewRow = (DataGridViewRow)obj; + try + { + float float_2 = float.Parse(dataGridViewRow.Cells[i].Value.ToString()); + dataGridViewRow.Cells[i].Style.BackColor = this.GetColor(float_2, float_1, float_0); + } + catch + { + dataGridViewRow.Cells[i].Style.BackColor = System.Drawing.SystemColors.ControlLight; + //dataGridViewRow.Cells[i].Style.BackColor = Color.White; + } + } } - if (Editortable_0.dataGridView_0.ColumnCount == 20) + } + + public Color GetColor(float float_0, float float_1, float float_2) + { + Color result; + try { - flag = true; - int num3 = 0; - for (int i = 0; i < Editortable_0.dataGridView_0.RowCount; i++) + int num = (int)(1023f * (float_0 - float_1) / (float_2 - float_1)); + if (num < 256) { - array[num3] = Editortable_0.dataGridView_0.Rows[i].Cells[0].Value.ToString(); - array[num3 + 1] = Editortable_0.dataGridView_0.Rows[i].Cells[1].Value.ToString(); - array[num3 + 2] = Editortable_0.dataGridView_0.Rows[i].Cells[2].Value.ToString(); - array[num3 + 3] = Editortable_0.dataGridView_0.Rows[i].Cells[3].Value.ToString(); - array[num3 + 4] = Editortable_0.dataGridView_0.Rows[i].Cells[4].Value.ToString(); - array[num3 + 5] = Editortable_0.dataGridView_0.Rows[i].Cells[5].Value.ToString(); - array[num3 + 6] = Editortable_0.dataGridView_0.Rows[i].Cells[6].Value.ToString(); - array[num3 + 7] = Editortable_0.dataGridView_0.Rows[i].Cells[7].Value.ToString(); - array[num3 + 8] = Editortable_0.dataGridView_0.Rows[i].Cells[8].Value.ToString(); - array[num3 + 9] = Editortable_0.dataGridView_0.Rows[i].Cells[9].Value.ToString(); - array[num3 + 10] = Editortable_0.dataGridView_0.Rows[i].Cells[10].Value.ToString(); - array[num3 + 11] = Editortable_0.dataGridView_0.Rows[i].Cells[11].Value.ToString(); - array[num3 + 12] = Editortable_0.dataGridView_0.Rows[i].Cells[12].Value.ToString(); - array[num3 + 13] = Editortable_0.dataGridView_0.Rows[i].Cells[13].Value.ToString(); - array[num3 + 14] = Editortable_0.dataGridView_0.Rows[i].Cells[14].Value.ToString(); - array[num3 + 15] = Editortable_0.dataGridView_0.Rows[i].Cells[15].Value.ToString(); - array[num3 + 16] = Editortable_0.dataGridView_0.Rows[i].Cells[16].Value.ToString(); - array[num3 + 17] = Editortable_0.dataGridView_0.Rows[i].Cells[17].Value.ToString(); - array[num3 + 18] = Editortable_0.dataGridView_0.Rows[i].Cells[18].Value.ToString(); - array[num3 + 19] = Editortable_0.dataGridView_0.Rows[i].Cells[19].Value.ToString(); - num3 += 20; + result = Color.FromArgb(255, num, 0); + } + else if (num < 512) + { + num -= 256; + result = Color.FromArgb(255 - num, 255, 0); + } + else if (num < 768) + { + num -= 512; + result = Color.FromArgb(0, 255, num); + } + else + { + num -= 768; + result = Color.FromArgb(0, 255 - num, 255); } } - else if (Editortable_0.dataGridView_0.ColumnCount == 10) + catch + { + result = Color.White; + } + return result; + } + + public T[,] smethod_35(T[] gparam_0, int int_232, int int_233) + { + T[,] array = new T[int_232, int_233]; + for (int i = 0; i < int_232; i++) { - object[,] array2 = new object[Editortable_0.dataGridView_0.ColumnCount, Editortable_0.dataGridView_0.RowCount]; - for (int j = 0; j < Editortable_0.dataGridView_0.RowCount; j++) + for (int j = 0; j < int_233; j++) { - array2[0, j] = Editortable_0.dataGridView_0.Rows[j].Cells[0].Value.ToString(); - array2[1, j] = Editortable_0.dataGridView_0.Rows[j].Cells[1].Value.ToString(); - array2[2, j] = Editortable_0.dataGridView_0.Rows[j].Cells[2].Value.ToString(); - array2[3, j] = Editortable_0.dataGridView_0.Rows[j].Cells[3].Value.ToString(); - array2[4, j] = Editortable_0.dataGridView_0.Rows[j].Cells[4].Value.ToString(); - array2[5, j] = Editortable_0.dataGridView_0.Rows[j].Cells[5].Value.ToString(); - array2[6, j] = Editortable_0.dataGridView_0.Rows[j].Cells[6].Value.ToString(); - array2[7, j] = Editortable_0.dataGridView_0.Rows[j].Cells[7].Value.ToString(); - array2[8, j] = Editortable_0.dataGridView_0.Rows[j].Cells[8].Value.ToString(); - array2[9, j] = Editortable_0.dataGridView_0.Rows[j].Cells[9].Value.ToString(); + array[i, j] = gparam_0[i * int_233 + j]; } - array = array2.Cast().ToArray(); } - foreach (string s in array) + return array; + } + + public void LoadSupportedECUDefinitions() + { + try { - try + Ecus_Definitions_Compatible = new List(); + + Editortable_0.CheckDefinitionFolderExist(); + + string Folderpath = Application.StartupPath + @"\Definitions"; + if (Directory.Exists(Folderpath)) { - if (!this.bool_3) - { - int num4 = (int)(float.Parse(s, CultureInfo.InvariantCulture) * 10f); - this.int_219[num + 1] = (int)((byte)num4); - this.int_219[num] = (int)((byte)(num4 >> 8)); - num += 2; - } - else + string[] AllDefinitionFiles = Directory.GetFiles(Folderpath, "*.txt"); + + Editortable_0.GForm_Main_0.method_1("Loading definitions files..."); + foreach (string ThisFilePath in AllDefinitionFiles) { - int num5; - if (flag) - { - num5 = (int)(128f / (float.Parse(s, CultureInfo.InvariantCulture) / 14.7f)); - } - else + string[] AllLines = File.ReadAllLines(ThisFilePath); + bool GettingEcuList = true; + for (int i = 0; i < AllLines.Length; i++) { - num5 = (int)(float.Parse(s, CultureInfo.InvariantCulture) * 10f); + string Thisline = AllLines[i]; + if (Thisline.Contains("ROM Parameters")) GettingEcuList = false; //make sure we are not reading false contents + + if (Thisline[0] != '#' && Thisline != "") + { + if (GettingEcuList) + { + Ecus_Definitions_Compatible.Add(Thisline); + Editortable_0.GForm_Main_0.method_1("Definitions found for ecu: " + Thisline); + } + } + + if (!GettingEcuList) i = AllLines.Length; } - this.int_219[num] = (int)((byte)num5); - num++; } } - catch + else { - return false; + DarkMessageBox.Show("Failed to find definitions folder."); } } - int num6 = this.int_0; - int[] array4 = new int[this.int_1 * num2]; - for (int l = 0; l < this.int_1 * num2; l++) - { - array4[l] = (int)this.byte_0[num6]; - num6++; - } - int num7 = 0; - foreach (int num8 in this.int_219) + catch (Exception ex) { - if ((!this.bool_3 || num7 < 200) && num8.ToString() != array4[num7].ToString()) - { - this.bool_2 = true; - } - num7++; + DarkMessageBox.Show("Failed to load definitions. " + ex.ToString()); } - return true; } - public bool smethod_22(string TableSize) + public void LoadThisECUDefinitions(string ThisECU) { - int[] arraytableint = new int[0]; - if (TableSize == "1X64") arraytableint = this.int_220; - if (TableSize == "1X15") arraytableint = this.int_221; - if (TableSize == "1X8") arraytableint = this.int_222; - if (TableSize == "1X7") arraytableint = this.int_223; - if (TableSize == "1X6") arraytableint = this.int_224; - if (TableSize == "1X5") arraytableint = this.int_225; - if (TableSize == "1X4") arraytableint = this.int_226; - if (TableSize == "1X2") arraytableint = this.int_230; - if (TableSize == "1X1") arraytableint = this.int_231; - - int num = 0; - int num2 = 0; - for (int i = 0; i < Editortable_0.dataGridView_0.ColumnCount; i++) + try { - try + Editortable_0.CheckDefinitionFolderExist(); + + string Folderpath = Application.StartupPath + @"\Definitions"; + if (Directory.Exists(Folderpath)) { - if (TableSize == "1X64") num2 = (int)float.Parse(Editortable_0.dataGridView_0.Rows[0].Cells[i].Value.ToString(), CultureInfo.InvariantCulture); - if (TableSize == "1X15") num2 = (int)(32767f / float.Parse(Editortable_0.dataGridView_0.Rows[0].Cells[i].Value.ToString(), CultureInfo.InvariantCulture)); - if (TableSize == "1X8") num2 = (int)(float.Parse(Editortable_0.dataGridView_0.Rows[0].Cells[i].Value.ToString(), CultureInfo.InvariantCulture) / 0.002f); - if (TableSize == "1X7") num2 = (int)(float.Parse(Editortable_0.dataGridView_0.Rows[0].Cells[i].Value.ToString(), CultureInfo.InvariantCulture) / 0.01f); - if (TableSize == "1X6") num2 = (int)(float.Parse(Editortable_0.dataGridView_0.Rows[0].Cells[i].Value.ToString(), CultureInfo.InvariantCulture) / 0.005f); - if (TableSize == "1X5") + string[] AllDefinitionFiles = Directory.GetFiles(Folderpath, "*.txt"); + + DefinitionsLocationsX = new List(); + DefinitionsLocationsY = new List(); + DefinitionsLocationsTable = new List(); + DefinitionsName = new List(); + DefinitionsUnit1 = new List(); + DefinitionsUnit2 = new List(); + DefinitionsTableSize = new List(); + DefinitionsMathX = new List(); + DefinitionsMathY = new List(); + DefinitionsValueMin = new List(); + DefinitionsValueMax = new List(); + DefinitionsChangeAmount = new List(); + DefinitionsIsSingleByteX = new List(); + DefinitionsIsSingleByteY = new List(); + DefinitionsIsSingleByteTable = new List(); + DefinitionsFormatX = new List(); + DefinitionsHeaders = new List(); + DefinitionsFormatY = new List(); + DefinitionsIsInverted = new List(); + + Editortable_0.GForm_Main_0.method_1("Loading ECU definitions for: " + ThisECU); + bool ECUFound = false; + foreach (string ThisFilePath in AllDefinitionFiles) { - if (Editortable.genum2_0 == Editortable.GEnum2.INJ_DEADTIME) - { - num2 = (int)((double)float.Parse(Editortable_0.dataGridView_0.Rows[0].Cells[i].Value.ToString(), CultureInfo.InvariantCulture) / 0.002); - } - else + string[] AllLines = File.ReadAllLines(ThisFilePath); + bool GettingEcuList = true; + + string CurrentLocationX = ""; + string CurrentLocationY = ""; + string CurrentLocationTable = ""; + string CurrentName = ""; + string CurrentUnit1 = ""; + string CurrentUnit2 = ""; + string CurrentTableSize = ""; + string CurrentMathX = ""; + string CurrentMathY = ""; + string CurrentMathTable = ""; + float CurrentValueMin = 0f; + float CurrentValueMax = 255f; + double CurrentChangeAmount = 1; + bool CurrentIsSingleByteX = false; + bool CurrentIsSingleByteY = false; + bool CurrentIsSingleByteTable = false; + string CurrentFormatX = ""; + string CurrentFormatY = ""; + string CurrentFormatTable = ""; + string CurrentHeaders = ""; + bool CurrentIsInverted = false; + + for (int i = 0; i < AllLines.Length; i++) { - num2 = (int)float.Parse(Editortable_0.dataGridView_0.Rows[0].Cells[i].Value.ToString(), CultureInfo.InvariantCulture); + string Thisline = AllLines[i]; + if (Thisline.Contains("ROM Parameters")) GettingEcuList = false; //make sure we are not reading false contents + + //Get supported ecu list from file and check if it's match + if (Thisline[0] != '#' && Thisline != "") + { + if (GettingEcuList && Thisline == ThisECU) ECUFound = true; + } + + if (!GettingEcuList && !ECUFound) i = AllLines.Length; + if (!GettingEcuList && ECUFound) + { + //Get Definitions parameters + if (Thisline[0] != '#' && Thisline != "") + { + //ROMLocation Name Unit1 Unit2 TableSize Math ValueMin ValueMax ChangeAmount IsWord Format Headers + if (Thisline.Contains(":")) + { + string[] Commands = Thisline.Split(':'); + if (Commands[0] == "ROMLocationX") CurrentLocationX = Commands[1]; + if (Commands[0] == "ROMLocationY") CurrentLocationY = Commands[1]; + if (Commands[0] == "ROMLocationTable") CurrentLocationTable = Commands[1]; + if (Commands[0] == "Name") CurrentName = Commands[1]; + if (Commands[0] == "Unit1") CurrentUnit1 = Commands[1]; + if (Commands[0] == "Unit2") CurrentUnit2 = Commands[1]; + if (Commands[0] == "TableSize") CurrentTableSize = Commands[1]; + if (Commands[0] == "MathX") CurrentMathX = Commands[1]; + if (Commands[0] == "MathY") CurrentMathY = Commands[1]; + if (Commands[0] == "MathTable") CurrentMathTable = Commands[1]; + if (Commands[0] == "ValueMin") CurrentValueMin = (float) double.Parse(Commands[1], CultureInfo.InvariantCulture); + if (Commands[0] == "ValueMax") CurrentValueMax = (float) double.Parse(Commands[1], CultureInfo.InvariantCulture); + if (Commands[0] == "ChangeAmount") CurrentChangeAmount = double.Parse(Commands[1], CultureInfo.InvariantCulture); + if (Commands[0] == "IsSingleByteX") CurrentIsSingleByteX = bool.Parse(Commands[1].ToLower()); + if (Commands[0] == "IsSingleByteY") CurrentIsSingleByteY = bool.Parse(Commands[1].ToLower()); + if (Commands[0] == "IsSingleByteTable") CurrentIsSingleByteTable = bool.Parse(Commands[1].ToLower()); + if (Commands[0] == "FormatX") CurrentFormatX = Commands[1]; + if (Commands[0] == "FormatY") CurrentFormatY = Commands[1]; + if (Commands[0] == "FormatTable") CurrentFormatTable = Commands[1]; + if (Commands[0] == "Headers") CurrentHeaders = Commands[1]; + if (Commands[0] == "IsInverted") CurrentIsInverted = bool.Parse(Commands[1].ToLower()); + } + } + + //Insert Definitions + //if (Thisline.Contains("######") || Thisline == "") + if (Thisline.Contains("######")) + { + if (CurrentName != "") + { + CurrentName = CurrentName.Replace("\\x00b0", "°"); + DefinitionsLocationsX.Add(CurrentLocationX); + DefinitionsLocationsY.Add(CurrentLocationY); + DefinitionsLocationsTable.Add(CurrentLocationTable); + DefinitionsName.Add(CurrentName); + DefinitionsUnit1.Add(CurrentUnit1); + DefinitionsUnit2.Add(CurrentUnit2); + DefinitionsTableSize.Add(CurrentTableSize); + DefinitionsMathX.Add(CurrentMathX); + DefinitionsMathY.Add(CurrentMathY); + DefinitionsMathTable.Add(CurrentMathTable); + DefinitionsValueMin.Add(CurrentValueMin); + DefinitionsValueMax.Add(CurrentValueMax); + DefinitionsChangeAmount.Add(CurrentChangeAmount); + DefinitionsIsSingleByteX.Add(CurrentIsSingleByteX); + DefinitionsIsSingleByteY.Add(CurrentIsSingleByteY); + DefinitionsIsSingleByteTable.Add(CurrentIsSingleByteTable); + DefinitionsFormatX.Add(CurrentFormatX); + DefinitionsFormatY.Add(CurrentFormatY); + DefinitionsFormatTable.Add(CurrentFormatTable); + DefinitionsHeaders.Add(CurrentHeaders); + DefinitionsIsInverted.Add(CurrentIsInverted); + + //Reset values to default + CurrentLocationX = ""; + CurrentLocationY = ""; + CurrentLocationTable = ""; + CurrentName = ""; + CurrentUnit1 = ""; + CurrentUnit2 = ""; + CurrentTableSize = ""; + CurrentMathX = ""; + CurrentMathY = ""; + CurrentMathTable = ""; + CurrentValueMin = 0f; + CurrentValueMax = 255f; + CurrentChangeAmount = 1f; + CurrentIsSingleByteX = false; + CurrentIsSingleByteY = false; + CurrentIsSingleByteTable = false; + CurrentFormatX = ""; + CurrentHeaders = ""; + CurrentFormatY = ""; + CurrentFormatTable = ""; + CurrentIsInverted = false; + } + } + } } + Editortable_0.GForm_Main_0.method_1("Definitions loaded!"); + + if (ECUFound) return; } - if (TableSize == "1X4") - { - if (Editortable.genum2_0 == Editortable.GEnum2.VTEC_PARAMS) - { - num2 = (int)float.Parse(Editortable_0.dataGridView_0.Rows[i].Cells[0].Value.ToString(), CultureInfo.InvariantCulture); - } - else + + if (!ECUFound) Editortable_0.GForm_Main_0.method_1("Definitions NOT loaded!"); + } + else + { + DarkMessageBox.Show("Failed to find definitions folder."); + } + } + catch (Exception ex) + { + DarkMessageBox.Show("Failed to load definitions. " + ex.ToString()); + } + } + + public int SelectedROMLocation; + public int SelectedTableSize; + public bool bool_0 = false; + public bool bool_1 = false; + public string string_ECU_Name; + public byte[] byte_0; + public string string_2; + public string string_3; + public bool bool_2 = false; + public bool IsSingleByteX = false; + public bool IsSingleByteY = false; + public bool IsSingleByteTable = false; + + public int[] BufferValuesArray = new int[200]; + public byte[] BufferBytesArray = new byte[400]; + public int[] BufferTableSize = new int[2]; + public string BufferMath = ""; + + public int[] int_219 = new int[400]; + public int[] int_220 = new int[128]; + public int[] int_221 = new int[30]; + public int[] int_222 = new int[16]; + public int[] int_223 = new int[14]; + public int[] int_224 = new int[12]; + public int[] int_225 = new int[10]; + public int[] int_226 = new int[8]; + public int[] int_231 = new int[2]; + + [CompilerGenerated] + private sealed class Class40 + { + internal Class40() + { + } + + internal void method_0(object object_0) + { + this.taskCompletionSource_0.SetResult(null); + } + + public TaskCompletionSource taskCompletionSource_0; + } + + //######################################################################################################################################## + //######################################################################################################################################## + //######################################################################################################################################## + //######################################################################################################################################## + + /*public string smethod_0(ZipArchiveEntry zipArchiveEntry_0) + { + string text = ""; + using (Stream stream = zipArchiveEntry_0.Open()) + { + using (StreamReader streamReader = new StreamReader(stream, Encoding.GetEncoding("iso-8859-1"))) + { + text += streamReader.ReadToEnd(); + } + } + return text; + }*/ + + /*public bool smethod_22(string TableSize) + { + int[] arraytableint = new int[0]; + if (TableSize == "1X64") arraytableint = this.int_220; + if (TableSize == "1X15") arraytableint = this.int_221; + if (TableSize == "1X8") arraytableint = this.int_222; + if (TableSize == "1X7") arraytableint = this.int_223; + if (TableSize == "1X6") arraytableint = this.int_224; + if (TableSize == "1X5") arraytableint = this.int_225; + if (TableSize == "1X4") arraytableint = this.int_226; + if (TableSize == "1X2") arraytableint = this.int_230; + if (TableSize == "1X1") arraytableint = this.int_231; + + int num = 0; + int num2 = 0; + for (int i = 0; i < Editortable_0.dataGridView_0.ColumnCount; i++) + { + try + { + if (TableSize == "1X64") num2 = (int)float.Parse(Editortable_0.dataGridView_0.Rows[0].Cells[i].Value.ToString(), CultureInfo.InvariantCulture); + if (TableSize == "1X15") num2 = (int)(32767f / float.Parse(Editortable_0.dataGridView_0.Rows[0].Cells[i].Value.ToString(), CultureInfo.InvariantCulture)); + if (TableSize == "1X8") num2 = (int)(float.Parse(Editortable_0.dataGridView_0.Rows[0].Cells[i].Value.ToString(), CultureInfo.InvariantCulture) / 0.002f); + if (TableSize == "1X7") num2 = (int)(float.Parse(Editortable_0.dataGridView_0.Rows[0].Cells[i].Value.ToString(), CultureInfo.InvariantCulture) / 0.01f); + if (TableSize == "1X6") num2 = (int)(float.Parse(Editortable_0.dataGridView_0.Rows[0].Cells[i].Value.ToString(), CultureInfo.InvariantCulture) / 0.005f); + if (TableSize == "1X5") + { + if (Editortable.genum2_0 == Editortable.GEnum2.INJ_DEADTIME) + { + num2 = (int)((double)float.Parse(Editortable_0.dataGridView_0.Rows[0].Cells[i].Value.ToString(), CultureInfo.InvariantCulture) / 0.002); + } + else + { + num2 = (int)float.Parse(Editortable_0.dataGridView_0.Rows[0].Cells[i].Value.ToString(), CultureInfo.InvariantCulture); + } + } + if (TableSize == "1X4") + { + if (Editortable.genum2_0 == Editortable.GEnum2.VTEC_PARAMS) + { + num2 = (int)float.Parse(Editortable_0.dataGridView_0.Rows[i].Cells[0].Value.ToString(), CultureInfo.InvariantCulture); + } + else { num2 = (int)float.Parse(Editortable_0.dataGridView_0.Rows[0].Cells[i].Value.ToString(), CultureInfo.InvariantCulture); } @@ -754,9 +1297,9 @@ public bool smethod_22(string TableSize) num4++; } return true; - } + }*/ - public bool smethod_31() + /*public bool smethod_31() { if (this.int_1 != 0 && this.int_0 != 0) { @@ -802,9 +1345,9 @@ public bool smethod_31() } } return false; - } + }*/ - public void smethod_32() + /*public void smethod_32() { Editortable_0.dataGridView_0.ReadOnly = true; if (this.bool_0) @@ -824,1098 +1367,5 @@ public void smethod_32() DarkMessageBox.Show("Table changes fail"); } } - } - - public void smethod_33(int int_232, float float_0, float float_1) - { - for (int i = 0; i < int_232; i++) - { - foreach (object obj in ((IEnumerable)Editortable_0.dataGridView_0.Rows)) - { - DataGridViewRow dataGridViewRow = (DataGridViewRow)obj; - try - { - float float_2 = float.Parse(dataGridViewRow.Cells[i].Value.ToString()); - dataGridViewRow.Cells[i].Style.BackColor = this.smethod_34(float_2, float_1, float_0); - } - catch - { - dataGridViewRow.Cells[i].Style.BackColor = System.Drawing.SystemColors.ControlLight; - //dataGridViewRow.Cells[i].Style.BackColor = Color.White; - } - } - } - } - - public Color smethod_34(float float_0, float float_1, float float_2) - { - Color result; - try - { - int num = (int)(1023f * (float_0 - float_1) / (float_2 - float_1)); - if (num < 256) - { - result = Color.FromArgb(255, num, 0); - } - else if (num < 512) - { - num -= 256; - result = Color.FromArgb(255 - num, 255, 0); - } - else if (num < 768) - { - num -= 512; - result = Color.FromArgb(0, 255, num); - } - else - { - num -= 768; - result = Color.FromArgb(0, 255 - num, 255); - } - } - catch - { - result = Color.White; - } - return result; - } - - public T[,] smethod_35(T[] gparam_0, int int_232, int int_233) - { - T[,] array = new T[int_232, int_233]; - for (int i = 0; i < int_232; i++) - { - for (int j = 0; j < int_233; j++) - { - array[i, j] = gparam_0[i * int_233 + j]; - } - } - return array; - } - - public void smethod_36() - { - this.int_2 = 47458; - this.int_3 = 0; - this.int_4 = 0; - this.int_5 = new int[] - { - 1, - 4 - }; - this.int_6 = 85312; - this.int_25 = 0; - this.int_26 = 0; - this.int_27 = new int[] - { - 2, - 1 - }; - this.int_30 = 90452; - this.int_31 = 0; - this.int_32 = 0; - this.int_33 = new int[] - { - 5, - 1 - }; - this.int_99 = 94604; - this.int_100 = 78380; - this.int_101 = 96212; - this.int_102 = new int[] - { - 10, - 20 - }; - this.int_103 = 94164; - this.int_104 = 78380; - this.int_105 = 94104; - this.int_106 = new int[] - { - 10, - 20 - }; - this.int_107 = 89972; - this.int_108 = 78380; - this.int_109 = 96212; - this.int_110 = new int[] - { - 10, - 20 - }; - this.int_111 = 89572; - this.int_112 = 78380; - this.int_113 = 94104; - this.int_114 = new int[] - { - 10, - 20 - }; - } - - public void smethod_37() - { - //Load RRB ROM - this.int_2 = 46530; //vtec engagement?? - this.int_3 = 0; - this.int_4 = 0; - this.int_5 = new int[] - { - 1, - 4 - }; - this.int_6 = 71296; - this.int_7 = 71304; - this.int_8 = 71312; - this.int_9 = 71320; - this.int_10 = 71328; - this.int_11 = 71332; - this.int_12 = 71348; - this.int_13 = 71356; - this.int_14 = 46216; - this.int_23 = 46216; - this.int_24 = 46218; - this.int_25 = 0; - this.int_26 = 0; - this.int_27 = new int[] - { - 2, - 1 - }; - this.int_28 = 47690; - this.int_29 = new int[] - { - 1, - 1 - }; - this.int_30 = 76020; - this.int_31 = 0; - this.int_32 = 0; - this.int_33 = new int[] - { - 5, - 1 - }; - this.int_34 = 66002; - this.int_35 = 0; - this.int_36 = 66258; - this.int_37 = new int[] - { - 64, - 1 - }; - this.int_38 = 101836; - this.int_39 = 87668; - this.int_40 = 87628; - this.int_41 = new int[] - { - 10, - 20 - }; - this.int_42 = 102236; - this.int_43 = 87668; - this.int_44 = 87588; - this.int_45 = new int[] - { - 10, - 20 - }; - this.int_46 = 102636; - this.int_47 = 0; - this.int_48 = 102716; - this.int_49 = new int[] - { - 10, - 20 - }; - this.int_50 = 102676; - this.int_51 = 0; - this.int_52 = 102756; - this.int_53 = new int[] - { - 10, - 20 - }; - this.int_54 = 85588; - this.int_55 = 87668; - this.int_56 = 102716; - this.int_57 = new int[] - { - 10, - 20 - }; - this.int_58 = 85988; - this.int_59 = 87668; - this.int_60 = 102716; - this.int_61 = new int[] - { - 10, - 20 - }; - this.int_62 = 86388; - this.int_63 = 87668; - this.int_64 = 102716; - this.int_65 = new int[] - { - 10, - 20 - }; - this.int_66 = 86788; - this.int_67 = 87668; - this.int_68 = 102716; - this.int_69 = new int[] - { - 10, - 20 - }; - this.int_70 = 87188; - this.int_71 = 87668; - this.int_72 = 102716; - this.int_73 = new int[] - { - 10, - 20 - }; - this.int_74 = 83588; - this.int_75 = 87668; - this.int_76 = 102756; - this.int_77 = new int[] - { - 10, - 20 - }; - this.int_78 = 83988; - this.int_79 = 87668; - this.int_80 = 102756; - this.int_81 = new int[] - { - 10, - 20 - }; - this.int_82 = 84388; - this.int_83 = 87668; - this.int_84 = 102756; - this.int_85 = new int[] - { - 10, - 20 - }; - this.int_86 = 84788; - this.int_87 = 87668; - this.int_88 = 102756; - this.int_89 = new int[] - { - 10, - 20 - }; - this.int_90 = 85188; - this.int_91 = 87668; - this.int_92 = 102756; - this.int_93 = new int[] - { - 10, - 20 - }; - this.int_115 = 0; - this.int_116 = 72672; - this.int_119 = 0; - this.int_120 = 75908; - this.int_117 = 72688; - this.int_118 = new int[] - { - 8, - 1 - }; - this.int_121 = 75924; - this.int_122 = new int[] - { - 8, - 1 - }; - this.int_123 = 102756; - this.int_124 = 87668; - this.int_125 = 102716; - this.int_126 = 87668; - this.int_127 = 74034; - this.int_128 = new int[] - { - 20, - 10 - }; - this.int_129 = 74434; - this.int_130 = new int[] - { - 20, - 10 - }; - this.int_131 = 75034; - this.int_132 = new int[] - { - 20, - 10 - }; - this.int_133 = 74234; - this.int_134 = new int[] - { - 20, - 10 - }; - this.int_135 = 74634; - this.int_136 = new int[] - { - 20, - 10 - }; - this.int_137 = 74834; - this.int_138 = new int[] - { - 20, - 10 - }; - this.int_139 = 71540; - this.int_140 = new int[] - { - 15, - 1 - }; - this.int_141 = 79456; - this.int_142 = 87668; - this.int_143 = 102716; - this.int_144 = new int[] - { - 10, - 20 - }; - this.int_145 = 79856; - this.int_146 = 87668; - this.int_147 = 102716; - this.int_148 = new int[] - { - 10, - 20 - }; - this.int_149 = 80256; - this.int_150 = 87668; - this.int_151 = 102716; - this.int_152 = new int[] - { - 10, - 20 - }; - this.int_153 = 80656; - this.int_154 = 87668; - this.int_155 = 102716; - this.int_156 = new int[] - { - 10, - 20 - }; - this.int_157 = 81056; - this.int_158 = 87668; - this.int_159 = 102716; - this.int_160 = new int[] - { - 10, - 20 - }; - this.int_161 = 77456; - this.int_162 = 87668; - this.int_163 = 102756; - this.int_164 = new int[] - { - 10, - 20 - }; - this.int_165 = 77856; - this.int_166 = 87668; - this.int_167 = 102756; - this.int_168 = new int[] - { - 10, - 20 - }; - this.int_169 = 78256; - this.int_170 = 87668; - this.int_171 = 102756; - this.int_172 = new int[] - { - 10, - 20 - }; - this.int_173 = 78656; - this.int_174 = 87668; - this.int_175 = 102756; - this.int_176 = new int[] - { - 10, - 20 - }; - this.int_177 = 79056; - this.int_178 = 87668; - this.int_179 = 102756; - this.int_180 = new int[] - { - 10, - 20 - }; - this.int_189 = 89604; - this.int_190 = 87668; - this.int_191 = 102716; - this.int_192 = new int[] - { - 10, - 20 - }; - this.int_193 = 89204; - this.int_194 = 87668; - this.int_195 = 102756; - this.int_196 = new int[] - { - 10, - 20 - }; - this.int_181 = 77056; - this.int_182 = 87668; - this.int_183 = 102716; - this.int_184 = new int[] - { - 10, - 20 - }; - this.int_185 = 77256; - this.int_186 = 87668; - this.int_187 = 102756; - this.int_188 = new int[] - { - 10, - 20 - }; - this.int_197 = 64620; - this.int_199 = 64636; - this.int_201 = 65076; - this.int_203 = 65100; - this.int_205 = 65636; - this.int_207 = 68956; - this.int_211 = 69056; - this.int_198 = new int[] - { - 8, - 1 - }; - this.int_200 = new int[] - { - 8, - 1 - }; - this.int_202 = new int[] - { - 6, - 1 - }; - this.int_204 = new int[] - { - 6, - 1 - }; - this.int_206 = new int[] - { - 7, - 1 - }; - this.int_208 = new int[] - { - 10, - 5 - }; - this.int_207 = 68956; - this.int_209 = 69506; - this.int_210 = 69556; - this.int_214 = new int[] - { - 15, - 15 - }; - this.int_211 = 69056; - this.int_212 = 69526; - this.int_213 = 69566; - this.int_215 = 70982; - this.int_216 = 44674; - this.int_217 = 49780; - } - - public int int_0; - public int int_1; - public bool bool_0 = false; - public bool bool_1 = false; - public string string_0; - public string string_1; - public byte[] byte_0; - public string string_2; - public string string_3; - public bool bool_2 = false; - public bool bool_3 = false; - public int int_2; - public int int_3; - public int int_4; - public int[] int_5; - public int int_6; - public int int_7; - public int int_8; - public int int_9; - public int int_10; - public int int_11; - public int int_12; - public int int_13; - public int int_14; - public int int_15; - public int int_16; - public int int_17; - public int int_18; - public int int_19; - public int int_20; - public int int_21; - public int int_22; - public int int_23; - public int int_24; - public int int_25; - public int int_26; - public int[] int_27; - public int int_28; - public int[] int_29; - public int int_30; - public int int_31; - public int int_32; - public int[] int_33; - public int int_34; - public int int_35; - public int int_36; - public int[] int_37; - public int int_38; - public int int_39; - public int int_40; - public int[] int_41; - public int int_42; - public int int_43; - public int int_44; - public int[] int_45; - public int int_46; - public int int_47; - public int int_48; - public int[] int_49; - public int int_50; - public int int_51; - public int int_52; - public int[] int_53; - public int int_54; - public int int_55; - public int int_56; - public int[] int_57; - public int int_58; - public int int_59; - public int int_60; - public int[] int_61; - public int int_62; - public int int_63; - public int int_64; - public int[] int_65; - public int int_66; - public int int_67; - public int int_68; - public int[] int_69; - public int int_70; - public int int_71; - public int int_72; - public int[] int_73; - public int int_74; - public int int_75; - - // Token: 0x040016A7 RID: 5799 - public int int_76; - - // Token: 0x040016A8 RID: 5800 - public int[] int_77; - - // Token: 0x040016A9 RID: 5801 - public int int_78; - - // Token: 0x040016AA RID: 5802 - public int int_79; - - // Token: 0x040016AB RID: 5803 - public int int_80; - - // Token: 0x040016AC RID: 5804 - public int[] int_81; - - // Token: 0x040016AD RID: 5805 - public int int_82; - - // Token: 0x040016AE RID: 5806 - public int int_83; - - // Token: 0x040016AF RID: 5807 - public int int_84; - - // Token: 0x040016B0 RID: 5808 - public int[] int_85; - - // Token: 0x040016B1 RID: 5809 - public int int_86; - - // Token: 0x040016B2 RID: 5810 - public int int_87; - - // Token: 0x040016B3 RID: 5811 - public int int_88; - - // Token: 0x040016B4 RID: 5812 - public int[] int_89; - - // Token: 0x040016B5 RID: 5813 - public int int_90; - - // Token: 0x040016B6 RID: 5814 - public int int_91; - - // Token: 0x040016B7 RID: 5815 - public int int_92; - - // Token: 0x040016B8 RID: 5816 - public int[] int_93; - - // Token: 0x040016B9 RID: 5817 - public int[] int_94 = new int[200]; - - // Token: 0x040016BA RID: 5818 - public int[] int_95 = new int[200]; - - // Token: 0x040016BB RID: 5819 - public int[] int_96 = new int[200]; - - // Token: 0x040016BC RID: 5820 - public int[] int_97 = new int[50]; - - // Token: 0x040016BD RID: 5821 - public int[] int_98 = new int[225]; - - // Token: 0x040016BE RID: 5822 - public int int_99; - - // Token: 0x040016BF RID: 5823 - public int int_100; - - // Token: 0x040016C0 RID: 5824 - public int int_101; - - // Token: 0x040016C1 RID: 5825 - public int[] int_102; - - // Token: 0x040016C2 RID: 5826 - public int int_103; - - // Token: 0x040016C3 RID: 5827 - public int int_104; - - // Token: 0x040016C4 RID: 5828 - public int int_105; - - // Token: 0x040016C5 RID: 5829 - public int[] int_106; - - // Token: 0x040016C6 RID: 5830 - public int int_107; - - // Token: 0x040016C7 RID: 5831 - public int int_108; - - // Token: 0x040016C8 RID: 5832 - public int int_109; - - // Token: 0x040016C9 RID: 5833 - public int[] int_110; - - // Token: 0x040016CA RID: 5834 - public int int_111; - - // Token: 0x040016CB RID: 5835 - public int int_112; - - // Token: 0x040016CC RID: 5836 - public int int_113; - - // Token: 0x040016CD RID: 5837 - public int[] int_114; - - // Token: 0x040016CE RID: 5838 - public int int_115; - - // Token: 0x040016CF RID: 5839 - public int int_116; - - // Token: 0x040016D0 RID: 5840 - public int int_117; - - // Token: 0x040016D1 RID: 5841 - public int[] int_118; - - // Token: 0x040016D2 RID: 5842 - public int int_119; - - // Token: 0x040016D3 RID: 5843 - public int int_120; - - // Token: 0x040016D4 RID: 5844 - public int int_121; - - // Token: 0x040016D5 RID: 5845 - public int[] int_122; - - // Token: 0x040016D6 RID: 5846 - public int int_123; - - // Token: 0x040016D7 RID: 5847 - public int int_124; - - // Token: 0x040016D8 RID: 5848 - public int int_125; - - // Token: 0x040016D9 RID: 5849 - public int int_126; - - // Token: 0x040016DA RID: 5850 - public int int_127; - - // Token: 0x040016DB RID: 5851 - public int[] int_128; - - // Token: 0x040016DC RID: 5852 - public int int_129; - - // Token: 0x040016DD RID: 5853 - public int[] int_130; - - // Token: 0x040016DE RID: 5854 - public int int_131; - - // Token: 0x040016DF RID: 5855 - public int[] int_132; - - // Token: 0x040016E0 RID: 5856 - public int int_133; - - // Token: 0x040016E1 RID: 5857 - public int[] int_134; - - // Token: 0x040016E2 RID: 5858 - public int int_135; - - // Token: 0x040016E3 RID: 5859 - public int[] int_136; - - // Token: 0x040016E4 RID: 5860 - public int int_137; - - // Token: 0x040016E5 RID: 5861 - public int[] int_138; - - // Token: 0x040016E6 RID: 5862 - public int int_139; - - // Token: 0x040016E7 RID: 5863 - public int[] int_140; - - // Token: 0x040016E8 RID: 5864 - public int int_141; - - // Token: 0x040016E9 RID: 5865 - public int int_142; - - // Token: 0x040016EA RID: 5866 - public int int_143; - - // Token: 0x040016EB RID: 5867 - public int[] int_144; - - // Token: 0x040016EC RID: 5868 - public int int_145; - - // Token: 0x040016ED RID: 5869 - public int int_146; - - // Token: 0x040016EE RID: 5870 - public int int_147; - - // Token: 0x040016EF RID: 5871 - public int[] int_148; - - // Token: 0x040016F0 RID: 5872 - public int int_149; - - // Token: 0x040016F1 RID: 5873 - public int int_150; - - // Token: 0x040016F2 RID: 5874 - public int int_151; - - // Token: 0x040016F3 RID: 5875 - public int[] int_152; - - // Token: 0x040016F4 RID: 5876 - public int int_153; - - // Token: 0x040016F5 RID: 5877 - public int int_154; - - // Token: 0x040016F6 RID: 5878 - public int int_155; - - // Token: 0x040016F7 RID: 5879 - public int[] int_156; - - // Token: 0x040016F8 RID: 5880 - public int int_157; - - // Token: 0x040016F9 RID: 5881 - public int int_158; - - // Token: 0x040016FA RID: 5882 - public int int_159; - - // Token: 0x040016FB RID: 5883 - public int[] int_160; - - // Token: 0x040016FC RID: 5884 - public int int_161; - - // Token: 0x040016FD RID: 5885 - public int int_162; - - // Token: 0x040016FE RID: 5886 - public int int_163; - - // Token: 0x040016FF RID: 5887 - public int[] int_164; - - // Token: 0x04001700 RID: 5888 - public int int_165; - - // Token: 0x04001701 RID: 5889 - public int int_166; - - // Token: 0x04001702 RID: 5890 - public int int_167; - - // Token: 0x04001703 RID: 5891 - public int[] int_168; - - // Token: 0x04001704 RID: 5892 - public int int_169; - - // Token: 0x04001705 RID: 5893 - public int int_170; - - // Token: 0x04001706 RID: 5894 - public int int_171; - - // Token: 0x04001707 RID: 5895 - public int[] int_172; - - // Token: 0x04001708 RID: 5896 - public int int_173; - - // Token: 0x04001709 RID: 5897 - public int int_174; - - // Token: 0x0400170A RID: 5898 - public int int_175; - - // Token: 0x0400170B RID: 5899 - public int[] int_176; - - // Token: 0x0400170C RID: 5900 - public int int_177; - - // Token: 0x0400170D RID: 5901 - public int int_178; - - // Token: 0x0400170E RID: 5902 - public int int_179; - - // Token: 0x0400170F RID: 5903 - public int[] int_180; - - // Token: 0x04001710 RID: 5904 - public int int_181; - - // Token: 0x04001711 RID: 5905 - public int int_182; - - // Token: 0x04001712 RID: 5906 - public int int_183; - - // Token: 0x04001713 RID: 5907 - public int[] int_184; - - // Token: 0x04001714 RID: 5908 - public int int_185; - - // Token: 0x04001715 RID: 5909 - public int int_186; - - // Token: 0x04001716 RID: 5910 - public int int_187; - - // Token: 0x04001717 RID: 5911 - public int[] int_188; - - // Token: 0x04001718 RID: 5912 - public int int_189; - - // Token: 0x04001719 RID: 5913 - public int int_190; - - // Token: 0x0400171A RID: 5914 - public int int_191; - - // Token: 0x0400171B RID: 5915 - public int[] int_192; - - // Token: 0x0400171C RID: 5916 - public int int_193; - - // Token: 0x0400171D RID: 5917 - public int int_194; - - // Token: 0x0400171E RID: 5918 - public int int_195; - - // Token: 0x0400171F RID: 5919 - public int[] int_196; - - // Token: 0x04001720 RID: 5920 - public int int_197; - - // Token: 0x04001721 RID: 5921 - public int[] int_198; - - // Token: 0x04001722 RID: 5922 - public int int_199; - - // Token: 0x04001723 RID: 5923 - public int[] int_200; - - // Token: 0x04001724 RID: 5924 - public int int_201; - - // Token: 0x04001725 RID: 5925 - public int[] int_202; - - // Token: 0x04001726 RID: 5926 - public int int_203; - - // Token: 0x04001727 RID: 5927 - public int[] int_204; - - // Token: 0x04001728 RID: 5928 - public int int_205; - - // Token: 0x04001729 RID: 5929 - public int[] int_206; - - // Token: 0x0400172A RID: 5930 - public int int_207; - - // Token: 0x0400172B RID: 5931 - public int[] int_208; - - // Token: 0x0400172C RID: 5932 - public int int_209; - - // Token: 0x0400172D RID: 5933 - public int int_210; - - // Token: 0x0400172E RID: 5934 - public int int_211; - - // Token: 0x0400172F RID: 5935 - public int int_212; - - // Token: 0x04001730 RID: 5936 - public int int_213; - - // Token: 0x04001731 RID: 5937 - public int[] int_214; - - // Token: 0x04001732 RID: 5938 - public int int_215; - - // Token: 0x04001733 RID: 5939 - public int int_216; - - // Token: 0x04001734 RID: 5940 - public int int_217; - - // Token: 0x04001735 RID: 5941 - public bool bool_4 = false; - - // Token: 0x04001736 RID: 5942 - public int[] int_218 = new int[450]; - - // Token: 0x04001737 RID: 5943 - public int[] int_219 = new int[400]; - - // Token: 0x04001738 RID: 5944 - public int[] int_220 = new int[128]; - - // Token: 0x04001739 RID: 5945 - public int[] int_221 = new int[30]; - - // Token: 0x0400173A RID: 5946 - public int[] int_222 = new int[16]; - - // Token: 0x0400173B RID: 5947 - public int[] int_223 = new int[14]; - - // Token: 0x0400173C RID: 5948 - public int[] int_224 = new int[12]; - - // Token: 0x0400173D RID: 5949 - public int[] int_225 = new int[10]; - - // Token: 0x0400173E RID: 5950 - public int[] int_226 = new int[8]; - - // Token: 0x0400173F RID: 5951 - public int[] int_227 = new int[7]; - - // Token: 0x04001740 RID: 5952 - public int[] int_228 = new int[6]; - - // Token: 0x04001741 RID: 5953 - public int[] int_229 = new int[5]; - - // Token: 0x04001742 RID: 5954 - public int[] int_230 = new int[4]; - - // Token: 0x04001743 RID: 5955 - public int[] int_231 = new int[2]; - - // Token: 0x020000F8 RID: 248 - [CompilerGenerated] - private sealed class Class40 - { - // Token: 0x06000F06 RID: 3846 RVA: 0x00004E37 File Offset: 0x00003037 - internal Class40() - { - } - - // Token: 0x06000F07 RID: 3847 RVA: 0x0000B4B5 File Offset: 0x000096B5 - internal void method_0(object object_0) - { - this.taskCompletionSource_0.SetResult(null); - } - - // Token: 0x04001746 RID: 5958 - public TaskCompletionSource taskCompletionSource_0; - } + }*/ } diff --git a/Class_RWD.cs b/Class_RWD.cs index fff7636..6871850 100644 --- a/Class_RWD.cs +++ b/Class_RWD.cs @@ -493,6 +493,15 @@ public static byte[] StringToByteArray(string hex) .ToArray(); } + public static int HexStringToInt(string hex) + { + byte[] ThisBytes = StringToByteArray(hex); + if (ThisBytes.Length == 2) return BitConverter.ToInt16(ThisBytes, 0); + if (ThisBytes.Length == 4) return BitConverter.ToInt32(ThisBytes, 0); + //if (ThisBytes.Length == 8) return BitConverter.ToInt64(ThisBytes, 0); + return 0; + } + static byte[] _get_decoder(string key1, string key2, string key3, string op1, string op2, string op3) { byte[] decoder = new byte[256]; List values = new List { }; diff --git a/Editortable.cs b/Editortable.cs index 43d8a32..e635d3b 100644 --- a/Editortable.cs +++ b/Editortable.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using System.ComponentModel; +using System.Reflection; using System.Drawing; using System.Windows.Forms; using DarkUI.Controls; @@ -16,7 +17,7 @@ public class Editortable : DarkForm private IContainer icontainer_1; public bool bool_0 = true; public static float float_0 = 1f; - private Timer timer_0 = new Timer(); + //private Timer timer_0 = new Timer(); private List list_0 = new List(); public string[] string_0 = new string[] { "6.00", "8.00", "12.00", "14.00", "16.00" }; public string[] string_1; @@ -24,31 +25,36 @@ public class Editortable : DarkForm public string string_3; public string[] string_4; public string[] string_5; - private string[] string_6; - private string[] string_7; public static float[] float_1 = new float[2]; private TableLayoutPanel tableLayoutPanel1; private DarkTreeView treeView1; private DarkGroupBox groupBox1; - private DarkGroupBox groupBox2; public DataGridView dataGridView_0; internal ClassEditor ClassEditor_0; public string string_8; public bool IsFullBinary = true; public static ImageList imageList_0; - public static GEnum2 genum2_0 = GEnum2.TIMING_LOW; public int int_0; public int int_1; public int LastPackageChecksum; - private SplitContainer splitContainer1; - private DarkButton button2; - private DarkButton button1; private OpenFileDialog openFileDialog1; private SaveFileDialog saveFileDialog1; public GForm_Main GForm_Main_0; + private DarkToolStrip darkToolStrip1; + private ToolStripDropDownButton toolStripDropDownButton1; + private ToolStripMenuItem openbinToolStripMenuItem; + private ToolStripMenuItem savebinToolStripMenuItem; + private ToolStripMenuItem fixChecksumsToolStripMenuItem; + private ToolStripSeparator toolStripSeparator1; + private ToolStripMenuItem openDefinitionsFolderToolStripMenuItem; + private ToolStripDropDownButton toolStripDropDownButton2; + private ToolStripMenuItem undoToolStripMenuItem; + private ToolStripMenuItem redoToolStripMenuItem; + private ToolStripSeparator toolStripSeparator2; + private ToolStripMenuItem increaseSelectionToolStripMenuItem; + private ToolStripMenuItem decreaseSelectionToolStripMenuItem; public System.Windows.Forms.Timer timer_1 = new System.Windows.Forms.Timer(); - //internal Editortable(ref Class10_settings class10_1, ref Class39 Class39_1) internal Editortable(ref GForm_Main GForm_Main_1) { GForm_Main_0 = GForm_Main_1; @@ -56,100 +62,12 @@ internal Editortable(ref GForm_Main GForm_Main_1) this.timer_1.Interval = 0xbb8; this.timer_1.Tick += new EventHandler(this.timer_1_Tick); - string[] textArray2 = new string[15]; - textArray2[0] = "1233"; - textArray2[1] = "1669"; - textArray2[2] = "2037"; - textArray2[3] = "2495"; - textArray2[4] = "2750"; - textArray2[5] = "2890"; - textArray2[6] = "3015"; - textArray2[7] = "3126"; - textArray2[8] = "3225"; - textArray2[9] = "3356"; - textArray2[10] = "3505"; - textArray2[11] = "3629"; - textArray2[12] = "3736"; - textArray2[13] = "4009"; - textArray2[14] = "4188"; - this.string_1 = textArray2; - this.string_2 = new string[] { "1", "2", "3", "4", "5-6" }; - this.string_3 = "Speed Limiter"; - this.string_4 = new string[] { "Enable Low", "Disable Low", "Enable High", "Disable High" }; - this.string_5 = new string[] { "Rev Limit" }; - string[] textArray6 = new string[0x42]; - textArray6[0] = "Mass Airflow Conversion Curve"; - textArray6[1] = "LAF Voltage to Lambda"; - textArray6[2] = "MAF Load Limit"; - textArray6[3] = "AFM Fuel"; - textArray6[4] = "--Fuel Value 1"; - textArray6[5] = "--Fuel Value 2"; - textArray6[6] = "Injector Voltage Compensation"; - textArray6[7] = "Minimum IPW"; - textArray6[8] = "Lambda Target Low Cam"; - textArray6[9] = "--Target 1"; - textArray6[10] = "--Target 2"; - textArray6[11] = "--Target 3"; - textArray6[12] = "Lambda Target High Cam"; - textArray6[13] = "--Target 1"; - textArray6[14] = "--Target 2"; - textArray6[15] = "--Target 3"; - textArray6[0x10] = "Cam Angle VTC Low"; - textArray6[0x11] = "Ignition Timing VTC Low"; - textArray6[0x12] = "--00\x00b0"; - textArray6[0x13] = "--10\x00b0"; - textArray6[20] = "--20\x00b0"; - textArray6[0x15] = "--30\x00b0"; - textArray6[0x16] = "--40\x00b0"; - textArray6[0x17] = "Knock Limit Low"; - textArray6[0x18] = "--00\x00b0"; - textArray6[0x19] = "--10\x00b0"; - textArray6[0x1a] = "--20\x00b0"; - textArray6[0x1b] = "--30\x00b0"; - textArray6[0x1c] = "--40\x00b0"; - textArray6[0x1d] = "Knock Retard Low"; - textArray6[30] = "Knock Sensitivity Low"; - textArray6[0x1f] = "Cam Angle VTC High"; - textArray6[0x20] = "Ignition Timing VTC High"; - textArray6[0x21] = "--00\x00b0"; - textArray6[0x22] = "--10\x00b0"; - textArray6[0x23] = "--20\x00b0"; - textArray6[0x24] = "--30\x00b0"; - textArray6[0x25] = "--40\x00b0"; - textArray6[0x26] = "Knock Limit High"; - textArray6[0x27] = "--00\x00b0"; - textArray6[40] = "--10\x00b0"; - textArray6[0x29] = "--20\x00b0"; - textArray6[0x2a] = "--30\x00b0"; - textArray6[0x2b] = "--40\x00b0"; - textArray6[0x2c] = "Knock Retard High"; - textArray6[0x2d] = "Knock Sensitivity High"; - textArray6[0x2e] = "VTEC Engagement"; - textArray6[0x2f] = "Revlimiter"; - textArray6[0x30] = "--Revlimiter 2"; - textArray6[0x31] = "--Revlimiter 3"; - textArray6[50] = "--Revlimiter 4"; - textArray6[0x33] = "--Revlimiter 5"; - textArray6[0x34] = "--Revlimiter 6"; - textArray6[0x35] = "--Revlimiter 7"; - textArray6[0x36] = "--Revlimiter 8"; - textArray6[0x37] = "--Revlimiter 9"; - textArray6[0x38] = "--Revlimiter 10"; - textArray6[0x39] = "Speedlimiter"; - textArray6[0x3a] = "Idle Speed"; - textArray6[0x3b] = "Post Start Idle Speed"; - textArray6[60] = "WOT Determiniation (MAP)"; - textArray6[0x3d] = "WOT Determiniation 1(TPS)"; - textArray6[0x3e] = "WOT Determiniation 2(TPS)"; - textArray6[0x3f] = "Overrun Fuel Cut(Gear Determiniation)"; - textArray6[0x40] = "Throttle Response 1"; - textArray6[0x41] = "Throttle Response 2"; - this.string_6 = textArray6; - this.string_7 = new string[] { "Fuel Low Cam", "Fuel High Cam", "Ignition Timing Low Cam", "Ignition Timing High Cam", "VTEC Engagement", "Revlimiter", "Injector Voltage Compensation" }; + //this.string_7_S2K = new string[] { "Fuel Low Cam", "Fuel High Cam", "Ignition Timing Low Cam", "Ignition Timing High Cam", "VTEC Engagement", "Revlimiter", "Injector Voltage Compensation" }; + //this.string_6_RWC = new string[] { "Mass Airflow Conversion Curve", "VTEC Engagement", "Revlimiter", "--Revlimiter 2", "--Revlimiter 3", "--Revlimiter 4", "--Revlimiter 5", "--Revlimiter 6", "--Revlimiter 7", "Speedlimiter", "Injector Voltage Compensation", "Minimum IPW" }; + this.int_1 = 1; this.InitializeComponent(); - //Class39_0 = Class39_1; Editortable_0 = this; if (this.ClassEditor_0 != null) this.ClassEditor_0 = null; @@ -169,21 +87,26 @@ private void InitializeComponent() this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.groupBox1 = new DarkUI.Controls.DarkGroupBox(); this.dataGridView_0 = new System.Windows.Forms.DataGridView(); - this.splitContainer1 = new System.Windows.Forms.SplitContainer(); - this.groupBox2 = new DarkUI.Controls.DarkGroupBox(); - this.button2 = new DarkUI.Controls.DarkButton(); - this.button1 = new DarkUI.Controls.DarkButton(); this.treeView1 = new DarkUI.Controls.DarkTreeView(); this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog(); + this.darkToolStrip1 = new DarkUI.Controls.DarkToolStrip(); + this.toolStripDropDownButton1 = new System.Windows.Forms.ToolStripDropDownButton(); + this.openbinToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.savebinToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.openDefinitionsFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.fixChecksumsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripDropDownButton2 = new System.Windows.Forms.ToolStripDropDownButton(); + this.undoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.redoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); + this.increaseSelectionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.decreaseSelectionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.tableLayoutPanel1.SuspendLayout(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_0)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); - this.splitContainer1.Panel1.SuspendLayout(); - this.splitContainer1.Panel2.SuspendLayout(); - this.splitContainer1.SuspendLayout(); - this.groupBox2.SuspendLayout(); + this.darkToolStrip1.SuspendLayout(); this.SuspendLayout(); // // tableLayoutPanel1 @@ -192,16 +115,16 @@ private void InitializeComponent() this.tableLayoutPanel1.ColumnCount = 2; this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 260F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tableLayoutPanel1.Controls.Add(this.treeView1, 0, 0); this.tableLayoutPanel1.Controls.Add(this.groupBox1, 1, 0); - this.tableLayoutPanel1.Controls.Add(this.splitContainer1, 0, 0); this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); + this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 28); this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(2); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.RowCount = 1; this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 186F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(812, 433); - this.tableLayoutPanel1.TabIndex = 1; + this.tableLayoutPanel1.Size = new System.Drawing.Size(1100, 517); + this.tableLayoutPanel1.TabIndex = 11; // // groupBox1 // @@ -212,7 +135,7 @@ private void InitializeComponent() this.groupBox1.Margin = new System.Windows.Forms.Padding(2); this.groupBox1.Name = "groupBox1"; this.groupBox1.Padding = new System.Windows.Forms.Padding(2); - this.groupBox1.Size = new System.Drawing.Size(601, 429); + this.groupBox1.Size = new System.Drawing.Size(836, 513); this.groupBox1.TabIndex = 3; this.groupBox1.TabStop = false; this.groupBox1.Text = "Table:"; @@ -221,6 +144,7 @@ private void InitializeComponent() // this.dataGridView_0.AllowUserToAddRows = false; this.dataGridView_0.AllowUserToDeleteRows = false; + this.dataGridView_0.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells; this.dataGridView_0.BackgroundColor = System.Drawing.SystemColors.ControlDarkDark; dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.ControlDarkDark; @@ -254,73 +178,16 @@ private void InitializeComponent() dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText; dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; this.dataGridView_0.RowHeadersDefaultCellStyle = dataGridViewCellStyle3; - this.dataGridView_0.RowHeadersWidth = 72; - this.dataGridView_0.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + this.dataGridView_0.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.AutoSizeToAllHeaders; this.dataGridView_0.RowTemplate.DefaultCellStyle.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; this.dataGridView_0.RowTemplate.Height = 31; - this.dataGridView_0.Size = new System.Drawing.Size(597, 412); + this.dataGridView_0.Size = new System.Drawing.Size(832, 496); this.dataGridView_0.TabIndex = 4; this.dataGridView_0.TabStop = false; - this.dataGridView_0.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.method_2); + this.dataGridView_0.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.CellValueChanged); this.dataGridView_0.DoubleClick += new System.EventHandler(this.method_3); this.dataGridView_0.KeyDown += new System.Windows.Forms.KeyEventHandler(this.method_4); // - // splitContainer1 - // - this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; - this.splitContainer1.IsSplitterFixed = true; - this.splitContainer1.Location = new System.Drawing.Point(3, 3); - this.splitContainer1.Name = "splitContainer1"; - this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; - // - // splitContainer1.Panel1 - // - this.splitContainer1.Panel1.Controls.Add(this.groupBox2); - // - // splitContainer1.Panel2 - // - this.splitContainer1.Panel2.Controls.Add(this.treeView1); - this.splitContainer1.Size = new System.Drawing.Size(254, 427); - this.splitContainer1.SplitterDistance = 68; - this.splitContainer1.TabIndex = 4; - // - // groupBox2 - // - this.groupBox2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - this.groupBox2.Controls.Add(this.button2); - this.groupBox2.Controls.Add(this.button1); - this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill; - this.groupBox2.Location = new System.Drawing.Point(0, 0); - this.groupBox2.Margin = new System.Windows.Forms.Padding(2); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.Padding = new System.Windows.Forms.Padding(2); - this.groupBox2.Size = new System.Drawing.Size(254, 68); - this.groupBox2.TabIndex = 3; - this.groupBox2.TabStop = false; - this.groupBox2.Text = "File:"; - // - // button2 - // - this.button2.Checked = false; - this.button2.Dock = System.Windows.Forms.DockStyle.Top; - this.button2.Location = new System.Drawing.Point(2, 38); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(250, 23); - this.button2.TabIndex = 1; - this.button2.Text = "Save .bin file"; - this.button2.Click += new System.EventHandler(this.button2_Click); - // - // button1 - // - this.button1.Checked = false; - this.button1.Dock = System.Windows.Forms.DockStyle.Top; - this.button1.Location = new System.Drawing.Point(2, 15); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(250, 23); - this.button1.TabIndex = 0; - this.button1.Text = "Open .bin file"; - this.button1.Click += new System.EventHandler(this.button1_Click); - // // treeView1 // this.treeView1.BackColor = System.Drawing.SystemColors.ControlDark; @@ -329,7 +196,7 @@ private void InitializeComponent() this.treeView1.FocusedNodeColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(110)))), ((int)(((byte)(175))))); this.treeView1.ImageIndex = 0; this.treeView1.ImageList = null; - this.treeView1.Location = new System.Drawing.Point(0, 0); + this.treeView1.Location = new System.Drawing.Point(2, 2); this.treeView1.Margin = new System.Windows.Forms.Padding(2); this.treeView1.MaxDragChange = 20; this.treeView1.Name = "treeView1"; @@ -337,7 +204,7 @@ private void InitializeComponent() this.treeView1.OddNodeColor = System.Drawing.Color.FromArgb(((int)(((byte)(57)))), ((int)(((byte)(60)))), ((int)(((byte)(62))))); this.treeView1.SelectedImageIndex = 0; this.treeView1.SelectWithArrowKeys = false; - this.treeView1.Size = new System.Drawing.Size(254, 355); + this.treeView1.Size = new System.Drawing.Size(256, 513); this.treeView1.TabIndex = 2; this.treeView1.SelectedNodesChanged += new System.EventHandler(this.treeView1_AfterSelect); // @@ -353,12 +220,150 @@ private void InitializeComponent() this.saveFileDialog1.Filter = "Honda binary file|*.bin"; this.saveFileDialog1.Title = "Save File"; // + // darkToolStrip1 + // + this.darkToolStrip1.AutoSize = false; + this.darkToolStrip1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(63)))), ((int)(((byte)(65))))); + this.darkToolStrip1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220))))); + this.darkToolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripDropDownButton1, + this.toolStripDropDownButton2}); + this.darkToolStrip1.Location = new System.Drawing.Point(0, 0); + this.darkToolStrip1.Name = "darkToolStrip1"; + this.darkToolStrip1.Padding = new System.Windows.Forms.Padding(5, 0, 1, 0); + this.darkToolStrip1.Size = new System.Drawing.Size(1100, 28); + this.darkToolStrip1.TabIndex = 2; + this.darkToolStrip1.Text = "darkToolStrip1"; + // + // toolStripDropDownButton1 + // + this.toolStripDropDownButton1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(63)))), ((int)(((byte)(65))))); + this.toolStripDropDownButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.toolStripDropDownButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.openbinToolStripMenuItem, + this.savebinToolStripMenuItem, + this.fixChecksumsToolStripMenuItem, + this.toolStripSeparator1, + this.openDefinitionsFolderToolStripMenuItem}); + this.toolStripDropDownButton1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220))))); + this.toolStripDropDownButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButton1.Image"))); + this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripDropDownButton1.Name = "toolStripDropDownButton1"; + this.toolStripDropDownButton1.Size = new System.Drawing.Size(38, 25); + this.toolStripDropDownButton1.Text = "File"; + // + // openbinToolStripMenuItem + // + this.openbinToolStripMenuItem.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(63)))), ((int)(((byte)(65))))); + this.openbinToolStripMenuItem.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220))))); + this.openbinToolStripMenuItem.Name = "openbinToolStripMenuItem"; + this.openbinToolStripMenuItem.Size = new System.Drawing.Size(199, 22); + this.openbinToolStripMenuItem.Text = "Open .bin"; + this.openbinToolStripMenuItem.Click += new System.EventHandler(this.button1_Click); + // + // savebinToolStripMenuItem + // + this.savebinToolStripMenuItem.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(63)))), ((int)(((byte)(65))))); + this.savebinToolStripMenuItem.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220))))); + this.savebinToolStripMenuItem.Name = "savebinToolStripMenuItem"; + this.savebinToolStripMenuItem.Size = new System.Drawing.Size(199, 22); + this.savebinToolStripMenuItem.Text = "Save .bin"; + this.savebinToolStripMenuItem.Click += new System.EventHandler(this.button2_Click); + // + // toolStripSeparator1 + // + this.toolStripSeparator1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(63)))), ((int)(((byte)(65))))); + this.toolStripSeparator1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220))))); + this.toolStripSeparator1.Margin = new System.Windows.Forms.Padding(0, 0, 0, 1); + this.toolStripSeparator1.Name = "toolStripSeparator1"; + this.toolStripSeparator1.Size = new System.Drawing.Size(196, 6); + // + // openDefinitionsFolderToolStripMenuItem + // + this.openDefinitionsFolderToolStripMenuItem.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(63)))), ((int)(((byte)(65))))); + this.openDefinitionsFolderToolStripMenuItem.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220))))); + this.openDefinitionsFolderToolStripMenuItem.Name = "openDefinitionsFolderToolStripMenuItem"; + this.openDefinitionsFolderToolStripMenuItem.Size = new System.Drawing.Size(199, 22); + this.openDefinitionsFolderToolStripMenuItem.Text = "Open Definitions Folder"; + this.openDefinitionsFolderToolStripMenuItem.Click += new System.EventHandler(this.openDefinitionsFolderToolStripMenuItem_Click); + // + // fixChecksumsToolStripMenuItem + // + this.fixChecksumsToolStripMenuItem.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(63)))), ((int)(((byte)(65))))); + this.fixChecksumsToolStripMenuItem.Enabled = false; + this.fixChecksumsToolStripMenuItem.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(153)))), ((int)(((byte)(153))))); + this.fixChecksumsToolStripMenuItem.Name = "fixChecksumsToolStripMenuItem"; + this.fixChecksumsToolStripMenuItem.Size = new System.Drawing.Size(199, 22); + this.fixChecksumsToolStripMenuItem.Text = "Fix Checksums"; + // + // toolStripDropDownButton2 + // + this.toolStripDropDownButton2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(63)))), ((int)(((byte)(65))))); + this.toolStripDropDownButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.toolStripDropDownButton2.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.undoToolStripMenuItem, + this.redoToolStripMenuItem, + this.toolStripSeparator2, + this.increaseSelectionToolStripMenuItem, + this.decreaseSelectionToolStripMenuItem}); + this.toolStripDropDownButton2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220))))); + this.toolStripDropDownButton2.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButton2.Image"))); + this.toolStripDropDownButton2.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripDropDownButton2.Name = "toolStripDropDownButton2"; + this.toolStripDropDownButton2.Size = new System.Drawing.Size(40, 25); + this.toolStripDropDownButton2.Text = "Edit"; + // + // undoToolStripMenuItem + // + this.undoToolStripMenuItem.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(63)))), ((int)(((byte)(65))))); + this.undoToolStripMenuItem.Enabled = false; + this.undoToolStripMenuItem.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(153)))), ((int)(((byte)(153))))); + this.undoToolStripMenuItem.Name = "undoToolStripMenuItem"; + this.undoToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.undoToolStripMenuItem.Text = "Undo"; + // + // redoToolStripMenuItem + // + this.redoToolStripMenuItem.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(63)))), ((int)(((byte)(65))))); + this.redoToolStripMenuItem.Enabled = false; + this.redoToolStripMenuItem.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(153)))), ((int)(((byte)(153))))); + this.redoToolStripMenuItem.Name = "redoToolStripMenuItem"; + this.redoToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.redoToolStripMenuItem.Text = "Redo"; + // + // toolStripSeparator2 + // + this.toolStripSeparator2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(63)))), ((int)(((byte)(65))))); + this.toolStripSeparator2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220))))); + this.toolStripSeparator2.Margin = new System.Windows.Forms.Padding(0, 0, 0, 1); + this.toolStripSeparator2.Name = "toolStripSeparator2"; + this.toolStripSeparator2.Size = new System.Drawing.Size(177, 6); + // + // increaseSelectionToolStripMenuItem + // + this.increaseSelectionToolStripMenuItem.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(63)))), ((int)(((byte)(65))))); + this.increaseSelectionToolStripMenuItem.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220))))); + this.increaseSelectionToolStripMenuItem.Name = "increaseSelectionToolStripMenuItem"; + this.increaseSelectionToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.increaseSelectionToolStripMenuItem.Text = "Increase Selection"; + this.increaseSelectionToolStripMenuItem.Click += new System.EventHandler(this.increaseSelectionToolStripMenuItem_Click); + // + // decreaseSelectionToolStripMenuItem + // + this.decreaseSelectionToolStripMenuItem.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(63)))), ((int)(((byte)(65))))); + this.decreaseSelectionToolStripMenuItem.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220))))); + this.decreaseSelectionToolStripMenuItem.Name = "decreaseSelectionToolStripMenuItem"; + this.decreaseSelectionToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.decreaseSelectionToolStripMenuItem.Text = "Decrease Selection"; + this.decreaseSelectionToolStripMenuItem.Click += new System.EventHandler(this.decreaseSelectionToolStripMenuItem_Click); + // // Editortable // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(812, 433); + this.ClientSize = new System.Drawing.Size(1100, 545); this.Controls.Add(this.tableLayoutPanel1); + this.Controls.Add(this.darkToolStrip1); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Margin = new System.Windows.Forms.Padding(2); this.Name = "Editortable"; @@ -367,11 +372,8 @@ private void InitializeComponent() this.tableLayoutPanel1.ResumeLayout(false); this.groupBox1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_0)).EndInit(); - this.splitContainer1.Panel1.ResumeLayout(false); - this.splitContainer1.Panel2.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); - this.splitContainer1.ResumeLayout(false); - this.groupBox2.ResumeLayout(false); + this.darkToolStrip1.ResumeLayout(false); + this.darkToolStrip1.PerformLayout(); this.ResumeLayout(false); } @@ -379,2530 +381,288 @@ private void InitializeComponent() public void Editortable_Load(object sender, EventArgs e) { this.Text = "Honda Rom Tables Editor"; - this.timer_0.Interval = 500; - this.timer_0.Tick += new EventHandler(this.timer_0_Tick); + //this.timer_0.Interval = 500; + //this.timer_0.Tick += new EventHandler(this.timer_0_Tick); this.method_5(); } - public bool method_0(string string_9) + public bool LoadDefinitionsFor(string string_9) { - if (string_9.Contains("RRB")) - { - ClassEditor_0.smethod_37(); - this.method_34(GEnum3.RRB140); - return true; - } - if (!string_9.Contains("S2K")) + ClassEditor_0.LoadSupportedECUDefinitions(); + + for (int i = 0; i < ClassEditor_0.Ecus_Definitions_Compatible.Count; i++) { - return false; + if (ClassEditor_0.Ecus_Definitions_Compatible[i] == string_9) + { + ClassEditor_0.LoadThisECUDefinitions(string_9); + + foreach (string str2 in ClassEditor_0.DefinitionsName) + { + this.list_0.Add(str2); + } + return true; + } } - ClassEditor_0.smethod_36(); - this.method_34(GEnum3.S2K); - return true; + + return false; } public void method_1() { - if (!ClassEditor_0.smethod_17(string_8)) + ClassEditor_0.bool_1 = false; + if (!ClassEditor_0.LoadROMbytes(string_8)) { DarkMessageBox.Show("Failed to open Binary file."); - ClassEditor_0.bool_1 = false; } - else if (!this.method_0(ClassEditor_0.string_0)) + else if (!this.LoadDefinitionsFor(ClassEditor_0.string_ECU_Name)) { - DarkMessageBox.Show("No definition found for " + ClassEditor_0.string_0); - ClassEditor_0.bool_1 = false; + DarkMessageBox.Show("No definition found for " + ClassEditor_0.string_ECU_Name); } else { - this.method_28(); - if (ClassEditor_0.string_0.Contains("RRB")) - { - this.method_24(); - } - if (ClassEditor_0.string_0.Contains("S2K")) - { - this.method_22(); - } - ClassEditor_0.bool_1 = true; + this.SetNodesImages(); } + ClassEditor_0.bool_1 = true; + } + + private void CellValueChanged(object sender, DataGridViewCellEventArgs e) + { + ClassEditor_0.bool_2 = true; + if (ClassEditor_0.bool_1) ClassEditor_0.SetBackColor(dataGridView_0.Columns.Count, float_1[0], float_1[1]); + + /*this.timer_0.Enabled = false; + if (ClassEditor_0.bool_0) + { + this.timer_0.Enabled = true; + }*/ } - private void method_10(int int_2) + public void SetNodesImages() { - try + this.treeView1.Nodes.Clear(); + int num = 0; + + //Makes Nodes + foreach (string str in this.list_0) { - dataGridView_0.Rows.Clear(); - dataGridView_0.Columns.Clear(); - dataGridView_0.RowTemplate.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; - int[] numArray = this.method_32(int_2, genum2_0); - int num = ClassEditor_0.int_76; - int num2 = ClassEditor_0.int_75; - int num3 = this.method_29(int_2, genum2_0); - ClassEditor_0.int_1 = numArray[0] * numArray[1]; - ClassEditor_0.int_0 = num3; - int index = 0; - while (true) + DarkTreeNode ThisNode = new DarkTreeNode(); + if (str.ToString().Contains("--")) { - if (index >= (numArray[0] * numArray[1])) - { - dataGridView_0.TopLeftHeaderCell.Value = "RPM/MAP"; - //dataGridView_0.TopLeftHeaderCell.DataGridView.BackgroundColor = System.Drawing.SystemColors.ControlDark; - int num6 = 0; - while (true) - { - if (num6 >= numArray[0]) - { - int num4 = 0; - int rowIndex = 0; - while (true) - { - if (rowIndex >= numArray[1]) - { - int num10 = 0; - while (true) - { - if (num10 >= numArray[1]) - { - dataGridView_0.AllowUserToAddRows = false; - foreach (DataGridViewColumn column in dataGridView_0.Columns) - { - column.SortMode = DataGridViewColumnSortMode.NotSortable; - column.Width = 0x2a; - } - foreach (DataGridViewRow row in (IEnumerable) dataGridView_0.Rows) - { - row.Height = 20; - } - float_1[0] = 10f; - float_1[1] = 14.8f; - ClassEditor_0.smethod_33(numArray[0], float_1[0], float_1[1]); - float_0 = 0.1f; - ClassEditor_0.bool_3 = true; - ClassEditor_0.bool_0 = true; - break; - } - int num11 = ClassEditor_0.smethod_18(num2 + (num10 * 2)); - dataGridView_0.Rows[num10].HeaderCell.Value = (num11 * 0.013334).ToString("0.0"); - //dataGridView_0.Rows[num10].HeaderCell.DataGridView.BackgroundColor = System.Drawing.SystemColors.ControlDark; - num10++; - } - break; - } - object[] values = new object[20]; - values[0] = ((128f / ((float) ClassEditor_0.int_95[num4])) * 14.7f).ToString("0.00"); - values[1] = ((128f / ((float) ClassEditor_0.int_95[num4 + 1])) * 14.7f).ToString("0.00"); - values[2] = ((128f / ((float) ClassEditor_0.int_95[num4 + 2])) * 14.7f).ToString("0.00"); - values[3] = ((128f / ((float) ClassEditor_0.int_95[num4 + 3])) * 14.7f).ToString("0.00"); - values[4] = ((128f / ((float) ClassEditor_0.int_95[num4 + 4])) * 14.7f).ToString("0.00"); - values[5] = ((128f / ((float) ClassEditor_0.int_95[num4 + 5])) * 14.7f).ToString("0.00"); - values[6] = ((128f / ((float) ClassEditor_0.int_95[num4 + 6])) * 14.7f).ToString("0.00"); - values[7] = ((128f / ((float) ClassEditor_0.int_95[num4 + 7])) * 14.7f).ToString("0.00"); - values[8] = ((128f / ((float) ClassEditor_0.int_95[num4 + 8])) * 14.7f).ToString("0.00"); - values[9] = ((128f / ((float) ClassEditor_0.int_95[num4 + 9])) * 14.7f).ToString("0.00"); - values[10] = ((128f / ((float) ClassEditor_0.int_95[num4 + 10])) * 14.7f).ToString("0.00"); - values[11] = ((128f / ((float) ClassEditor_0.int_95[num4 + 11])) * 14.7f).ToString("0.00"); - values[12] = ((128f / ((float) ClassEditor_0.int_95[num4 + 12])) * 14.7f).ToString("0.00"); - values[13] = ((128f / ((float) ClassEditor_0.int_95[num4 + 13])) * 14.7f).ToString("0.00"); - values[14] = ((128f / ((float) ClassEditor_0.int_95[num4 + 14])) * 14.7f).ToString("0.00"); - values[15] = ((128f / ((float) ClassEditor_0.int_95[num4 + 15])) * 14.7f).ToString("0.00"); - values[0x10] = ((128f / ((float) ClassEditor_0.int_95[num4 + 0x10])) * 14.7f).ToString("0.00"); - values[0x11] = ((128f / ((float) ClassEditor_0.int_95[num4 + 0x11])) * 14.7f).ToString("0.00"); - values[0x12] = ((128f / ((float) ClassEditor_0.int_95[num4 + 0x12])) * 14.7f).ToString("0.00"); - values[0x13] = ((128f / ((float) ClassEditor_0.int_95[num4 + 0x13])) * 14.7f).ToString("0.00"); - dataGridView_0.Rows.Insert(rowIndex, values); - num4 += 20; - rowIndex++; - } - break; - } - int num7 = ClassEditor_0.smethod_18(num + (num6 * 2)); - dataGridView_0.Columns.Add(ClassEditor_0.smethod_18(num + (num6 * 2)).ToString(), num7.ToString()); - num6++; - } - break; - } - ClassEditor_0.int_95[index] = ClassEditor_0.smethod_19(num3 + index); - index++; + ThisNode.Text = str.Replace("--", ""); + this.treeView1.Nodes[this.treeView1.Nodes.Count - 1].Nodes.Add(ThisNode); + continue; } + num++; + + ThisNode.Text = str; + this.treeView1.Nodes.Add(ThisNode); } - catch - { - ClassEditor_0.bool_0 = false; - DarkMessageBox.Show("Failed to load table."); - } - } - private void method_11(int int_2) - { - try + foreach (DarkTreeNode node in this.treeView1.Nodes) { - dataGridView_0.Rows.Clear(); - dataGridView_0.Columns.Clear(); - dataGridView_0.RowTemplate.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; - int[] numArray = this.method_32(int_2, genum2_0); - int num = this.method_31(int_2, genum2_0); - int num2 = this.method_30(int_2, genum2_0); - int num3 = this.method_29(int_2, genum2_0); - ClassEditor_0.int_1 = numArray[0] * numArray[1]; - ClassEditor_0.int_0 = num3; - int index = 0; - while (true) + if (node.Nodes.Count > 0) { - if (index >= (numArray[0] * numArray[1])) + foreach (DarkTreeNode node2 in node.Nodes) { - int[,] numArray2 = ClassEditor_0.smethod_35(ClassEditor_0.int_95, numArray[0], numArray[1]); - dataGridView_0.TopLeftHeaderCell.Value = "RPM/MAP"; - int num5 = 0; - while (true) + if (node.Text.Contains("limiter")) { - if (num5 >= numArray[0]) - { - int rowIndex = 0; - while (true) - { - if (rowIndex >= numArray[1]) - { - int num10 = 0; - while (true) - { - if (num10 >= numArray[1]) - { - dataGridView_0.AllowUserToAddRows = false; - foreach (DataGridViewColumn column in dataGridView_0.Columns) - { - column.SortMode = DataGridViewColumnSortMode.NotSortable; - column.Width = 0x2a; - } - foreach (DataGridViewRow row in (IEnumerable) dataGridView_0.Rows) - { - row.Height = 20; - } - float_1[0] = -10f; - float_1[1] = 55f; - ClassEditor_0.smethod_33(numArray[0], float_1[0], float_1[1]); - float_0 = 0.1f; - ClassEditor_0.bool_3 = false; - ClassEditor_0.bool_0 = true; - break; - } - dataGridView_0.Rows[num10].HeaderCell.Value = ClassEditor_0.smethod_18(num2 + (num10 * 2)).ToString(); - num10++; - } - break; - } - object[] values = new object[10]; - values[0] = (numArray2[0, rowIndex] * 0.1).ToString("0.00"); - values[1] = (numArray2[1, rowIndex] * 0.1).ToString("0.00"); - values[2] = (numArray2[2, rowIndex] * 0.1).ToString("0.00"); - values[3] = (numArray2[3, rowIndex] * 0.1).ToString("0.00"); - values[4] = (numArray2[4, rowIndex] * 0.1).ToString("0.00"); - values[5] = (numArray2[5, rowIndex] * 0.1).ToString("0.00"); - values[6] = (numArray2[6, rowIndex] * 0.1).ToString("0.00"); - values[7] = (numArray2[7, rowIndex] * 0.1).ToString("0.00"); - values[8] = (numArray2[8, rowIndex] * 0.1).ToString("0.00"); - values[9] = (numArray2[9, rowIndex] * 0.1).ToString("0.00"); - dataGridView_0.Rows.Insert(rowIndex, values); - rowIndex++; - } - break; - } - int num6 = ClassEditor_0.smethod_18(num + (num5 * 2)); - double num7 = num6 * 0.013334; - dataGridView_0.Columns.Add(num7.ToString("0.0"), num7.ToString("0.0")); - num5++; + node2.ImageKey = "Normal"; + node2.SelectedImageKey = "Normal"; + continue; + } + if (node.Text.Contains("Fuel")) + { + node2.ImageKey = "Table"; + node2.SelectedImageKey = "Table"; + continue; + } + if (node.Text.Contains("Target")) + { + node2.ImageKey = "Table"; + node2.SelectedImageKey = "Table"; + continue; } - break; + node2.ImageKey = "Degree"; + node2.SelectedImageKey = "Degree"; } - ClassEditor_0.int_95[index] = ClassEditor_0.smethod_18(num3 + (index * 2)); - index++; } - } - catch - { - ClassEditor_0.bool_0 = false; - DarkMessageBox.Show("Failed to load table."); + if ((node.Text.Contains("Revlimiter") || node.Text.Contains("Speedlimiter")) || node.Text.Contains("Limit")) + { + node.ImageKey = "Normal"; + node.SelectedImageKey = "Normal"; + } + else if (node.Text.Contains("00\x00b0")) + { + node.ImageKey = "Degree"; + node.SelectedImageKey = "Degree"; + } + else if (node.Text.Contains("VTC High") || node.Text.Contains("Timing High Cam")) + { + node.ImageKey = "HighCam"; + node.SelectedImageKey = "HighCam"; + } + else if (node.Text.Contains("VTC Low") || node.Text.Contains("Timing Low Cam")) + { + node.ImageKey = "LowCam"; + node.SelectedImageKey = "LowCam"; + } + else if (node.Text.Contains("Fuel High")) + { + node.ImageKey = "HighFuel"; + node.SelectedImageKey = "HighFuel"; + } + else if (node.Text.Contains("Fuel Low")) + { + node.ImageKey = "LowFuel"; + node.SelectedImageKey = "LowFuel"; + } + else if (node.Text.Contains("Target High")) + { + node.ImageKey = "HighFuel"; + node.SelectedImageKey = "HighFuel"; + } + else if (node.Text.Contains("Target Low")) + { + node.ImageKey = "LowFuel"; + node.SelectedImageKey = "LowFuel"; + } + else if (node.Text.Contains("AFM Fuel")) + { + node.ImageKey = "LowFuel"; + node.SelectedImageKey = "LowFuel"; + } + else if ((node.Text.Contains("VTEC") || node.Text.Contains("Idle")) || node.Text.Contains("WOT")) + { + node.ImageKey = "Vtec"; + node.SelectedImageKey = "Vtec"; + } + else if (node.Text.Contains("Knock")) + { + node.ImageKey = "Knock"; + node.SelectedImageKey = "Knock"; + } + else if (node.Text.Contains("Overrun")) + { + node.ImageKey = "Bang"; + node.SelectedImageKey = "Bang"; + } + else if ((node.Text.Contains("Compensation") || node.Text.Contains("Conversion")) || node.Text.Contains("LAF")) + { + node.ImageKey = "Red"; + node.SelectedImageKey = "Red"; + } } } - private void method_12(int int_2) + private void method_3(object sender, EventArgs e) { - try - { - dataGridView_0.Rows.Clear(); - dataGridView_0.Columns.Clear(); - dataGridView_0.RowTemplate.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; - int[] numArray = this.method_32(int_2, genum2_0); - int num = this.method_31(int_2, genum2_0); - int num2 = this.method_30(int_2, genum2_0); - int num3 = this.method_29(int_2, genum2_0); - ClassEditor_0.int_1 = numArray[0] * numArray[1]; - ClassEditor_0.int_0 = num3; - int index = 0; - while (true) - { - if (index >= (numArray[0] * numArray[1])) - { - int[,] numArray2 = ClassEditor_0.smethod_35(ClassEditor_0.int_95, numArray[0], numArray[1]); - dataGridView_0.TopLeftHeaderCell.Value = "RPM/MAP"; - int num5 = 0; - while (true) - { - if (num5 >= numArray[0]) - { - int rowIndex = 0; - while (true) - { - if (rowIndex >= numArray[1]) - { - int num10 = 0; - while (true) - { - if (num10 >= numArray[1]) - { - dataGridView_0.AllowUserToAddRows = false; - foreach (DataGridViewColumn column in dataGridView_0.Columns) - { - column.SortMode = DataGridViewColumnSortMode.NotSortable; - column.Width = 0x2a; - } - foreach (DataGridViewRow row in (IEnumerable) dataGridView_0.Rows) - { - row.Height = 20; - } - float_1[0] = -10f; - float_1[1] = 55f; - ClassEditor_0.smethod_33(numArray[0], float_1[0], float_1[1]); - float_0 = 0.1f; - ClassEditor_0.bool_3 = false; - ClassEditor_0.bool_0 = true; - break; - } - dataGridView_0.Rows[num10].HeaderCell.Value = ClassEditor_0.smethod_18(num2 + (num10 * 2)).ToString(); - num10++; - } - break; - } - object[] values = new object[10]; - values[0] = (numArray2[0, rowIndex] * 0.1).ToString("0.00"); - values[1] = (numArray2[1, rowIndex] * 0.1).ToString("0.00"); - values[2] = (numArray2[2, rowIndex] * 0.1).ToString("0.00"); - values[3] = (numArray2[3, rowIndex] * 0.1).ToString("0.00"); - values[4] = (numArray2[4, rowIndex] * 0.1).ToString("0.00"); - values[5] = (numArray2[5, rowIndex] * 0.1).ToString("0.00"); - values[6] = (numArray2[6, rowIndex] * 0.1).ToString("0.00"); - values[7] = (numArray2[7, rowIndex] * 0.1).ToString("0.00"); - values[8] = (numArray2[8, rowIndex] * 0.1).ToString("0.00"); - values[9] = (numArray2[9, rowIndex] * 0.1).ToString("0.00"); - dataGridView_0.Rows.Insert(rowIndex, values); - rowIndex++; - } - break; - } - int num6 = ClassEditor_0.smethod_18(num + (num5 * 2)); - double num7 = num6 * 0.013334; - dataGridView_0.Columns.Add(num7.ToString("0.0"), num7.ToString("0.0")); - num5++; - } - break; + dataGridView_0.ReadOnly = false; + } + + private void method_4(object sender, KeyEventArgs e) + { + ClassEditor_0.ShortcutsCommand(e, 0); + } + + public void method_5() + { + ContextMenu menu = new ContextMenu { + MenuItems = { + { + "Increase selection", + new EventHandler(this.method_6) + }, + { + "Decrease selection", + new EventHandler(this.method_7) } - ClassEditor_0.int_95[index] = ClassEditor_0.smethod_18(num3 + (index * 2)); - index++; } - } - catch + }; + this.ContextMenu = menu; + } + + private void method_6(object sender, EventArgs e) + { + ClassEditor_0.ShortcutsCommand(new KeyEventArgs(Keys.None), 2); + } + + private void method_7(object sender, EventArgs e) + { + ClassEditor_0.ShortcutsCommand(new KeyEventArgs(Keys.None), 3); + } + + protected override void Dispose(bool disposing) + { + if (disposing && (this.icontainer_0 != null)) { - ClassEditor_0.bool_0 = false; - DarkMessageBox.Show("Failed to load table."); + this.icontainer_0.Dispose(); } + base.Dispose(disposing); + } + + private void timer_0_Tick(object sender, EventArgs e) + { + ClassEditor_0.SetBackColor(dataGridView_0.Columns.Count, float_1[0], float_1[1]); + //this.timer_0.Enabled = false; } - private void method_13(int int_2) + /*public static ImageList ImageList_0 { - try + get { - dataGridView_0.Rows.Clear(); - dataGridView_0.Columns.Clear(); - dataGridView_0.RowTemplate.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; - int[] numArray = this.method_32(int_2, genum2_0); - int num = this.method_31(int_2, genum2_0); - int num2 = this.method_30(int_2, genum2_0); - int num3 = this.method_29(int_2, genum2_0); - ClassEditor_0.int_1 = numArray[0] * numArray[1]; - ClassEditor_0.int_0 = num3; - int index = 0; - while (true) + if (imageList_0 == null) { - if (index >= (numArray[0] * numArray[1])) - { - int[,] numArray2 = ClassEditor_0.smethod_35(ClassEditor_0.int_95, numArray[0], numArray[1]); - dataGridView_0.TopLeftHeaderCell.Value = "RPM/MAP"; - int num5 = 0; - while (true) - { - if (num5 >= numArray[0]) - { - int rowIndex = 0; - while (true) - { - if (rowIndex >= numArray[1]) - { - int num10 = 0; - while (true) - { - if (num10 >= numArray[1]) - { - dataGridView_0.AllowUserToAddRows = false; - foreach (DataGridViewColumn column in dataGridView_0.Columns) - { - column.SortMode = DataGridViewColumnSortMode.NotSortable; - column.Width = 0x2a; - } - foreach (DataGridViewRow row in (IEnumerable) dataGridView_0.Rows) - { - row.Height = 20; - } - float_1[0] = -25f; - float_1[1] = 60f; - ClassEditor_0.smethod_33(numArray[0], float_1[0], float_1[1]); - float_0 = 0.1f; - ClassEditor_0.bool_3 = false; - ClassEditor_0.bool_0 = true; - break; - } - dataGridView_0.Rows[num10].HeaderCell.Value = ClassEditor_0.smethod_18(num2 + (num10 * 2)).ToString(); - num10++; - } - break; - } - object[] values = new object[10]; - values[0] = (numArray2[0, rowIndex] * 0.1).ToString("0.00"); - values[1] = (numArray2[1, rowIndex] * 0.1).ToString("0.00"); - values[2] = (numArray2[2, rowIndex] * 0.1).ToString("0.00"); - values[3] = (numArray2[3, rowIndex] * 0.1).ToString("0.00"); - values[4] = (numArray2[4, rowIndex] * 0.1).ToString("0.00"); - values[5] = (numArray2[5, rowIndex] * 0.1).ToString("0.00"); - values[6] = (numArray2[6, rowIndex] * 0.1).ToString("0.00"); - values[7] = (numArray2[7, rowIndex] * 0.1).ToString("0.00"); - values[8] = (numArray2[8, rowIndex] * 0.1).ToString("0.00"); - values[9] = (numArray2[9, rowIndex] * 0.1).ToString("0.00"); - dataGridView_0.Rows.Insert(rowIndex, values); - rowIndex++; - } - break; - } - int num6 = ClassEditor_0.smethod_18(num + (num5 * 2)); - double num7 = num6 * 0.013334; - dataGridView_0.Columns.Add(num7.ToString("0.0"), num7.ToString("0.0")); - num5++; - } - break; - } - ClassEditor_0.int_95[index] = ClassEditor_0.smethod_18(num3 + (index * 2)); - index++; + imageList_0 = new ImageList(); + imageList_0.Images.Add("HighCam", global::Properties.Resources.Lightning2); + imageList_0.Images.Add("LowCam", global::Properties.Resources.Lightning); + imageList_0.Images.Add("HighFuel", global::Properties.Resources.injector2); + imageList_0.Images.Add("LowFuel", global::Properties.Resources.injector1); + imageList_0.Images.Add("Table", global::Properties.Resources.Script1); + imageList_0.Images.Add("Degree", global::Properties.Resources.Target); + imageList_0.Images.Add("Red", global::Properties.Resources.Report); + imageList_0.Images.Add("Normal", global::Properties.Resources.Wrench); + imageList_0.Images.Add("Vtec", global::Properties.Resources.Pinion); + imageList_0.Images.Add("Knock", global::Properties.Resources.Problem); + imageList_0.Images.Add("Bang", global::Properties.Resources.Disaster); } + return imageList_0; } - catch - { - ClassEditor_0.bool_0 = false; - DarkMessageBox.Show("Failed to load table."); - } - } + }*/ - private void method_14(int int_2) + private int GetNodeParameterIndex(string text, string ParentNode) { - try + //return within parent + if (ParentNode != "") { - dataGridView_0.Rows.Clear(); - dataGridView_0.Columns.Clear(); - dataGridView_0.RowTemplate.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; - int[] numArray = this.method_32(int_2, genum2_0); - int num = this.method_31(int_2, genum2_0); - int num2 = this.method_30(int_2, genum2_0); - int num3 = this.method_29(int_2, genum2_0); - ClassEditor_0.int_1 = numArray[0] * numArray[1]; - ClassEditor_0.int_0 = num3; - int index = 0; - while (true) + bool ParentFound = false; + for (int i = 0; i < ClassEditor_0.DefinitionsName.Count; i++) { - if (index >= (numArray[0] * numArray[1])) + if (ClassEditor_0.DefinitionsName[i] == ParentNode) ParentFound = true; + if (ParentFound) { - int[,] numArray2 = ClassEditor_0.smethod_35(ClassEditor_0.int_95, numArray[0], numArray[1]); - dataGridView_0.TopLeftHeaderCell.Value = "RPM/MAP"; - int num5 = 0; - while (true) - { - if (num5 >= numArray[0]) - { - int rowIndex = 0; - while (true) - { - if (rowIndex >= numArray[1]) - { - int num10 = 0; - while (true) - { - if (num10 >= numArray[1]) - { - dataGridView_0.AllowUserToAddRows = false; - foreach (DataGridViewColumn column in dataGridView_0.Columns) - { - column.SortMode = DataGridViewColumnSortMode.NotSortable; - column.Width = 0x2a; - } - foreach (DataGridViewRow row in (IEnumerable) dataGridView_0.Rows) - { - row.Height = 20; - } - float_1[0] = -25f; - float_1[1] = 80f; - ClassEditor_0.smethod_33(numArray[0], float_1[0], float_1[1]); - float_0 = 0.1f; - ClassEditor_0.bool_3 = false; - ClassEditor_0.bool_0 = true; - break; - } - dataGridView_0.Rows[num10].HeaderCell.Value = ClassEditor_0.smethod_18(num2 + (num10 * 2)).ToString(); - num10++; - } - break; - } - object[] values = new object[10]; - values[0] = (numArray2[0, rowIndex] * 0.1).ToString("0.00"); - values[1] = (numArray2[1, rowIndex] * 0.1).ToString("0.00"); - values[2] = (numArray2[2, rowIndex] * 0.1).ToString("0.00"); - values[3] = (numArray2[3, rowIndex] * 0.1).ToString("0.00"); - values[4] = (numArray2[4, rowIndex] * 0.1).ToString("0.00"); - values[5] = (numArray2[5, rowIndex] * 0.1).ToString("0.00"); - values[6] = (numArray2[6, rowIndex] * 0.1).ToString("0.00"); - values[7] = (numArray2[7, rowIndex] * 0.1).ToString("0.00"); - values[8] = (numArray2[8, rowIndex] * 0.1).ToString("0.00"); - values[9] = (numArray2[9, rowIndex] * 0.1).ToString("0.00"); - dataGridView_0.Rows.Insert(rowIndex, values); - rowIndex++; - } - break; - } - int num6 = ClassEditor_0.smethod_18(num + (num5 * 2)); - double num7 = num6 * 0.013334; - dataGridView_0.Columns.Add(num7.ToString("0.0"), num7.ToString("0.0")); - num5++; - } - break; + if (ClassEditor_0.DefinitionsName[i] == text || ClassEditor_0.DefinitionsName[i] == "--" + text) return i; } - ClassEditor_0.int_95[index] = ClassEditor_0.smethod_18(num3 + (index * 2)); - index++; } } - catch - { - ClassEditor_0.bool_0 = false; - DarkMessageBox.Show("Failed to load table."); - } - } - private void method_15() - { - try + //return exact + for (int i = 0; i < ClassEditor_0.DefinitionsName.Count; i++) { - dataGridView_0.Rows.Clear(); - dataGridView_0.Columns.Clear(); - dataGridView_0.RowTemplate.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; - int[] numArray = ClassEditor_0.int_192; - int num = ClassEditor_0.int_182; - int num2 = ClassEditor_0.int_183; - int num3 = ClassEditor_0.int_189; - ClassEditor_0.int_1 = numArray[0] * numArray[1]; - ClassEditor_0.int_0 = num3; - int index = 0; - while (true) + if (ClassEditor_0.DefinitionsName[i] == text) { - if (index >= (numArray[0] * numArray[1])) - { - int[,] numArray2 = ClassEditor_0.smethod_35(ClassEditor_0.int_95, numArray[0], numArray[1]); - dataGridView_0.TopLeftHeaderCell.Value = "RPM/MAP"; - int num5 = 0; - while (true) - { - if (num5 >= numArray[0]) - { - int rowIndex = 0; - while (true) - { - if (rowIndex >= numArray[1]) - { - int num10 = 0; - while (true) - { - if (num10 >= numArray[1]) - { - dataGridView_0.AllowUserToAddRows = false; - foreach (DataGridViewColumn column in dataGridView_0.Columns) - { - column.SortMode = DataGridViewColumnSortMode.NotSortable; - column.Width = 0x2a; - } - foreach (DataGridViewRow row in (IEnumerable) dataGridView_0.Rows) - { - row.Height = 20; - } - float_1[0] = -5f; - float_1[1] = 205f; - ClassEditor_0.smethod_33(numArray[0], float_1[0], float_1[1]); - float_0 = 0.1f; - ClassEditor_0.bool_3 = false; - ClassEditor_0.bool_0 = true; - break; - } - dataGridView_0.Rows[num10].HeaderCell.Value = ClassEditor_0.smethod_18(num2 + (num10 * 2)).ToString(); - num10++; - } - break; - } - object[] values = new object[10]; - values[0] = (numArray2[0, rowIndex] * 0.1).ToString("0.00"); - values[1] = (numArray2[1, rowIndex] * 0.1).ToString("0.00"); - values[2] = (numArray2[2, rowIndex] * 0.1).ToString("0.00"); - values[3] = (numArray2[3, rowIndex] * 0.1).ToString("0.00"); - values[4] = (numArray2[4, rowIndex] * 0.1).ToString("0.00"); - values[5] = (numArray2[5, rowIndex] * 0.1).ToString("0.00"); - values[6] = (numArray2[6, rowIndex] * 0.1).ToString("0.00"); - values[7] = (numArray2[7, rowIndex] * 0.1).ToString("0.00"); - values[8] = (numArray2[8, rowIndex] * 0.1).ToString("0.00"); - values[9] = (numArray2[9, rowIndex] * 0.1).ToString("0.00"); - dataGridView_0.Rows.Insert(rowIndex, values); - rowIndex++; - } - break; - } - int num6 = ClassEditor_0.smethod_18(num + (num5 * 2)); - double num7 = num6 * 0.013334; - dataGridView_0.Columns.Add(num7.ToString("0.0"), num7.ToString("0.0")); - num5++; - } - break; - } - ClassEditor_0.int_95[index] = ClassEditor_0.smethod_18(num3 + (index * 2)); - index++; - } - } - catch - { - ClassEditor_0.bool_0 = false; - DarkMessageBox.Show("Failed to load table."); - } - } - - private void method_16() - { - try - { - dataGridView_0.Rows.Clear(); - dataGridView_0.Columns.Clear(); - dataGridView_0.RowTemplate.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; - int[] numArray = ClassEditor_0.int_196; - int num = ClassEditor_0.int_186; - int num2 = ClassEditor_0.int_187; - int num3 = ClassEditor_0.int_193; - ClassEditor_0.int_1 = numArray[0] * numArray[1]; - ClassEditor_0.int_0 = num3; - int index = 0; - while (true) - { - if (index >= (numArray[0] * numArray[1])) - { - int[,] numArray2 = ClassEditor_0.smethod_35(ClassEditor_0.int_95, numArray[0], numArray[1]); - dataGridView_0.TopLeftHeaderCell.Value = "RPM/MAP"; - int num5 = 0; - while (true) - { - if (num5 >= numArray[0]) - { - int rowIndex = 0; - while (true) - { - if (rowIndex >= numArray[1]) - { - int num10 = 0; - while (true) - { - if (num10 >= numArray[1]) - { - dataGridView_0.AllowUserToAddRows = false; - foreach (DataGridViewColumn column in dataGridView_0.Columns) - { - column.SortMode = DataGridViewColumnSortMode.NotSortable; - column.Width = 0x2a; - } - foreach (DataGridViewRow row in (IEnumerable) dataGridView_0.Rows) - { - row.Height = 20; - } - float_1[0] = -5f; - float_1[1] = 205f; - ClassEditor_0.smethod_33(numArray[0], float_1[0], float_1[1]); - float_0 = 0.1f; - ClassEditor_0.bool_3 = false; - ClassEditor_0.bool_0 = true; - break; - } - dataGridView_0.Rows[num10].HeaderCell.Value = ClassEditor_0.smethod_18(num2 + (num10 * 2)).ToString(); - num10++; - } - break; - } - object[] values = new object[10]; - values[0] = (numArray2[0, rowIndex] * 0.1).ToString("0.00"); - values[1] = (numArray2[1, rowIndex] * 0.1).ToString("0.00"); - values[2] = (numArray2[2, rowIndex] * 0.1).ToString("0.00"); - values[3] = (numArray2[3, rowIndex] * 0.1).ToString("0.00"); - values[4] = (numArray2[4, rowIndex] * 0.1).ToString("0.00"); - values[5] = (numArray2[5, rowIndex] * 0.1).ToString("0.00"); - values[6] = (numArray2[6, rowIndex] * 0.1).ToString("0.00"); - values[7] = (numArray2[7, rowIndex] * 0.1).ToString("0.00"); - values[8] = (numArray2[8, rowIndex] * 0.1).ToString("0.00"); - values[9] = (numArray2[9, rowIndex] * 0.1).ToString("0.00"); - dataGridView_0.Rows.Insert(rowIndex, values); - rowIndex++; - } - break; - } - int num6 = ClassEditor_0.smethod_18(num + (num5 * 2)); - double num7 = num6 * 0.013334; - dataGridView_0.Columns.Add(num7.ToString("0.0"), num7.ToString("0.0")); - num5++; - } - break; - } - ClassEditor_0.int_95[index] = ClassEditor_0.smethod_18(num3 + (index * 2)); - index++; - } - } - catch - { - ClassEditor_0.bool_0 = false; - DarkMessageBox.Show("Failed to load table."); - } - } - - private void method_17() - { - try - { - dataGridView_0.Rows.Clear(); - dataGridView_0.Columns.Clear(); - dataGridView_0.RowTemplate.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; - int[] numArray = ClassEditor_0.int_184; - int num = ClassEditor_0.int_182; - int num2 = ClassEditor_0.int_183; - int num3 = ClassEditor_0.int_181; - ClassEditor_0.int_1 = numArray[0] * numArray[1]; - ClassEditor_0.int_0 = num3; - int index = 0; - while (true) - { - if (index >= (numArray[0] * numArray[1])) - { - int[,] numArray2 = ClassEditor_0.smethod_35(ClassEditor_0.int_95, numArray[0], numArray[1]); - dataGridView_0.TopLeftHeaderCell.Value = "RPM/MAP"; - int num5 = 0; - while (true) - { - if (num5 >= numArray[0]) - { - int rowIndex = 0; - while (true) - { - if (rowIndex >= numArray[1]) - { - int num10 = 0; - while (true) - { - if (num10 >= numArray[1]) - { - dataGridView_0.AllowUserToAddRows = false; - foreach (DataGridViewColumn column in dataGridView_0.Columns) - { - column.SortMode = DataGridViewColumnSortMode.NotSortable; - column.Width = 0x2a; - } - foreach (DataGridViewRow row in (IEnumerable) dataGridView_0.Rows) - { - row.Height = 20; - } - float_1[0] = -5f; - float_1[1] = 20f; - ClassEditor_0.smethod_33(numArray[0], float_1[0], float_1[1]); - float_0 = 0.1f; - ClassEditor_0.bool_3 = true; - ClassEditor_0.bool_0 = true; - break; - } - dataGridView_0.Rows[num10].HeaderCell.Value = ClassEditor_0.smethod_18(num2 + (num10 * 2)).ToString(); - num10++; - } - break; - } - object[] values = new object[10]; - values[0] = (numArray2[0, rowIndex] * 0.1).ToString("0.00"); - values[1] = (numArray2[1, rowIndex] * 0.1).ToString("0.00"); - values[2] = (numArray2[2, rowIndex] * 0.1).ToString("0.00"); - values[3] = (numArray2[3, rowIndex] * 0.1).ToString("0.00"); - values[4] = (numArray2[4, rowIndex] * 0.1).ToString("0.00"); - values[5] = (numArray2[5, rowIndex] * 0.1).ToString("0.00"); - values[6] = (numArray2[6, rowIndex] * 0.1).ToString("0.00"); - values[7] = (numArray2[7, rowIndex] * 0.1).ToString("0.00"); - values[8] = (numArray2[8, rowIndex] * 0.1).ToString("0.00"); - values[9] = (numArray2[9, rowIndex] * 0.1).ToString("0.00"); - dataGridView_0.Rows.Insert(rowIndex, values); - rowIndex++; - } - break; - } - int num6 = ClassEditor_0.smethod_18(num + (num5 * 2)); - double num7 = num6 * 0.013334; - dataGridView_0.Columns.Add(num7.ToString("0.0"), num7.ToString("0.0")); - num5++; - } - break; - } - ClassEditor_0.int_95[index] = ClassEditor_0.smethod_19(num3 + index); - index++; - } - } - catch - { - ClassEditor_0.bool_0 = false; - DarkMessageBox.Show("Failed to load table."); - } - } - - private void method_18() - { - try - { - dataGridView_0.Rows.Clear(); - dataGridView_0.Columns.Clear(); - dataGridView_0.RowTemplate.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; - int[] numArray = ClassEditor_0.int_188; - int num = ClassEditor_0.int_186; - int num2 = ClassEditor_0.int_187; - int num3 = ClassEditor_0.int_185; - ClassEditor_0.int_1 = numArray[0] * numArray[1]; - ClassEditor_0.int_0 = num3; - int index = 0; - while (true) - { - if (index >= (numArray[0] * numArray[1])) - { - int[,] numArray2 = ClassEditor_0.smethod_35(ClassEditor_0.int_95, numArray[0], numArray[1]); - dataGridView_0.TopLeftHeaderCell.Value = "RPM/MAP"; - int num5 = 0; - while (true) - { - if (num5 >= numArray[0]) - { - int rowIndex = 0; - while (true) - { - if (rowIndex >= numArray[1]) - { - int num10 = 0; - while (true) - { - if (num10 >= numArray[1]) - { - dataGridView_0.AllowUserToAddRows = false; - foreach (DataGridViewColumn column in dataGridView_0.Columns) - { - column.SortMode = DataGridViewColumnSortMode.NotSortable; - column.Width = 0x2a; - } - foreach (DataGridViewRow row in (IEnumerable) dataGridView_0.Rows) - { - row.Height = 20; - } - float_1[0] = -5f; - float_1[1] = 20f; - ClassEditor_0.smethod_33(numArray[0], float_1[0], float_1[1]); - float_0 = 0.1f; - ClassEditor_0.bool_3 = true; - ClassEditor_0.bool_0 = true; - break; - } - dataGridView_0.Rows[num10].HeaderCell.Value = ClassEditor_0.smethod_18(num2 + (num10 * 2)).ToString(); - num10++; - } - break; - } - object[] values = new object[10]; - values[0] = (numArray2[0, rowIndex] * 0.1).ToString("0.00"); - values[1] = (numArray2[1, rowIndex] * 0.1).ToString("0.00"); - values[2] = (numArray2[2, rowIndex] * 0.1).ToString("0.00"); - values[3] = (numArray2[3, rowIndex] * 0.1).ToString("0.00"); - values[4] = (numArray2[4, rowIndex] * 0.1).ToString("0.00"); - values[5] = (numArray2[5, rowIndex] * 0.1).ToString("0.00"); - values[6] = (numArray2[6, rowIndex] * 0.1).ToString("0.00"); - values[7] = (numArray2[7, rowIndex] * 0.1).ToString("0.00"); - values[8] = (numArray2[8, rowIndex] * 0.1).ToString("0.00"); - values[9] = (numArray2[9, rowIndex] * 0.1).ToString("0.00"); - dataGridView_0.Rows.Insert(rowIndex, values); - rowIndex++; - } - break; - } - int num6 = ClassEditor_0.smethod_18(num + (num5 * 2)); - double num7 = num6 * 0.013334; - dataGridView_0.Columns.Add(num7.ToString("0.0"), num7.ToString("0.0")); - num5++; - } - break; - } - ClassEditor_0.int_95[index] = ClassEditor_0.smethod_19(num3 + index); - index++; - } - } - catch - { - ClassEditor_0.bool_0 = false; - DarkMessageBox.Show("Failed to load table."); - } - } - - private void method_19() - { - try - { - dataGridView_0.Rows.Clear(); - dataGridView_0.Columns.Clear(); - dataGridView_0.RowTemplate.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; - int[] numArray = ClassEditor_0.int_102; - int num = ClassEditor_0.int_100; - int num2 = ClassEditor_0.int_101; - int num3 = ClassEditor_0.int_99; - ClassEditor_0.int_1 = numArray[0] * numArray[1]; - ClassEditor_0.int_0 = num3; - int index = 0; - while (true) - { - if (index >= (numArray[0] * numArray[1])) - { - int[,] numArray2 = ClassEditor_0.smethod_35(ClassEditor_0.int_95, numArray[0], numArray[1]); - dataGridView_0.TopLeftHeaderCell.Value = "RPM/MAP"; - int num5 = 0; - while (true) - { - if (num5 >= numArray[0]) - { - int rowIndex = 0; - while (true) - { - if (rowIndex >= numArray[1]) - { - int num10 = 0; - while (true) - { - if (num10 >= numArray[1]) - { - dataGridView_0.AllowUserToAddRows = false; - foreach (DataGridViewColumn column in dataGridView_0.Columns) - { - column.SortMode = DataGridViewColumnSortMode.NotSortable; - column.Width = 0x2a; - } - foreach (DataGridViewRow row in (IEnumerable) dataGridView_0.Rows) - { - row.Height = 20; - } - float_1[0] = -10f; - float_1[1] = 55f; - ClassEditor_0.smethod_33(numArray[0], float_1[0], float_1[1]); - float_0 = 0.1f; - ClassEditor_0.bool_3 = false; - ClassEditor_0.bool_0 = true; - break; - } - dataGridView_0.Rows[num10].HeaderCell.Value = ClassEditor_0.smethod_18(num2 + (num10 * 2)).ToString(); - num10++; - } - break; - } - object[] values = new object[10]; - values[0] = (numArray2[0, rowIndex] * 0.1).ToString("0.00"); - values[1] = (numArray2[1, rowIndex] * 0.1).ToString("0.00"); - values[2] = (numArray2[2, rowIndex] * 0.1).ToString("0.00"); - values[3] = (numArray2[3, rowIndex] * 0.1).ToString("0.00"); - values[4] = (numArray2[4, rowIndex] * 0.1).ToString("0.00"); - values[5] = (numArray2[5, rowIndex] * 0.1).ToString("0.00"); - values[6] = (numArray2[6, rowIndex] * 0.1).ToString("0.00"); - values[7] = (numArray2[7, rowIndex] * 0.1).ToString("0.00"); - values[8] = (numArray2[8, rowIndex] * 0.1).ToString("0.00"); - values[9] = (numArray2[9, rowIndex] * 0.1).ToString("0.00"); - dataGridView_0.Rows.Insert(rowIndex, values); - rowIndex++; - } - break; - } - int num6 = ClassEditor_0.smethod_18(num + (num5 * 2)); - double num7 = num6 * 0.013334; - dataGridView_0.Columns.Add(num7.ToString("0.0"), num7.ToString("0.0")); - num5++; - } - break; - } - ClassEditor_0.int_95[index] = ClassEditor_0.smethod_18(num3 + (index * 2)); - index++; - } - } - catch - { - ClassEditor_0.bool_0 = false; - DarkMessageBox.Show("Failed to load table."); - } - } - - private void method_2(object sender, DataGridViewCellEventArgs e) - { - this.timer_0.Enabled = false; - if (ClassEditor_0.bool_0) - { - this.timer_0.Enabled = true; - } - } - - private void method_20() - { - try - { - dataGridView_0.Rows.Clear(); - dataGridView_0.Columns.Clear(); - dataGridView_0.RowTemplate.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; - int[] numArray = ClassEditor_0.int_106; - int num = ClassEditor_0.int_104; - int num2 = ClassEditor_0.int_105; - int num3 = ClassEditor_0.int_103; - ClassEditor_0.int_1 = numArray[0] * numArray[1]; - ClassEditor_0.int_0 = num3; - int index = 0; - while (true) - { - if (index >= (numArray[0] * numArray[1])) - { - int[,] numArray2 = ClassEditor_0.smethod_35(ClassEditor_0.int_95, numArray[0], numArray[1]); - dataGridView_0.TopLeftHeaderCell.Value = "RPM/MAP"; - int num5 = 0; - while (true) - { - if (num5 >= numArray[0]) - { - int rowIndex = 0; - while (true) - { - if (rowIndex >= numArray[1]) - { - int num10 = 0; - while (true) - { - if (num10 >= numArray[1]) - { - dataGridView_0.AllowUserToAddRows = false; - foreach (DataGridViewColumn column in dataGridView_0.Columns) - { - column.SortMode = DataGridViewColumnSortMode.NotSortable; - column.Width = 0x2a; - } - foreach (DataGridViewRow row in (IEnumerable) dataGridView_0.Rows) - { - row.Height = 20; - } - float_1[0] = -10f; - float_1[1] = 55f; - ClassEditor_0.smethod_33(numArray[0], float_1[0], float_1[1]); - float_0 = 0.1f; - ClassEditor_0.bool_3 = false; - ClassEditor_0.bool_0 = true; - break; - } - dataGridView_0.Rows[num10].HeaderCell.Value = ClassEditor_0.smethod_18(num2 + (num10 * 2)).ToString(); - num10++; - } - break; - } - object[] values = new object[10]; - values[0] = (numArray2[0, rowIndex] * 0.1).ToString("0.00"); - values[1] = (numArray2[1, rowIndex] * 0.1).ToString("0.00"); - values[2] = (numArray2[2, rowIndex] * 0.1).ToString("0.00"); - values[3] = (numArray2[3, rowIndex] * 0.1).ToString("0.00"); - values[4] = (numArray2[4, rowIndex] * 0.1).ToString("0.00"); - values[5] = (numArray2[5, rowIndex] * 0.1).ToString("0.00"); - values[6] = (numArray2[6, rowIndex] * 0.1).ToString("0.00"); - values[7] = (numArray2[7, rowIndex] * 0.1).ToString("0.00"); - values[8] = (numArray2[8, rowIndex] * 0.1).ToString("0.00"); - values[9] = (numArray2[9, rowIndex] * 0.1).ToString("0.00"); - dataGridView_0.Rows.Insert(rowIndex, values); - rowIndex++; - } - break; - } - int num6 = ClassEditor_0.smethod_18(num + (num5 * 2)); - double num7 = num6 * 0.013334; - dataGridView_0.Columns.Add(num7.ToString("0.0"), num7.ToString("0.0")); - num5++; - } - break; - } - ClassEditor_0.int_95[index] = ClassEditor_0.smethod_18(num3 + (index * 2)); - index++; - } - } - catch - { - ClassEditor_0.bool_0 = false; - DarkMessageBox.Show("Failed to load table."); - } - } - - private void method_21() - { - try - { - dataGridView_0.Rows.Clear(); - dataGridView_0.Columns.Clear(); - dataGridView_0.RowTemplate.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; - int[] numArray = ClassEditor_0.int_110; - int num = ClassEditor_0.int_108; - int num2 = ClassEditor_0.int_109; - int num3 = ClassEditor_0.int_107; - ClassEditor_0.int_1 = numArray[0] * numArray[1]; - ClassEditor_0.int_0 = num3; - int index = 0; - while (true) - { - if (index >= (numArray[0] * numArray[1])) - { - int[,] numArray2 = ClassEditor_0.smethod_35(ClassEditor_0.int_94, numArray[0], numArray[1]); - dataGridView_0.TopLeftHeaderCell.Value = "RPM/MAP"; - int num5 = 0; - while (true) - { - int num6; - if (num5 >= numArray[0]) - { - int rowIndex = 0; - while (true) - { - if (rowIndex >= numArray[1]) - { - int num9 = 0; - while (true) - { - if (num9 >= numArray[1]) - { - dataGridView_0.AllowUserToAddRows = false; - foreach (DataGridViewColumn column in dataGridView_0.Columns) - { - column.SortMode = DataGridViewColumnSortMode.NotSortable; - column.Width = 0x2a; - } - foreach (DataGridViewRow row in (IEnumerable) dataGridView_0.Rows) - { - row.Height = 20; - } - float_1[0] = 0f; - float_1[1] = 500f; - ClassEditor_0.smethod_33(numArray[0], float_1[0], float_1[1]); - float_0 = 1f; - ClassEditor_0.bool_3 = false; - ClassEditor_0.bool_0 = true; - break; - } - num6 = ClassEditor_0.smethod_18(num2 + (num9 * 2)); - dataGridView_0.Rows[num9].HeaderCell.Value = num6.ToString(); - num9++; - } - break; - } - object[] values = new object[10]; - values[0] = (numArray2[0, rowIndex] * 0.1).ToString("0.00"); - values[1] = (numArray2[1, rowIndex] * 0.1).ToString("0.00"); - values[2] = (numArray2[2, rowIndex] * 0.1).ToString("0.00"); - values[3] = (numArray2[3, rowIndex] * 0.1).ToString("0.00"); - values[4] = (numArray2[4, rowIndex] * 0.1).ToString("0.00"); - values[5] = (numArray2[5, rowIndex] * 0.1).ToString("0.00"); - values[6] = (numArray2[6, rowIndex] * 0.1).ToString("0.00"); - values[7] = (numArray2[7, rowIndex] * 0.1).ToString("0.00"); - values[8] = (numArray2[8, rowIndex] * 0.1).ToString("0.00"); - values[9] = (numArray2[9, rowIndex] * 0.1).ToString("0.00"); - dataGridView_0.Rows.Insert(rowIndex, values); - rowIndex++; - } - break; - } - num6 = ClassEditor_0.smethod_18(num + (num5 * 2)); - dataGridView_0.Columns.Add(ClassEditor_0.smethod_18(num + (num5 * 2)).ToString(), num6.ToString()); - num5++; - } - break; - } - ClassEditor_0.int_94[index] = ClassEditor_0.smethod_18(num3 + (index * 2)); - index++; - } - } - catch - { - ClassEditor_0.bool_0 = false; - DarkMessageBox.Show("Failed to load table."); - } - } - - private void method_22() - { - try - { - dataGridView_0.Rows.Clear(); - dataGridView_0.Columns.Clear(); - dataGridView_0.RowTemplate.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; - int[] numArray = ClassEditor_0.int_114; - int num = ClassEditor_0.int_112; - int num2 = ClassEditor_0.int_113; - int num3 = ClassEditor_0.int_111; - ClassEditor_0.int_1 = numArray[0] * numArray[1]; - ClassEditor_0.int_0 = num3; - int index = 0; - while (true) - { - if (index >= (numArray[0] * numArray[1])) - { - int[,] numArray2 = ClassEditor_0.smethod_35(ClassEditor_0.int_94, numArray[0], numArray[1]); - dataGridView_0.TopLeftHeaderCell.Value = "RPM/MAP"; - int num5 = 0; - while (true) - { - int num6; - if (num5 >= numArray[0]) - { - int rowIndex = 0; - while (true) - { - if (rowIndex >= numArray[1]) - { - int num9 = 0; - while (true) - { - if (num9 >= numArray[1]) - { - dataGridView_0.AllowUserToAddRows = false; - foreach (DataGridViewColumn column in dataGridView_0.Columns) - { - column.SortMode = DataGridViewColumnSortMode.NotSortable; - column.Width = 0x2a; - } - foreach (DataGridViewRow row in (IEnumerable) dataGridView_0.Rows) - { - row.Height = 20; - } - float_1[0] = 0f; - float_1[1] = 500f; - ClassEditor_0.smethod_33(numArray[0], float_1[0], float_1[1]); - float_0 = 1f; - ClassEditor_0.bool_3 = false; - ClassEditor_0.bool_0 = true; - break; - } - num6 = ClassEditor_0.smethod_18(num2 + (num9 * 2)); - dataGridView_0.Rows[num9].HeaderCell.Value = num6.ToString(); - num9++; - } - break; - } - object[] values = new object[10]; - values[0] = (numArray2[0, rowIndex] * 0.1).ToString("0.00"); - values[1] = (numArray2[1, rowIndex] * 0.1).ToString("0.00"); - values[2] = (numArray2[2, rowIndex] * 0.1).ToString("0.00"); - values[3] = (numArray2[3, rowIndex] * 0.1).ToString("0.00"); - values[4] = (numArray2[4, rowIndex] * 0.1).ToString("0.00"); - values[5] = (numArray2[5, rowIndex] * 0.1).ToString("0.00"); - values[6] = (numArray2[6, rowIndex] * 0.1).ToString("0.00"); - values[7] = (numArray2[7, rowIndex] * 0.1).ToString("0.00"); - values[8] = (numArray2[8, rowIndex] * 0.1).ToString("0.00"); - values[9] = (numArray2[9, rowIndex] * 0.1).ToString("0.00"); - dataGridView_0.Rows.Insert(rowIndex, values); - rowIndex++; - } - break; - } - num6 = ClassEditor_0.smethod_18(num + (num5 * 2)); - dataGridView_0.Columns.Add(ClassEditor_0.smethod_18(num + (num5 * 2)).ToString(), num6.ToString()); - num5++; - } - break; - } - ClassEditor_0.int_94[index] = ClassEditor_0.smethod_18(num3 + (index * 2)); - index++; - } - } - catch - { - ClassEditor_0.bool_0 = false; - DarkMessageBox.Show("Failed to load table."); - } - } - - private void method_23() - { - try - { - int[] numArray = ClassEditor_0.int_41; - int num = ClassEditor_0.int_39; - int num2 = ClassEditor_0.int_40; - int num3 = ClassEditor_0.int_38; - ClassEditor_0.int_1 = numArray[0] * numArray[1]; - ClassEditor_0.int_0 = num3; - dataGridView_0.Rows.Clear(); - dataGridView_0.Columns.Clear(); - dataGridView_0.RowTemplate.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; - int index = 0; - while (true) - { - if (index >= (numArray[0] * numArray[1])) - { - int[,] numArray2 = ClassEditor_0.smethod_35(ClassEditor_0.int_94, numArray[0], numArray[1]); - dataGridView_0.TopLeftHeaderCell.Value = "RPM/MAP"; - int num5 = 0; - while (true) - { - if (num5 >= numArray[0]) - { - int rowIndex = 0; - while (true) - { - if (rowIndex >= numArray[1]) - { - int num10 = 0; - while (true) - { - if (num10 >= numArray[1]) - { - dataGridView_0.AllowUserToAddRows = false; - foreach (DataGridViewColumn column in dataGridView_0.Columns) - { - column.SortMode = DataGridViewColumnSortMode.NotSortable; - column.Width = 0x2a; - } - foreach (DataGridViewRow row in (IEnumerable) dataGridView_0.Rows) - { - row.Height = 20; - } - float_1[0] = -10f; - float_1[1] = 40f; - ClassEditor_0.smethod_33(numArray[0], float_1[0], float_1[1]); - float_0 = 0.5f; - ClassEditor_0.bool_3 = false; - ClassEditor_0.bool_0 = true; - break; - } - dataGridView_0.Rows[num10].HeaderCell.Value = ClassEditor_0.smethod_18(num2 + (num10 * 2)).ToString(); - num10++; - } - break; - } - object[] values = new object[10]; - values[0] = (numArray2[0, rowIndex] * 0.1).ToString("0.00"); - values[1] = (numArray2[1, rowIndex] * 0.1).ToString("0.00"); - values[2] = (numArray2[2, rowIndex] * 0.1).ToString("0.00"); - values[3] = (numArray2[3, rowIndex] * 0.1).ToString("0.00"); - values[4] = (numArray2[4, rowIndex] * 0.1).ToString("0.00"); - values[5] = (numArray2[5, rowIndex] * 0.1).ToString("0.00"); - values[6] = (numArray2[6, rowIndex] * 0.1).ToString("0.00"); - values[7] = (numArray2[7, rowIndex] * 0.1).ToString("0.00"); - values[8] = (numArray2[8, rowIndex] * 0.1).ToString("0.00"); - values[9] = (numArray2[9, rowIndex] * 0.1).ToString("0.00"); - dataGridView_0.Rows.Insert(rowIndex, values); - rowIndex++; - } - break; - } - int num6 = ClassEditor_0.smethod_18(num + (num5 * 2)); - double num7 = num6 * 0.013334; - dataGridView_0.Columns.Add(num7.ToString("0.0"), num7.ToString("0.0")); - num5++; - } - break; - } - ClassEditor_0.int_94[index] = ClassEditor_0.smethod_18(num3 + (index * 2)); - index++; - } - } - catch - { - ClassEditor_0.bool_0 = false; - DarkMessageBox.Show("Failed to load table."); - } - } - - private void method_24() - { - try - { - int[] numArray = ClassEditor_0.int_45; - int num = ClassEditor_0.int_43; - int num2 = ClassEditor_0.int_44; - int num3 = ClassEditor_0.int_42; - ClassEditor_0.int_1 = numArray[0] * numArray[1]; - ClassEditor_0.int_0 = num3; - dataGridView_0.Rows.Clear(); - dataGridView_0.Columns.Clear(); - dataGridView_0.RowTemplate.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; - int index = 0; - while (true) - { - if (index >= (numArray[0] * numArray[1])) - { - int[,] numArray2 = ClassEditor_0.smethod_35(ClassEditor_0.int_94, numArray[0], numArray[1]); - dataGridView_0.TopLeftHeaderCell.Value = "RPM/MAP"; - int num5 = 0; - while (true) - { - if (num5 >= numArray[0]) - { - int rowIndex = 0; - while (true) - { - if (rowIndex >= numArray[1]) - { - int num10 = 0; - while (true) - { - if (num10 >= numArray[1]) - { - dataGridView_0.AllowUserToAddRows = false; - foreach (DataGridViewColumn column in dataGridView_0.Columns) - { - column.SortMode = DataGridViewColumnSortMode.NotSortable; - column.Width = 0x2a; - } - foreach (DataGridViewRow row in (IEnumerable) dataGridView_0.Rows) - { - row.Height = 20; - } - float_1[0] = -10f; - float_1[1] = 40f; - ClassEditor_0.smethod_33(numArray[0], float_1[0], float_1[1]); - float_0 = 0.5f; - ClassEditor_0.bool_3 = false; - ClassEditor_0.bool_0 = true; - break; - } - dataGridView_0.Rows[num10].HeaderCell.Value = ClassEditor_0.smethod_18(num2 + (num10 * 2)).ToString(); - num10++; - } - break; - } - object[] values = new object[10]; - values[0] = (numArray2[0, rowIndex] * 0.1).ToString("0.00"); - values[1] = (numArray2[1, rowIndex] * 0.1).ToString("0.00"); - values[2] = (numArray2[2, rowIndex] * 0.1).ToString("0.00"); - values[3] = (numArray2[3, rowIndex] * 0.1).ToString("0.00"); - values[4] = (numArray2[4, rowIndex] * 0.1).ToString("0.00"); - values[5] = (numArray2[5, rowIndex] * 0.1).ToString("0.00"); - values[6] = (numArray2[6, rowIndex] * 0.1).ToString("0.00"); - values[7] = (numArray2[7, rowIndex] * 0.1).ToString("0.00"); - values[8] = (numArray2[8, rowIndex] * 0.1).ToString("0.00"); - values[9] = (numArray2[9, rowIndex] * 0.1).ToString("0.00"); - dataGridView_0.Rows.Insert(rowIndex, values); - rowIndex++; - } - break; - } - int num6 = ClassEditor_0.smethod_18(num + (num5 * 2)); - double num7 = num6 * 0.013334; - dataGridView_0.Columns.Add(num7.ToString("0.0"), num7.ToString("0.0")); - num5++; - } - break; - } - ClassEditor_0.int_94[index] = ClassEditor_0.smethod_18(num3 + (index * 2)); - index++; - } - } - catch - { - ClassEditor_0.bool_0 = false; - DarkMessageBox.Show("Failed to load table."); - } - } - - private void method_25() - { - try - { - int[] numArray = ClassEditor_0.int_29; - int num = ClassEditor_0.int_28; - ClassEditor_0.int_1 = numArray[0] * numArray[1]; - ClassEditor_0.int_0 = num; - dataGridView_0.Rows.Clear(); - dataGridView_0.Columns.Clear(); - dataGridView_0.RowTemplate.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; - dataGridView_0.ColumnCount = numArray[0]; - if (this.vssUnits_0 == "MPH") - { - dataGridView_0.Columns[0].HeaderText = "MPH"; - for (int i = 0; i < numArray[1]; i++) - { - double num3 = Math.Floor((double) (((double) ClassEditor_0.smethod_18(num + (i * 2))) / 1.609)); - object[] values = new object[] { num3.ToString() }; - dataGridView_0.Rows.Add(values); - dataGridView_0.Rows[i].HeaderCell.Value = this.string_3.ToString(); - } - } - else - { - dataGridView_0.Columns[0].HeaderText = "KPH"; - for (int i = 0; i < numArray[1]; i++) - { - int num5 = ClassEditor_0.smethod_18(num + (i * 2)); - object[] values = new object[] { num5.ToString() }; - dataGridView_0.Rows.Add(values); - dataGridView_0.Rows[i].HeaderCell.Value = this.string_3.ToString(); - } - } - dataGridView_0.AllowUserToAddRows = false; - foreach (DataGridViewColumn column in dataGridView_0.Columns) - { - column.SortMode = DataGridViewColumnSortMode.NotSortable; - column.Width = 80; - } - float_0 = 1f; - ClassEditor_0.bool_3 = false; - ClassEditor_0.bool_0 = true; - } - catch - { - ClassEditor_0.bool_0 = false; - DarkMessageBox.Show("Failed to load table."); - } - } - - private void method_26() - { - try - { - dataGridView_0.Rows.Clear(); - dataGridView_0.Columns.Clear(); - dataGridView_0.RowTemplate.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; - int[] numArray = ClassEditor_0.int_208; - int num = ClassEditor_0.int_209; - int num2 = ClassEditor_0.int_210; - int num3 = ClassEditor_0.int_207; - ClassEditor_0.int_1 = numArray[0] * numArray[1]; - ClassEditor_0.int_0 = num3; - int index = 0; - while (true) - { - if (index >= (numArray[0] * numArray[1])) - { - int[,] numArray2 = ClassEditor_0.smethod_35(ClassEditor_0.int_97, numArray[1], numArray[0]); - dataGridView_0.TopLeftHeaderCell.Value = "RPM/MAP"; - int num5 = 0; - while (true) - { - int num6; - if (num5 >= numArray[0]) - { - int rowIndex = 0; - while (true) - { - if (rowIndex >= numArray[1]) - { - int num9 = 0; - while (true) - { - if (num9 >= numArray[1]) - { - dataGridView_0.AllowUserToAddRows = false; - foreach (DataGridViewColumn column in dataGridView_0.Columns) - { - column.SortMode = DataGridViewColumnSortMode.NotSortable; - column.Width = 0x2a; - } - foreach (DataGridViewRow row in (IEnumerable) dataGridView_0.Rows) - { - row.Height = 20; - } - float_1[0] = -50f; - float_1[1] = 200f; - ClassEditor_0.smethod_33(numArray[0], float_1[0], float_1[1]); - float_0 = 1f; - ClassEditor_0.bool_3 = false; - ClassEditor_0.bool_0 = true; - break; - } - num6 = ClassEditor_0.smethod_18(num2 + (num9 * 2)); - dataGridView_0.Rows[num9].HeaderCell.Value = num6.ToString(); - num9++; - } - break; - } - object[] values = new object[10]; - values[0] = (numArray2[rowIndex, 0] * 0.006).ToString("0.00"); - values[1] = (numArray2[rowIndex, 1] * 0.006).ToString("0.00"); - values[2] = (numArray2[rowIndex, 2] * 0.006).ToString("0.00"); - values[3] = (numArray2[rowIndex, 3] * 0.006).ToString("0.00"); - values[4] = (numArray2[rowIndex, 4] * 0.006).ToString("0.00"); - values[5] = (numArray2[rowIndex, 5] * 0.006).ToString("0.00"); - values[6] = (numArray2[rowIndex, 6] * 0.006).ToString("0.00"); - values[7] = (numArray2[rowIndex, 7] * 0.006).ToString("0.00"); - values[8] = (numArray2[rowIndex, 8] * 0.006).ToString("0.00"); - values[9] = (numArray2[rowIndex, 9] * 0.006).ToString("0.00"); - dataGridView_0.Rows.Insert(rowIndex, values); - rowIndex++; - } - break; - } - num6 = ClassEditor_0.smethod_18(num + (num5 * 2)); - dataGridView_0.Columns.Add(ClassEditor_0.smethod_18(num + (num5 * 2)).ToString(), num6.ToString()); - num5++; - } - break; - } - ClassEditor_0.int_97[index] = ClassEditor_0.smethod_18(num3 + (index * 2)); - index++; - } - } - catch - { - ClassEditor_0.bool_0 = false; - DarkMessageBox.Show("Failed to load table."); - } - } - - private void method_27() - { - try - { - dataGridView_0.Rows.Clear(); - dataGridView_0.Columns.Clear(); - dataGridView_0.RowTemplate.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; - int[] numArray = ClassEditor_0.int_214; - int num = ClassEditor_0.int_212; - int num2 = ClassEditor_0.int_213; - int num3 = ClassEditor_0.int_211; - ClassEditor_0.int_1 = numArray[0] * numArray[1]; - ClassEditor_0.int_0 = num3; - int index = 0; - while (true) - { - if (index >= (numArray[0] * numArray[1])) - { - int[,] numArray2 = ClassEditor_0.smethod_35(ClassEditor_0.int_98, numArray[0], numArray[1]); - dataGridView_0.TopLeftHeaderCell.Value = "RPM/KPH"; - int num5 = 0; - while (true) - { - double num6; - if (num5 >= numArray[0]) - { - int rowIndex = 0; - while (true) - { - if (rowIndex >= numArray[1]) - { - int num8 = 0; - while (true) - { - if (num8 >= numArray[1]) - { - dataGridView_0.AllowUserToAddRows = false; - foreach (DataGridViewColumn column in dataGridView_0.Columns) - { - column.SortMode = DataGridViewColumnSortMode.NotSortable; - column.Width = 0x2a; - } - foreach (DataGridViewRow row in (IEnumerable) dataGridView_0.Rows) - { - row.Height = 20; - } - float_1[0] = -50f; - float_1[1] = 200f; - ClassEditor_0.smethod_33(numArray[0], float_1[0], float_1[1]); - float_0 = 1f; - ClassEditor_0.bool_3 = false; - ClassEditor_0.bool_0 = true; - break; - } - dataGridView_0.Rows[num8].HeaderCell.Value = ClassEditor_0.smethod_18(num2 + (num8 * 2)).ToString(); - num8++; - } - break; - } - object[] values = new object[15]; - values[0] = (numArray2[rowIndex, 0] * 0.006).ToString("0.00"); - values[1] = (numArray2[rowIndex, 1] * 0.006).ToString("0.00"); - values[2] = (numArray2[rowIndex, 2] * 0.006).ToString("0.00"); - values[3] = (numArray2[rowIndex, 3] * 0.006).ToString("0.00"); - values[4] = (numArray2[rowIndex, 4] * 0.006).ToString("0.00"); - values[5] = (numArray2[rowIndex, 5] * 0.006).ToString("0.00"); - values[6] = (numArray2[rowIndex, 6] * 0.006).ToString("0.00"); - values[7] = (numArray2[rowIndex, 7] * 0.006).ToString("0.00"); - values[8] = (numArray2[rowIndex, 8] * 0.006).ToString("0.00"); - values[9] = (numArray2[rowIndex, 9] * 0.006).ToString("0.00"); - values[10] = (numArray2[rowIndex, 10] * 0.006).ToString("0.00"); - values[11] = (numArray2[rowIndex, 11] * 0.006).ToString("0.00"); - values[12] = (numArray2[rowIndex, 12] * 0.006).ToString("0.00"); - values[13] = (numArray2[rowIndex, 13] * 0.006).ToString("0.00"); - num6 = numArray2[rowIndex, 14] * 0.006; - values[14] = num6.ToString("0.00"); - dataGridView_0.Rows.Insert(rowIndex, values); - rowIndex++; - } - break; - } - num6 = ClassEditor_0.smethod_18(num + (num5 * 2)) * 0.01; - dataGridView_0.Columns.Add((ClassEditor_0.smethod_18(num + (num5 * 2)) * 0.01).ToString(), num6.ToString()); - num5++; - } - break; - } - ClassEditor_0.int_98[index] = ClassEditor_0.smethod_18(num3 + (index * 2)); - index++; - } - } - catch - { - ClassEditor_0.bool_0 = false; - DarkMessageBox.Show("Failed to load table."); - } - } - - public void method_28() - { - this.treeView1.Nodes.Clear(); - int num = 0; - foreach (string str in this.list_0) - { - DarkTreeNode ThisNode = new DarkTreeNode(); - if (str.ToString().Contains("--")) - { - ThisNode.Text = str.Replace("--", ""); - this.treeView1.Nodes[this.treeView1.Nodes.Count - 1].Nodes.Add(ThisNode); - continue; - } - num++; - - ThisNode.Text = str; - this.treeView1.Nodes.Add(ThisNode); - } - foreach (DarkTreeNode node in this.treeView1.Nodes) - { - if (node.Nodes.Count > 0) - { - foreach (DarkTreeNode node2 in node.Nodes) - { - if (node.Text.Contains("limiter")) - { - node2.ImageKey = "Normal"; - node2.SelectedImageKey = "Normal"; - continue; - } - if (node.Text.Contains("Fuel")) - { - node2.ImageKey = "Table"; - node2.SelectedImageKey = "Table"; - continue; - } - if (node.Text.Contains("Target")) - { - node2.ImageKey = "Table"; - node2.SelectedImageKey = "Table"; - continue; - } - node2.ImageKey = "Degree"; - node2.SelectedImageKey = "Degree"; - } - } - if ((node.Text.Contains("Revlimiter") || node.Text.Contains("Speedlimiter")) || node.Text.Contains("Limit")) - { - node.ImageKey = "Normal"; - node.SelectedImageKey = "Normal"; - } - else if (node.Text.Contains("00\x00b0")) - { - node.ImageKey = "Degree"; - node.SelectedImageKey = "Degree"; - } - else if (node.Text.Contains("VTC High") || node.Text.Contains("Timing High Cam")) - { - node.ImageKey = "HighCam"; - node.SelectedImageKey = "HighCam"; - } - else if (node.Text.Contains("VTC Low") || node.Text.Contains("Timing Low Cam")) - { - node.ImageKey = "LowCam"; - node.SelectedImageKey = "LowCam"; - } - else if (node.Text.Contains("Fuel High")) - { - node.ImageKey = "HighFuel"; - node.SelectedImageKey = "HighFuel"; - } - else if (node.Text.Contains("Fuel Low")) - { - node.ImageKey = "LowFuel"; - node.SelectedImageKey = "LowFuel"; - } - else if (node.Text.Contains("Target High")) - { - node.ImageKey = "HighFuel"; - node.SelectedImageKey = "HighFuel"; - } - else if (node.Text.Contains("Target Low")) - { - node.ImageKey = "LowFuel"; - node.SelectedImageKey = "LowFuel"; - } - else if (node.Text.Contains("AFM Fuel")) - { - node.ImageKey = "LowFuel"; - node.SelectedImageKey = "LowFuel"; - } - else if ((node.Text.Contains("VTEC") || node.Text.Contains("Idle")) || node.Text.Contains("WOT")) - { - node.ImageKey = "Vtec"; - node.SelectedImageKey = "Vtec"; - } - else if (node.Text.Contains("Knock")) - { - node.ImageKey = "Knock"; - node.SelectedImageKey = "Knock"; - } - else if (node.Text.Contains("Overrun")) - { - node.ImageKey = "Bang"; - node.SelectedImageKey = "Bang"; - } - else if ((node.Text.Contains("Compensation") || node.Text.Contains("Conversion")) || node.Text.Contains("LAF")) - { - node.ImageKey = "Red"; - node.SelectedImageKey = "Red"; - } - } - } - - private int method_29(int int_2, GEnum2 genum2_1) - { - int num = 0; - if (int_2 > 10) - { - if (int_2 == 20) - { - if (genum2_1 == GEnum2.TIMING_HIGH) - { - num = ClassEditor_0.int_62; - } - else if (genum2_1 == GEnum2.TIMING_LOW) - { - num = ClassEditor_0.int_82; - } - else if (genum2_1 == GEnum2.KNOCK_HIGH) - { - num = ClassEditor_0.int_149; - } - else if (genum2_1 == GEnum2.KNOCK_LOW) - { - num = ClassEditor_0.int_169; - } - } - else if (int_2 == 30) - { - if (genum2_1 == GEnum2.TIMING_HIGH) - { - num = ClassEditor_0.int_66; - } - else if (genum2_1 == GEnum2.TIMING_LOW) - { - num = ClassEditor_0.int_86; - } - else if (genum2_1 == GEnum2.KNOCK_HIGH) - { - num = ClassEditor_0.int_153; - } - else if (genum2_1 == GEnum2.KNOCK_LOW) - { - num = ClassEditor_0.int_173; - } - } - else if (int_2 == 40) - { - if (genum2_1 == GEnum2.TIMING_HIGH) - { - num = ClassEditor_0.int_70; - } - else if (genum2_1 == GEnum2.TIMING_LOW) - { - num = ClassEditor_0.int_90; - } - else if (genum2_1 == GEnum2.KNOCK_HIGH) - { - num = ClassEditor_0.int_157; - } - else if (genum2_1 == GEnum2.KNOCK_LOW) - { - num = ClassEditor_0.int_177; - } - } - } - else - { - switch (int_2) - { - case 0: - if (genum2_1 == GEnum2.TIMING_HIGH) - { - num = ClassEditor_0.int_54; - } - else if (genum2_1 == GEnum2.TIMING_LOW) - { - num = ClassEditor_0.int_74; - } - else if (genum2_1 == GEnum2.KNOCK_HIGH) - { - num = ClassEditor_0.int_141; - } - else if (genum2_1 == GEnum2.KNOCK_LOW) - { - num = ClassEditor_0.int_161; - } - break; - - case 1: - if (genum2_1 == GEnum2.LAMBDA_TGT_HIGH) - { - num = ClassEditor_0.int_127; - } - else if (genum2_1 == GEnum2.LAMBDA_TGT_LOW) - { - num = ClassEditor_0.int_133; - } - else if (genum2_1 == GEnum2.AFM_FUEL) - { - num = ClassEditor_0.int_117; - } - break; - - case 2: - if (genum2_1 == GEnum2.LAMBDA_TGT_HIGH) - { - num = ClassEditor_0.int_129; - } - else if (genum2_1 == GEnum2.LAMBDA_TGT_LOW) - { - num = ClassEditor_0.int_135; - } - else if (genum2_1 == GEnum2.AFM_FUEL) - { - num = ClassEditor_0.int_121; - } - break; - - case 3: - if (genum2_1 == GEnum2.LAMBDA_TGT_HIGH) - { - num = ClassEditor_0.int_131; - } - else if (genum2_1 == GEnum2.LAMBDA_TGT_LOW) - { - num = ClassEditor_0.int_137; - } - break; - - default: - if (int_2 == 10) - { - if (genum2_1 == GEnum2.TIMING_HIGH) - { - num = ClassEditor_0.int_58; - } - else if (genum2_1 == GEnum2.TIMING_LOW) - { - num = ClassEditor_0.int_78; - } - else if (genum2_1 == GEnum2.KNOCK_HIGH) - { - num = ClassEditor_0.int_145; - } - else if (genum2_1 == GEnum2.KNOCK_LOW) - { - num = ClassEditor_0.int_165; - } - } - break; - } - } - return num; - } - - private void method_3(object sender, EventArgs e) - { - dataGridView_0.ReadOnly = false; - } - - private int method_30(int int_2, GEnum2 genum2_1) - { - int num = 0; - if (int_2 > 10) - { - if (int_2 == 20) - { - if ((genum2_1 == GEnum2.TIMING_HIGH) || (genum2_1 == GEnum2.KNOCK_HIGH)) - { - num = ClassEditor_0.int_64; - } - else if ((genum2_1 == GEnum2.TIMING_LOW) || (genum2_1 == GEnum2.KNOCK_LOW)) - { - num = ClassEditor_0.int_84; - } - } - else if (int_2 == 30) - { - if ((genum2_1 == GEnum2.TIMING_HIGH) || (genum2_1 == GEnum2.KNOCK_HIGH)) - { - num = ClassEditor_0.int_68; - } - else if ((genum2_1 == GEnum2.TIMING_LOW) || (genum2_1 == GEnum2.KNOCK_LOW)) - { - num = ClassEditor_0.int_88; - } - } - else if (int_2 == 40) - { - if ((genum2_1 == GEnum2.TIMING_HIGH) || (genum2_1 == GEnum2.KNOCK_HIGH)) - { - num = ClassEditor_0.int_72; - } - else if ((genum2_1 == GEnum2.TIMING_LOW) || (genum2_1 == GEnum2.KNOCK_LOW)) - { - num = ClassEditor_0.int_92; - } - } - } - else - { - switch (int_2) - { - case 0: - if ((genum2_1 == GEnum2.TIMING_HIGH) || (genum2_1 == GEnum2.KNOCK_HIGH)) - { - num = ClassEditor_0.int_56; - } - else if ((genum2_1 == GEnum2.TIMING_LOW) || (genum2_1 == GEnum2.KNOCK_LOW)) - { - num = ClassEditor_0.int_76; - } - break; - - case 1: - if (genum2_1 == GEnum2.AFM_FUEL) - { - num = ClassEditor_0.int_116; - } - break; - - case 2: - if (genum2_1 == GEnum2.AFM_FUEL) - { - num = ClassEditor_0.int_120; - } - break; - - default: - if (int_2 == 10) - { - if ((genum2_1 == GEnum2.TIMING_HIGH) || (genum2_1 == GEnum2.KNOCK_HIGH)) - { - num = ClassEditor_0.int_60; - } - else if ((genum2_1 == GEnum2.TIMING_LOW) || (genum2_1 == GEnum2.KNOCK_LOW)) - { - num = ClassEditor_0.int_80; - } - } - break; - } - } - return num; - } - - private int method_31(int int_2, GEnum2 genum2_1) - { - int num = 0; - if (int_2 <= 10) - { - if (int_2 == 0) - { - if ((genum2_1 == GEnum2.TIMING_HIGH) || (genum2_1 == GEnum2.KNOCK_HIGH)) - { - num = ClassEditor_0.int_55; - } - else if ((genum2_1 == GEnum2.TIMING_LOW) || (genum2_1 == GEnum2.KNOCK_LOW)) - { - num = ClassEditor_0.int_75; - } - } - else if (int_2 == 10) - { - if ((genum2_1 == GEnum2.TIMING_HIGH) || (genum2_1 == GEnum2.KNOCK_HIGH)) - { - num = ClassEditor_0.int_59; - } - else if ((genum2_1 == GEnum2.TIMING_LOW) || (genum2_1 == GEnum2.KNOCK_LOW)) - { - num = ClassEditor_0.int_79; - } - } - } - else if (int_2 == 20) - { - if ((genum2_1 == GEnum2.TIMING_HIGH) || (genum2_1 == GEnum2.KNOCK_HIGH)) - { - num = ClassEditor_0.int_63; - } - else if ((genum2_1 == GEnum2.TIMING_LOW) || (genum2_1 == GEnum2.KNOCK_LOW)) - { - num = ClassEditor_0.int_83; - } - } - else if (int_2 == 30) - { - if ((genum2_1 == GEnum2.TIMING_HIGH) || (genum2_1 == GEnum2.KNOCK_HIGH)) - { - num = ClassEditor_0.int_67; - } - else if ((genum2_1 == GEnum2.TIMING_LOW) || (genum2_1 == GEnum2.KNOCK_LOW)) - { - num = ClassEditor_0.int_87; - } - } - else if (int_2 == 40) - { - if ((genum2_1 == GEnum2.TIMING_HIGH) || (genum2_1 == GEnum2.KNOCK_HIGH)) - { - num = ClassEditor_0.int_71; - } - else if ((genum2_1 == GEnum2.TIMING_LOW) || (genum2_1 == GEnum2.KNOCK_LOW)) - { - num = ClassEditor_0.int_91; - } - } - return num; - } - - private int[] method_32(int int_2, GEnum2 genum2_1) - { - int[] numArray = new int[0]; - if (int_2 > 10) - { - if (int_2 == 20) - { - if (genum2_1 == GEnum2.TIMING_HIGH) - { - numArray = ClassEditor_0.int_65; - } - else if (genum2_1 == GEnum2.TIMING_LOW) - { - numArray = ClassEditor_0.int_85; - } - else if (genum2_1 == GEnum2.KNOCK_HIGH) - { - numArray = ClassEditor_0.int_152; - } - else if (genum2_1 == GEnum2.KNOCK_LOW) - { - numArray = ClassEditor_0.int_172; - } - } - else if (int_2 == 30) - { - if (genum2_1 == GEnum2.TIMING_HIGH) - { - numArray = ClassEditor_0.int_69; - } - else if (genum2_1 == GEnum2.TIMING_LOW) - { - numArray = ClassEditor_0.int_89; - } - else if (genum2_1 == GEnum2.KNOCK_HIGH) - { - numArray = ClassEditor_0.int_156; - } - else if (genum2_1 == GEnum2.KNOCK_LOW) - { - numArray = ClassEditor_0.int_176; - } - } - else if (int_2 == 40) - { - if (genum2_1 == GEnum2.TIMING_HIGH) - { - numArray = ClassEditor_0.int_73; - } - else if (genum2_1 == GEnum2.TIMING_LOW) - { - numArray = ClassEditor_0.int_93; - } - else if (genum2_1 == GEnum2.KNOCK_HIGH) - { - numArray = ClassEditor_0.int_160; - } - else if (genum2_1 == GEnum2.KNOCK_LOW) - { - numArray = ClassEditor_0.int_180; - } - } - } - else - { - switch (int_2) - { - case 0: - if (genum2_1 == GEnum2.TIMING_HIGH) - { - numArray = ClassEditor_0.int_57; - } - else if (genum2_1 == GEnum2.TIMING_LOW) - { - numArray = ClassEditor_0.int_77; - } - else if (genum2_1 == GEnum2.KNOCK_HIGH) - { - numArray = ClassEditor_0.int_144; - } - else if (genum2_1 == GEnum2.KNOCK_LOW) - { - numArray = ClassEditor_0.int_164; - } - break; - - case 1: - if (genum2_1 == GEnum2.LAMBDA_TGT_HIGH) - { - numArray = ClassEditor_0.int_128; - } - else if (genum2_1 == GEnum2.LAMBDA_TGT_LOW) - { - numArray = ClassEditor_0.int_134; - } - else if (genum2_1 == GEnum2.AFM_FUEL) - { - numArray = ClassEditor_0.int_118; - } - break; - - case 2: - if (genum2_1 == GEnum2.LAMBDA_TGT_HIGH) - { - numArray = ClassEditor_0.int_130; - } - else if (genum2_1 == GEnum2.LAMBDA_TGT_LOW) - { - numArray = ClassEditor_0.int_136; - } - else if (genum2_1 == GEnum2.AFM_FUEL) - { - numArray = ClassEditor_0.int_122; - } - break; - - case 3: - if (genum2_1 == GEnum2.LAMBDA_TGT_HIGH) - { - numArray = ClassEditor_0.int_132; - } - else if (genum2_1 == GEnum2.LAMBDA_TGT_LOW) - { - numArray = ClassEditor_0.int_138; - } - break; - - default: - if (int_2 == 10) - { - if (genum2_1 == GEnum2.TIMING_HIGH) - { - numArray = ClassEditor_0.int_61; - } - else if (genum2_1 == GEnum2.TIMING_LOW) - { - numArray = ClassEditor_0.int_81; - } - else if (genum2_1 == GEnum2.KNOCK_HIGH) - { - numArray = ClassEditor_0.int_148; - } - else if (genum2_1 == GEnum2.KNOCK_LOW) - { - numArray = ClassEditor_0.int_168; - } - } - break; - } - } - return numArray; - } - - private void method_34(GEnum3 genum3_0) - { - this.list_0.Clear(); - if (genum3_0 == GEnum3.RRB140) - { - foreach (string str in this.string_6) - { - this.list_0.Add(str); - } - } - else if (genum3_0 == GEnum3.S2K) - { - foreach (string str2 in this.string_7) - { - this.list_0.Add(str2); - } - } - } - - public string[] method_35(int int_2, int int_3) - { - string[] strArray = new string[int_2]; - for (int i = 0; i < int_2; i++) - { - strArray[i] = (ClassEditor_0.smethod_18(int_3 + (i * 2)) * 0.0048828125).ToString(); - } - return strArray; - } - - public string[] method_36(int int_2, int int_3) - { - string[] strArray = new string[int_2]; - for (int i = 0; i < int_2; i++) - { - strArray[i] = (ClassEditor_0.smethod_18(int_3 + (i * 2)) / 10).ToString(); - } - return strArray; - } - - private void method_4(object sender, KeyEventArgs e) - { - ClassEditor_0.smethod_3(e, 0); - } - - public void method_5() - { - ContextMenu menu = new ContextMenu { - MenuItems = { - { - "Increase selection", - new EventHandler(this.method_6) - }, - { - "Decrease selection", - new EventHandler(this.method_7) - } - } - }; - this.ContextMenu = menu; - } - - private void method_6(object sender, EventArgs e) - { - ClassEditor_0.smethod_3(new KeyEventArgs(Keys.None), 2); - } - - private void method_7(object sender, EventArgs e) - { - ClassEditor_0.smethod_3(new KeyEventArgs(Keys.None), 3); - } - - private void method_8(int int_2) - { - try - { - dataGridView_0.Rows.Clear(); - dataGridView_0.Columns.Clear(); - dataGridView_0.RowTemplate.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; - int[] numArray = this.method_32(int_2, genum2_0); - int num = this.method_30(int_2, genum2_0); - int num2 = this.method_29(int_2, genum2_0); - ClassEditor_0.int_1 = numArray[0] * numArray[1]; - ClassEditor_0.int_0 = num2; - dataGridView_0.Rows.Clear(); - dataGridView_0.Columns.Clear(); - dataGridView_0.RowTemplate.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; - dataGridView_0.TopLeftHeaderCell.Value = "AirMass (mg)"; - int num3 = 0; - while (true) - { - double num4; - if (num3 >= numArray[0]) - { - List list = new List(); - int num5 = 0; - while (true) - { - if (num5 >= numArray[0]) - { - object[] values = new object[] { list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7] }; - dataGridView_0.Rows.Add(values); - dataGridView_0.Rows[0].HeaderCell.Value = "IPW (ms)"; - dataGridView_0.AllowUserToAddRows = false; - foreach (DataGridViewColumn column in dataGridView_0.Columns) - { - column.SortMode = DataGridViewColumnSortMode.NotSortable; - column.Width = 50; - } - foreach (DataGridViewRow row in (IEnumerable) dataGridView_0.Rows) - { - row.Height = 20; - } - float_1[0] = 0f; - float_1[1] = 14f; - ClassEditor_0.smethod_33(numArray[0], float_1[0], float_1[1]); - float_0 = 0.1f; - ClassEditor_0.bool_3 = false; - ClassEditor_0.bool_0 = true; - break; - } - num4 = ClassEditor_0.smethod_18(num2 + (num5 * 2)) * 0.002; - list.Add(num4.ToString("0.00")); - num5++; - } - break; - } - num4 = ClassEditor_0.smethod_18(num + (num3 * 2)) * 0.1; - dataGridView_0.Columns.Add((ClassEditor_0.smethod_18(num + (num3 * 2)) * 0.1).ToString(), num4.ToString()); - num3++; + return i; } } - catch - { - ClassEditor_0.bool_0 = false; - DarkMessageBox.Show("Failed to load table."); - } - } - - private void method_9(int int_2) - { - try + //return approximative + for (int i = 0; i < ClassEditor_0.DefinitionsName.Count; i++) { - dataGridView_0.Rows.Clear(); - dataGridView_0.Columns.Clear(); - dataGridView_0.RowTemplate.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; - int[] numArray = this.method_32(int_2, genum2_0); - int num = ClassEditor_0.int_56; - int num2 = ClassEditor_0.int_55; - int num3 = this.method_29(int_2, genum2_0); - ClassEditor_0.int_1 = numArray[0] * numArray[1]; - ClassEditor_0.int_0 = num3; - int index = 0; - while (true) + if (ClassEditor_0.DefinitionsName[i].Contains(text)) { - if (index >= (numArray[0] * numArray[1])) - { - dataGridView_0.TopLeftHeaderCell.Value = "RPM/MAP"; - int num6 = 0; - while (true) - { - if (num6 >= numArray[0]) - { - int num4 = 0; - int rowIndex = 0; - while (true) - { - if (rowIndex >= numArray[1]) - { - int num10 = 0; - while (true) - { - if (num10 >= numArray[1]) - { - dataGridView_0.AllowUserToAddRows = false; - foreach (DataGridViewColumn column in dataGridView_0.Columns) - { - column.SortMode = DataGridViewColumnSortMode.NotSortable; - column.Width = 0x2a; - } - foreach (DataGridViewRow row in (IEnumerable) dataGridView_0.Rows) - { - row.Height = 20; - } - float_1[0] = 10f; - float_1[1] = 14.8f; - ClassEditor_0.smethod_33(numArray[0], float_1[0], float_1[1]); - float_0 = 0.1f; - ClassEditor_0.bool_3 = true; - ClassEditor_0.bool_0 = true; - break; - } - int num11 = ClassEditor_0.smethod_18(num2 + (num10 * 2)); - dataGridView_0.Rows[num10].HeaderCell.Value = (num11 * 0.013334).ToString("0.0"); - num10++; - } - break; - } - object[] values = new object[20]; - values[0] = ((128f / ((float) ClassEditor_0.int_95[num4])) * 14.7f).ToString("0.00"); - values[1] = ((128f / ((float) ClassEditor_0.int_95[num4 + 1])) * 14.7f).ToString("0.00"); - values[2] = ((128f / ((float) ClassEditor_0.int_95[num4 + 2])) * 14.7f).ToString("0.00"); - values[3] = ((128f / ((float) ClassEditor_0.int_95[num4 + 3])) * 14.7f).ToString("0.00"); - values[4] = ((128f / ((float) ClassEditor_0.int_95[num4 + 4])) * 14.7f).ToString("0.00"); - values[5] = ((128f / ((float) ClassEditor_0.int_95[num4 + 5])) * 14.7f).ToString("0.00"); - values[6] = ((128f / ((float) ClassEditor_0.int_95[num4 + 6])) * 14.7f).ToString("0.00"); - values[7] = ((128f / ((float) ClassEditor_0.int_95[num4 + 7])) * 14.7f).ToString("0.00"); - values[8] = ((128f / ((float) ClassEditor_0.int_95[num4 + 8])) * 14.7f).ToString("0.00"); - values[9] = ((128f / ((float) ClassEditor_0.int_95[num4 + 9])) * 14.7f).ToString("0.00"); - values[10] = ((128f / ((float) ClassEditor_0.int_95[num4 + 10])) * 14.7f).ToString("0.00"); - values[11] = ((128f / ((float) ClassEditor_0.int_95[num4 + 11])) * 14.7f).ToString("0.00"); - values[12] = ((128f / ((float) ClassEditor_0.int_95[num4 + 12])) * 14.7f).ToString("0.00"); - values[13] = ((128f / ((float) ClassEditor_0.int_95[num4 + 13])) * 14.7f).ToString("0.00"); - values[14] = ((128f / ((float) ClassEditor_0.int_95[num4 + 14])) * 14.7f).ToString("0.00"); - values[15] = ((128f / ((float) ClassEditor_0.int_95[num4 + 15])) * 14.7f).ToString("0.00"); - values[0x10] = ((128f / ((float) ClassEditor_0.int_95[num4 + 0x10])) * 14.7f).ToString("0.00"); - values[0x11] = ((128f / ((float) ClassEditor_0.int_95[num4 + 0x11])) * 14.7f).ToString("0.00"); - values[0x12] = ((128f / ((float) ClassEditor_0.int_95[num4 + 0x12])) * 14.7f).ToString("0.00"); - values[0x13] = ((128f / ((float) ClassEditor_0.int_95[num4 + 0x13])) * 14.7f).ToString("0.00"); - dataGridView_0.Rows.Insert(rowIndex, values); - num4 += 20; - rowIndex++; - } - break; - } - int num7 = ClassEditor_0.smethod_18(num + (num6 * 2)); - dataGridView_0.Columns.Add(ClassEditor_0.smethod_18(num + (num6 * 2)).ToString(), num7.ToString()); - num6++; - } - break; - } - ClassEditor_0.int_95[index] = ClassEditor_0.smethod_19(num3 + index); - index++; + return i; } } - catch - { - ClassEditor_0.bool_0 = false; - DarkMessageBox.Show("Failed to load table."); - } - } - - protected override void Dispose(bool disposing) - { - if (disposing && (this.icontainer_0 != null)) - { - this.icontainer_0.Dispose(); - } - base.Dispose(disposing); - } - - private void timer_0_Tick(object sender, EventArgs e) - { - ClassEditor_0.smethod_33(dataGridView_0.Columns.Count, float_1[0], float_1[1]); - this.timer_0.Enabled = false; + //return error + return -1; } private void treeView1_AfterSelect(object sender, EventArgs e) @@ -2911,549 +671,90 @@ private void treeView1_AfterSelect(object sender, EventArgs e) if ((this.treeView1.SelectedNode != null) && ClassEditor_0.bool_1) { - if ((ClassEditor_0.bool_2 && (ClassEditor_0.int_1 != 0)) && (ClassEditor_0.int_0 != 0)) + ClassEditor_0.bool_1 = false; + //################################################################################## + if (ClassEditor_0.bool_2 && ClassEditor_0.SelectedTableSize != 0 && ClassEditor_0.SelectedROMLocation != 0) { - if (ClassEditor_0.int_1 == 200) - { - ClassEditor_0.smethod_5("10X20"); - } - else if (ClassEditor_0.int_1 == 0x40) - { - ClassEditor_0.smethod_5("1X64"); - } - else if (ClassEditor_0.int_1 == 15) - { - ClassEditor_0.smethod_5("1X15"); - } - else if (ClassEditor_0.int_1 == 8) - { - ClassEditor_0.smethod_5("1X8"); - } - else if (ClassEditor_0.int_1 == 7) - { - ClassEditor_0.smethod_5("1X7"); - } - else if (ClassEditor_0.int_1 == 6) - { - ClassEditor_0.smethod_5("1X6"); - } - else if (ClassEditor_0.int_1 == 5) - { - ClassEditor_0.smethod_5("1X5"); - } - else if (ClassEditor_0.int_1 == 4) - { - ClassEditor_0.smethod_5("1X4"); - } - else if (ClassEditor_0.int_1 == 2) - { - ClassEditor_0.smethod_5("1X2"); - } - else if (ClassEditor_0.int_1 == 1) - { - ClassEditor_0.smethod_5("1X1"); - } + ClassEditor_0.GetChanges(); ClassEditor_0.string_2 = ClassEditor_0.string_2 + ClassEditor_0.string_3 + Environment.NewLine; } ClassEditor_0.bool_2 = false; - if (this.treeView1.SelectedNode.FullPath.Contains("Ignition Timing VTC High") || this.treeView1.SelectedNode.FullPath.Contains("Ignition Timing High")) - { - genum2_0 = GEnum2.TIMING_HIGH; - } - else if (this.treeView1.SelectedNode.FullPath.Contains("Ignition Timing VTC Low") || this.treeView1.SelectedNode.FullPath.Contains("Ignition Timing Low")) - { - genum2_0 = GEnum2.TIMING_LOW; - } - else - { - genum2_0 = !this.treeView1.SelectedNode.FullPath.Contains("Knock Limit High") ? (!this.treeView1.SelectedNode.FullPath.Contains("Knock Limit Low") ? (!this.treeView1.SelectedNode.FullPath.Contains("Lambda Target High") ? (!this.treeView1.SelectedNode.FullPath.Contains("Lambda Target Low") ? (!this.treeView1.SelectedNode.FullPath.Contains("AFM Fuel") ? GEnum2.NOT_SELECTED : GEnum2.AFM_FUEL) : GEnum2.LAMBDA_TGT_LOW) : GEnum2.LAMBDA_TGT_HIGH) : GEnum2.KNOCK_LOW) : GEnum2.KNOCK_HIGH; - } + //################################################################################## + this.groupBox1.Text = "Table: " + this.treeView1.SelectedNode.Text; string text = this.treeView1.SelectedNode.Text; if (text != null) { - if (text == "Knock Sensitivity Low") - { - this.method_16(); - } - if (text == "Fuel High Cam") - { - genum2_0 = GEnum2.VE_HIGH; - this.method_21(); - } - if (text == "Speedlimiter") - { - this.method_25(); - } - if (text == "WOT Determiniation 2(TPS)") - { - float_1[0] = -50f; - float_1[1] = 200f; - float_0 = 1f; - ClassEditor_0.bool_3 = false; - string[] textArray1 = new string[] { "1000", "2000", "3000", "4000", "5000", "6000" }; - ClassEditor_0.smethod_16(ClassEditor_0.int_204, ClassEditor_0.int_203, "RPM", "TPS(%)", textArray1, GEnum2.THROTTLE_REQ, false); - } - if (text == "Cam Angle VTC High") - { - this.method_23(); - } - if (text == "Ignition Timing Low Cam") - { - genum2_0 = GEnum2.TIMING_LOW; - this.method_20(); - } - if (text == "AFM Fuel") - { - genum2_0 = GEnum2.AFM_FUEL; - this.method_8(1); - } - if (text == "Knock Retard Low") - { - this.method_18(); - } - if (text == "20\x00b0") - { - this.int_0 = 20; - if (genum2_0 == GEnum2.TIMING_HIGH) - { - this.method_11(this.int_0); - } - else if (genum2_0 == GEnum2.TIMING_LOW) - { - this.method_12(this.int_0); - } - else if (genum2_0 == GEnum2.KNOCK_HIGH) - { - this.method_13(this.int_0); - } - else if (genum2_0 == GEnum2.KNOCK_LOW) - { - this.method_14(this.int_0); - } - } - if (text == "VTEC Engagement") - { - float_1[0] = -10000f; - float_1[1] = 30000f; - float_0 = 10f; - ClassEditor_0.bool_3 = false; - ClassEditor_0.smethod_16(ClassEditor_0.int_5, ClassEditor_0.int_2, "", "RPM", this.string_4, GEnum2.TIMING_HIGH, true); - genum2_0 = GEnum2.VTEC_PARAMS; - } - if (text == "Ignition Timing VTC Low") - { - genum2_0 = GEnum2.TIMING_LOW; - this.method_12(0); - } - if (text == "40\x00b0") - { - this.int_0 = 40; - if (genum2_0 == GEnum2.TIMING_HIGH) - { - this.method_11(this.int_0); - } - else if (genum2_0 == GEnum2.TIMING_LOW) - { - this.method_12(this.int_0); - } - else if (genum2_0 == GEnum2.KNOCK_HIGH) - { - this.method_13(this.int_0); - } - else if (genum2_0 == GEnum2.KNOCK_LOW) - { - this.method_14(this.int_0); - } - } - if (text == "Throttle Response 1") - { - this.method_26(); - } - if (text == "Throttle Response 2") - { - this.method_27(); - } - if (text == "Knock Limit High") - { - genum2_0 = GEnum2.KNOCK_HIGH; - this.method_13(0); - } - if (text == "MAF Load Limit") - { - float_1[0] = -1000f; - float_1[1] = 4000f; - float_0 = 50f; - ClassEditor_0.bool_3 = false; - int[] numArray1 = new int[] { 4, 1 }; - string[] textArray3 = new string[] { "", "", "", "" }; - ClassEditor_0.smethod_16(numArray1, ClassEditor_0.int_216, "Mg/Stroke", "", textArray3, GEnum2.TIMING_HIGH, false); - } - if (text == "LAF Voltage to Lambda") - { - float_1[0] = 0f; - float_1[1] = 4f; - float_0 = 0.01f; - ClassEditor_0.bool_3 = false; - ClassEditor_0.smethod_16(ClassEditor_0.int_140, ClassEditor_0.int_139, "Volts(mv)", "λ", this.string_1, GEnum2.LAF_VOLTAGE, false); - } - if (text == "Fuel Value 1") - { - this.int_1 = 1; - if (genum2_0 == GEnum2.AFM_FUEL) - { - this.method_8(this.int_1); - } - } - if (text == "Fuel Value 2") - { - this.int_1 = 2; - if (genum2_0 == GEnum2.AFM_FUEL) - { - this.method_8(this.int_1); - } - } - if (text == "Target 1") - { - this.int_1 = 1; - if (genum2_0 == GEnum2.LAMBDA_TGT_HIGH) - { - this.method_9(this.int_1); - } - else if (genum2_0 == GEnum2.LAMBDA_TGT_LOW) - { - this.method_10(this.int_1); - } - } - if (text == "Target 2") - { - this.int_1 = 2; - if (genum2_0 == GEnum2.LAMBDA_TGT_HIGH) - { - this.method_9(this.int_1); - } - else if (genum2_0 == GEnum2.LAMBDA_TGT_LOW) - { - this.method_10(this.int_1); - } - } - if (text == "Target 3") - { - this.int_1 = 3; - if (genum2_0 == GEnum2.LAMBDA_TGT_HIGH) - { - this.method_9(this.int_1); - } - else if (genum2_0 == GEnum2.LAMBDA_TGT_LOW) - { - this.method_10(this.int_1); - } - } - if (text == "Post Start Idle Speed") - { - float_1[0] = -1000f; - float_1[1] = 4000f; - float_0 = 50f; - ClassEditor_0.bool_3 = false; - ClassEditor_0.smethod_16(ClassEditor_0.int_200, ClassEditor_0.int_199, "Coolant Temp", "RPM", this.method_36(ClassEditor_0.int_200[0], 0xfa90), GEnum2.TIMING_HIGH, false); - } - if (text == "WOT Determiniation 1(TPS)") + string ParentNode = ""; + if (this.treeView1.SelectedNode.ParentNode != null) ParentNode = this.treeView1.SelectedNode.ParentNode.Text; + int NodeIndex = GetNodeParameterIndex(text, ParentNode); + + if (NodeIndex == -1) { - float_1[0] = -50f; - float_1[1] = 200f; - float_0 = 1f; - ClassEditor_0.bool_3 = false; - string[] textArray2 = new string[] { "1000", "2000", "3000", "4000", "5000", "6000" }; - ClassEditor_0.smethod_16(ClassEditor_0.int_202, ClassEditor_0.int_201, "RPM", "TPS(%)", textArray2, GEnum2.THROTTLE_REQ, false); + Editortable_0.GForm_Main_0.method_1("ROM Indexing error with Nodes!"); + ClassEditor_0.bool_1 = true; + return; } - if (text == "00\x00b0") + + //Empty 'Main' Node -> Select first child node + if (ClassEditor_0.DefinitionsTableSize[NodeIndex] == "") { - this.int_0 = 0; - if (genum2_0 == GEnum2.TIMING_HIGH) - { - this.method_11(this.int_0); - } - else if (genum2_0 == GEnum2.TIMING_LOW) - { - this.method_12(this.int_0); - } - else if (genum2_0 == GEnum2.KNOCK_HIGH) - { - this.method_13(this.int_0); - } - else if (genum2_0 == GEnum2.KNOCK_LOW) + try { - this.method_14(this.int_0); + ClassEditor_0.bool_1 = true; + this.treeView1.SelectNode(this.treeView1.SelectedNode.Nodes[0]); } + catch { } + return; } - if (text == "Knock Retard High") - { - this.method_17(); - } - if (text == "Ignition Timing VTC High") - { - genum2_0 = GEnum2.TIMING_HIGH; - this.method_11(0); - } - if (text == "Revlimiter 8") - { - float_1[0] = 0f; - float_1[1] = 10000f; - float_0 = 50f; - ClassEditor_0.bool_3 = false; - string[] textArray4 = new string[] { "", "" }; - ClassEditor_0.smethod_16(ClassEditor_0.int_27, ClassEditor_0.int_14, "", "RPM", textArray4, GEnum2.TIMING_HIGH, false); - } - if (text == "Revlimiter 6") - { - float_1[0] = 0f; - float_1[1] = 10000f; - float_0 = 50f; - ClassEditor_0.bool_3 = false; - string[] textArray6 = new string[] { "", "" }; - ClassEditor_0.smethod_16(ClassEditor_0.int_27, ClassEditor_0.int_12, "", "RPM", textArray6, GEnum2.TIMING_HIGH, false); - } - if (text == "Cam Angle VTC Low") - { - this.method_24(); - } - if (text == "Revlimiter 7") - { - float_1[0] = 0f; - float_1[1] = 10000f; - float_0 = 50f; - ClassEditor_0.bool_3 = false; - string[] textArray5 = new string[] { "", "" }; - ClassEditor_0.smethod_16(ClassEditor_0.int_27, ClassEditor_0.int_13, "", "RPM", textArray5, GEnum2.TIMING_HIGH, false); - } - if (text == "Idle Speed") - { - float_1[0] = -1000f; - float_1[1] = 4000f; - float_0 = 50f; - ClassEditor_0.bool_3 = false; - ClassEditor_0.smethod_16(ClassEditor_0.int_198, ClassEditor_0.int_197, "Coolant Temp", "RPM", this.method_36(ClassEditor_0.int_198[0], 0xfa70), GEnum2.TIMING_HIGH, false); - } - if (text == "Fuel Low Cam") - { - genum2_0 = GEnum2.VE_LOW; - this.method_22(); - } - if (text == "Revlimiter 4") - { - float_1[0] = 0f; - float_1[1] = 10000f; - float_0 = 50f; - ClassEditor_0.bool_3 = false; - string[] textArray7 = new string[] { "", "" }; - ClassEditor_0.smethod_16(ClassEditor_0.int_27, ClassEditor_0.int_10, "", "RPM", textArray7, GEnum2.TIMING_HIGH, false); - } - if (text == "Revlimiter 5") - { - float_1[0] = 0f; - float_1[1] = 10000f; - float_0 = 50f; - ClassEditor_0.bool_3 = false; - string[] textArray9 = new string[] { "", "" }; - ClassEditor_0.smethod_16(ClassEditor_0.int_27, ClassEditor_0.int_11, "", "RPM", textArray9, GEnum2.TIMING_HIGH, false); - } - if (text == "Revlimiter 2") - { - float_1[0] = 0f; - float_1[1] = 10000f; - float_0 = 50f; - ClassEditor_0.bool_3 = false; - string[] textArray8 = new string[] { "", "" }; - ClassEditor_0.smethod_16(ClassEditor_0.int_27, ClassEditor_0.int_8, "", "RPM", textArray8, GEnum2.TIMING_HIGH, false); - } - if (text == "Revlimiter 3") - { - float_1[0] = 0f; - float_1[1] = 10000f; - float_0 = 50f; - ClassEditor_0.bool_3 = false; - string[] textArray11 = new string[] { "", "" }; - ClassEditor_0.smethod_16(ClassEditor_0.int_27, ClassEditor_0.int_9, "", "RPM", textArray11, GEnum2.TIMING_HIGH, false); - } - if (text == "Revlimiter 1") - { - float_1[0] = 0f; - float_1[1] = 10000f; - float_0 = 50f; - ClassEditor_0.bool_3 = false; - string[] textArray10 = new string[] { "", "" }; - ClassEditor_0.smethod_16(ClassEditor_0.int_27, ClassEditor_0.int_7, "", "RPM", textArray10, GEnum2.TIMING_HIGH, false); - } - if (text == "Lambda Target High Cam") - { - genum2_0 = GEnum2.LAMBDA_TGT_HIGH; - this.method_9(1); - } - if (text == "Knock Limit Low") - { - genum2_0 = GEnum2.KNOCK_LOW; - this.method_14(0); - } - if (text == "Lambda Target Low Cam") - { - genum2_0 = GEnum2.LAMBDA_TGT_LOW; - this.method_10(1); - } - if (text == "Revlimiter") - { - float_1[0] = 0f; - float_1[1] = 10000f; - float_0 = 50f; - ClassEditor_0.bool_3 = false; - string[] textArray14 = new string[] { "", "" }; - ClassEditor_0.smethod_16(ClassEditor_0.int_27, ClassEditor_0.int_6, "", "RPM", textArray14, GEnum2.TIMING_HIGH, false); - } - if (text == "Injector Voltage Compensation") - { - float_1[0] = -1000f; - float_1[1] = 3000f; - float_0 = 1f; - ClassEditor_0.bool_3 = false; - ClassEditor_0.smethod_16(ClassEditor_0.int_33, ClassEditor_0.int_30, "Volts", "ms", this.string_0, GEnum2.INJ_DEADTIME, false); - genum2_0 = GEnum2.INJ_DEADTIME; - } - if (text == "Knock Sensitivity High") - { - this.method_15(); - } - if (text == "10\x00b0") + + float_1[0] = ClassEditor_0.DefinitionsValueMin[NodeIndex]; + float_1[1] = ClassEditor_0.DefinitionsValueMax[NodeIndex]; + float_0 = (float) ClassEditor_0.DefinitionsChangeAmount[NodeIndex]; + ClassEditor_0.IsSingleByteX = ClassEditor_0.DefinitionsIsSingleByteX[NodeIndex]; + ClassEditor_0.IsSingleByteY = ClassEditor_0.DefinitionsIsSingleByteY[NodeIndex]; + ClassEditor_0.IsSingleByteTable = ClassEditor_0.DefinitionsIsSingleByteTable[NodeIndex]; + + //Set TableSize + string TableSizeStr = ClassEditor_0.DefinitionsTableSize[NodeIndex].ToLower(); + string[] TableSizeStrSplit = TableSizeStr.Split('x'); + int[] TableSizze = new int[] { int.Parse(TableSizeStrSplit[0]), int.Parse(TableSizeStrSplit[1]) }; + + //Set X rom location + int ParamLocation = ClassEditor_0.HexStringToInt(ClassEditor_0.DefinitionsLocationsX[NodeIndex]); + + //Set Y Headers (normal header mode) + int DoingThisSize = TableSizze[0]; + if (ClassEditor_0.DefinitionsIsInverted[NodeIndex]) DoingThisSize = TableSizze[1]; + + string[] textArray1 = new string[DoingThisSize]; + if (ClassEditor_0.DefinitionsHeaders[NodeIndex] != "" && ClassEditor_0.DefinitionsHeaders[NodeIndex].Contains(",")) { - this.int_0 = 10; - if (genum2_0 == GEnum2.TIMING_HIGH) - { - this.method_11(this.int_0); - } - else if (genum2_0 == GEnum2.TIMING_LOW) - { - this.method_12(this.int_0); - } - else if (genum2_0 == GEnum2.KNOCK_HIGH) - { - this.method_13(this.int_0); - } - else if (genum2_0 == GEnum2.KNOCK_LOW) + string[] AllHeaders = ClassEditor_0.DefinitionsHeaders[NodeIndex].Split(','); + if (AllHeaders.Length != DoingThisSize) Editortable_0.GForm_Main_0.method_1("Headers length not matching Table Size"); + if (AllHeaders.Length == DoingThisSize) { - this.method_14(this.int_0); + for (int i = 0; i < AllHeaders.Length; i++) + { + textArray1[i] = AllHeaders[i]; + } } } - if (text == "WOT Determiniation (MAP)") - { - float_1[0] = 0f; - float_1[1] = 120f; - float_0 = 1f; - ClassEditor_0.bool_3 = false; - string[] textArray13 = new string[] { "1000", "2000", "3000", "4000", "5000", "6000", "7000" }; - ClassEditor_0.smethod_16(ClassEditor_0.int_206, ClassEditor_0.int_205, "RPM", "MAP(kpa)", textArray13, GEnum2.WOT_MAP, false); - } - if (text == "Mass Airflow Conversion Curve") - { - float_1[0] = -10000f; - float_1[1] = 30000f; - float_0 = 1f; - ClassEditor_0.bool_3 = false; - ClassEditor_0.smethod_16(ClassEditor_0.int_37, ClassEditor_0.int_34, "Volts", "g/s", this.method_35(ClassEditor_0.int_37[0], ClassEditor_0.int_36), GEnum2.TIMING_HIGH, false); - } - if (text == "Minimum IPW") - { - float_1[0] = -6f; - float_1[1] = 5f; - float_0 = 0.001f; - genum2_0 = GEnum2.MIN_IPW; - ClassEditor_0.bool_3 = false; - int[] numArray3 = new int[] { 1, 1 }; - string[] textArray12 = new string[] { "" }; - ClassEditor_0.smethod_16(numArray3, ClassEditor_0.int_217, "Min IPW", "", textArray12, GEnum2.MIN_IPW, false); - } - if (text == "Ignition Timing High Cam") - { - genum2_0 = GEnum2.TIMING_HIGH; - this.method_19(); - } - if (text == "Overrun Fuel Cut(Gear Determiniation)") - { - float_1[0] = -1000f; - float_1[1] = 5000f; - float_0 = 50f; - ClassEditor_0.bool_3 = false; - int[] numArray2 = new int[] { 5, 1 }; - ClassEditor_0.smethod_16(numArray2, ClassEditor_0.int_215, "Gear", "Delay(ms)", this.string_2, GEnum2.TIMING_HIGH, false); - } - if (text == "30\x00b0") + + //Set Y Advanced Header (values from 'DefinitionsLocationsHeader' with mathematical function 'MathHeader') + string NewHeaderLocation = ClassEditor_0.DefinitionsLocationsY[NodeIndex]; + if (NewHeaderLocation != "") { - this.int_0 = 30; - if (genum2_0 == GEnum2.TIMING_HIGH) - { - this.method_11(this.int_0); - } - else if (genum2_0 == GEnum2.TIMING_LOW) - { - this.method_12(this.int_0); - } - else if (genum2_0 == GEnum2.KNOCK_HIGH) - { - this.method_13(this.int_0); - } - else if (genum2_0 == GEnum2.KNOCK_LOW) - { - this.method_14(this.int_0); - } + int ParamHeaderLocation = ClassEditor_0.HexStringToInt(NewHeaderLocation); + textArray1 = ClassEditor_0.GetAdvancedHeader(TableSizze[0], ParamHeaderLocation, ClassEditor_0.DefinitionsMathY[NodeIndex], ClassEditor_0.DefinitionsFormatY[NodeIndex]); } - } - } - } - /*public static ImageList ImageList_0 - { - get - { - if (imageList_0 == null) - { - imageList_0 = new ImageList(); - imageList_0.Images.Add("HighCam", global::Properties.Resources.Lightning2); - imageList_0.Images.Add("LowCam", global::Properties.Resources.Lightning); - imageList_0.Images.Add("HighFuel", global::Properties.Resources.injector2); - imageList_0.Images.Add("LowFuel", global::Properties.Resources.injector1); - imageList_0.Images.Add("Table", global::Properties.Resources.Script1); - imageList_0.Images.Add("Degree", global::Properties.Resources.Target); - imageList_0.Images.Add("Red", global::Properties.Resources.Report); - imageList_0.Images.Add("Normal", global::Properties.Resources.Wrench); - imageList_0.Images.Add("Vtec", global::Properties.Resources.Pinion); - imageList_0.Images.Add("Knock", global::Properties.Resources.Problem); - imageList_0.Images.Add("Bang", global::Properties.Resources.Disaster); + //Show Value in Datagridview + ClassEditor_0.SetTableValues(TableSizze, ParamLocation, ClassEditor_0.DefinitionsUnit1[NodeIndex], ClassEditor_0.DefinitionsUnit2[NodeIndex], textArray1, ClassEditor_0.DefinitionsMathX[NodeIndex], ClassEditor_0.DefinitionsFormatX[NodeIndex], ClassEditor_0.DefinitionsIsInverted[NodeIndex], ClassEditor_0.HexStringToInt(ClassEditor_0.DefinitionsLocationsTable[NodeIndex]), ClassEditor_0.DefinitionsMathTable[NodeIndex], ClassEditor_0.DefinitionsFormatTable[NodeIndex]); } - return imageList_0; } - }*/ - - public enum GEnum2 - { - TIMING_HIGH = 0, - TIMING_LOW = 1, - VE_HIGH = 2, - VE_LOW = 3, - KNOCK_HIGH = 4, - KNOCK_LOW = 5, - LAMBDA_TGT_HIGH = 6, - LAMBDA_TGT_LOW = 7, - AFM_FUEL = 8, - LAF_VOLTAGE = 9, - INJ_DEADTIME = 10, - THROTTLE_REQ = 11, - WOT_MAP = 12, - VTEC_PARAMS = 13, - MIN_IPW = 14, - NOT_SELECTED = 0xff - } - public enum GEnum3 - { - RRB140, - S2K + ClassEditor_0.bool_1 = true; } private void button1_Click(object sender, EventArgs e) @@ -3513,8 +814,41 @@ private void button2_Click(object sender, EventArgs e) DialogResult result = saveFileDialog1.ShowDialog(); if (result == DialogResult.OK) { - this.ClassEditor_0.smethod_15(saveFileDialog1.FileName); + this.ClassEditor_0.SaveROMBytes(saveFileDialog1.FileName); + } + } + + public void CheckDefinitionFolderExist() + { + string Paath = Application.StartupPath + @"\Definitions"; + if (!Directory.Exists(Paath)) + { + Directory.CreateDirectory(Paath); + File.WriteAllBytes(Paath + @"\37805_RRB_A140.txt", FlashToolTest.Properties.Resources._37805_RRB_A140); + File.WriteAllBytes(Paath + @"\37805_RWC_A620.txt", FlashToolTest.Properties.Resources._37805_RWC_A620); + File.WriteAllBytes(Paath + @"\37805_S2K.txt", FlashToolTest.Properties.Resources._37805_S2K); } } + + private void openDefinitionsFolderToolStripMenuItem_Click(object sender, EventArgs e) + { + CheckDefinitionFolderExist(); + System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo() + { + FileName = Application.StartupPath + @"\Definitions", + UseShellExecute = true, + Verb = "open" + }); + } + + private void increaseSelectionToolStripMenuItem_Click(object sender, EventArgs e) + { + ClassEditor_0.IncDecreaseSelection(false, false); + } + + private void decreaseSelectionToolStripMenuItem_Click(object sender, EventArgs e) + { + ClassEditor_0.IncDecreaseSelection(true, false); + } } diff --git a/Editortable.resx b/Editortable.resx index 9e67a50..c236d6e 100644 --- a/Editortable.resx +++ b/Editortable.resx @@ -123,7 +123,40 @@ 157, 17 + + 293, 17 + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + AAABAAEAAAAAAAEAIAAokQAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAEAAAABAAgGAAAAXHKoZgAAgABJ diff --git a/FlashToolTest.csproj b/FlashToolTest.csproj index 9c452e1..d42e18d 100644 --- a/FlashToolTest.csproj +++ b/FlashToolTest.csproj @@ -153,6 +153,9 @@ + + + Always diff --git a/GForm_Main.cs b/GForm_Main.cs index a98db98..74335b3 100644 --- a/GForm_Main.cs +++ b/GForm_Main.cs @@ -30,6 +30,7 @@ public class GForm_Main : DarkForm private DarkButton darkButton6; private DarkButton darkButton3; public Editortable Editortable_0; + public string Version = "v1.0.8"; public GForm_Main() { @@ -48,6 +49,8 @@ public GForm_Main() Editortable_0 = new Editortable(ref GForm_Main_0); Class_RWD.Load(ref GForm_Main_0); + + this.Text = this.Text + " (" + Version + ")"; } diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs index 4af114e..131edcc 100644 --- a/Properties/Resources.Designer.cs +++ b/Properties/Resources.Designer.cs @@ -59,5 +59,35 @@ internal Resources() { resourceCulture = value; } } + + /// + /// Recherche une ressource localisée de type System.Byte[]. + /// + internal static byte[] _37805_RRB_A140 { + get { + object obj = ResourceManager.GetObject("_37805_RRB_A140", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Recherche une ressource localisée de type System.Byte[]. + /// + internal static byte[] _37805_RWC_A620 { + get { + object obj = ResourceManager.GetObject("_37805_RWC_A620", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Recherche une ressource localisée de type System.Byte[]. + /// + internal static byte[] _37805_S2K { + get { + object obj = ResourceManager.GetObject("_37805_S2K", resourceCulture); + return ((byte[])(obj)); + } + } } } diff --git a/Properties/Resources.resx b/Properties/Resources.resx index 7c0911e..d9b3a2e 100644 --- a/Properties/Resources.resx +++ b/Properties/Resources.resx @@ -118,4 +118,13 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ..\bin\Debug\Definitions\37805-RRB-A140.txt;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\bin\Debug\Definitions\37805-RWC-A620.txt;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\bin\Debug\Definitions\37805-S2K.txt;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/Properties/Settings.Designer.cs b/Properties/Settings.Designer.cs index eedfb3f..7c07f81 100644 --- a/Properties/Settings.Designer.cs +++ b/Properties/Settings.Designer.cs @@ -1,28 +1,24 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// Ce code a été généré par un outil. +// Version du runtime :4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si +// le code est régénéré. // //------------------------------------------------------------------------------ -namespace FlashToolTest.Properties -{ - - +namespace FlashToolTest.Properties { + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.3.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default - { - get - { + + public static Settings Default { + get { return defaultInstance; } } diff --git a/bin/Debug/Definitions/37805-RRB-A140.txt b/bin/Debug/Definitions/37805-RRB-A140.txt new file mode 100644 index 0000000..fa03f06 --- /dev/null +++ b/bin/Debug/Definitions/37805-RRB-A140.txt @@ -0,0 +1,760 @@ +# +# +# +# +# Name:ANY_NAME +# Unit1:KPH +# Unit2:RPM +# TableSize:4x1 +# IsInverted:false +# IsSingleByteX:false +# IsSingleByteY:false +# IsSingleByteTable:false +# ValueMin:0 +# ValueMax:255 +# ChangeAmount:1 +# Headers:2000,4000,6000,8000 +# ROMLocationX:0xFFFF +# ROMLocationY:0xFFFF +# ROMLocationTable:0xFFFF +# MathX:X*1 +# MathY:X*1 +# MathTable:X*1 +# FormatX:0.00 +# FormatY:0.00 +# FormatTable:0.00 +# +# +# +# +####################################################################### +####################################################################### +####################################################################### +####################################################################### +# Supported ECU: +####################################################################### +37805-RRB-A110 +37805-RRB-A120 +37805-RRB-A130 +37805-RRB-A140 +####################################################################### +####################################################################### +####################################################################### +# ROM Parameters Definitions +####################################################################### +ROMLocationX:0xB5C2 +Name:VTEC Engagement +Unit2:RPM +TableSize:1x4 +IsInverted:true +ValueMin:-10000 +ValueMax:30000 +ChangeAmount:10 +Headers:Enable Low,Disable Low,Enable High,Disable High +############################# +ROMLocationX:0x11680 +Name:Revlimiter +Unit2:RPM +TableSize:2x1 +ValueMax:10000 +ChangeAmount:50 +############################# +ROMLocationX:0x11688 +Name:--Revlimiter 1 +Unit2:RPM +TableSize:2x1 +ValueMax:10000 +ChangeAmount:50 +############################# +ROMLocationX:0x11690 +Name:--Revlimiter 2 +Unit2:RPM +TableSize:2x1 +ValueMax:10000 +ChangeAmount:50 +############################# +ROMLocationX:0x11698 +Name:--Revlimiter 3 +Unit2:RPM +TableSize:2x1 +ValueMax:10000 +ChangeAmount:50 +############################# +ROMLocationX:0x116A0 +Name:--Revlimiter 4 +Unit2:RPM +TableSize:2x1 +ValueMax:10000 +ChangeAmount:50 +############################# +ROMLocationX:0x116A4 +Name:--Revlimiter 5 +Unit2:RPM +TableSize:2x1 +ValueMax:10000 +ChangeAmount:50 +############################# +ROMLocationX:0x116B4 +Name:--Revlimiter 6 +Unit2:RPM +TableSize:2x1 +ValueMax:10000 +ChangeAmount:50 +############################# +ROMLocationX:0x11690 +Name:--Revlimiter 7 +Unit2:RPM +TableSize:2x1 +ValueMax:10000 +ChangeAmount:50 +############################# +ROMLocationX:0xB488 +Name:--Revlimiter 8 +Unit2:RPM +TableSize:2x1 +ValueMax:10000 +ChangeAmount:50 +############################# +ROMLocationX:0xBA4A +Name:Speedlimiter +Unit2:KPH +TableSize:1x1 +# MathX:X/1.609 +ValueMax:255 +############################# +ROMLocationX:0x128F4 +Name:Injector Voltage Compensation +Unit1:Volts +Unit2:ms +TableSize:5x1 +MathX:X*0.002 +FormatX:0.00 +ValueMin:-1000 +ValueMax:3000 +Headers:6.00,8.00,12.00,14.00,16.00 +############################# +ROMLocationX:0x101D2 +ROMLocationY:0x102D2 +Name:Mass Airflow Conversion Curve +Unit1:Volts +Unit2:g/s +TableSize:64x1 +MathY:X*0.0048828125 +ValueMin:-10000 +ValueMax:30000 +FormatY:0.00 +############################# +ROMLocationX:0x1564C +ROMLocationY:0x15674 +ROMLocationTable:0x18DCC +Name:Cam Angle VTC High +Unit1:RPM/MAP +TableSize:10x20 +ValueMin:-10 +ValueMax:40 +ChangeAmount:0.5 +FormatY:0.0 +FormatTable:0.00 +MathY:X*0.013334 +MathTable:X*0.1 +############################# +ROMLocationX:0x15624 +ROMLocationY:0x15674 +ROMLocationTable:0x18F5C +Name:Cam Angle VTC Low +Unit1:RPM/MAP +TableSize:10x20 +ValueMin:-10 +ValueMax:40 +ChangeAmount:0.5 +FormatY:0.0 +FormatTable:0.00 +MathY:X*0.013334 +MathTable:X*0.1 +############################# +ROMLocationX:0x1913C +ROMLocationY:0x15674 +ROMLocationTable:0x14684 +Name:Ignition Timing VTC Low +Unit1:RPM/MAP +TableSize:10x20 +ValueMin:-10 +ValueMax:55 +ChangeAmount:0.1 +FormatY:0.0 +FormatTable:0.00 +MathY:X*0.013334 +MathTable:X*0.1 +############################# +ROMLocationX:0x1913C +ROMLocationY:0x15674 +ROMLocationTable:0x14814 +Name:--10\x00b0 +Unit1:RPM/MAP +TableSize:10x20 +ValueMin:-10 +ValueMax:55 +ChangeAmount:0.1 +FormatY:0.0 +FormatTable:0.00 +MathY:X*0.013334 +MathTable:X*0.1 +############################# +ROMLocationX:0x1913C +ROMLocationY:0x15674 +ROMLocationTable:0x149A4 +Name:--20\x00b0 +Unit1:RPM/MAP +TableSize:10x20 +ValueMin:-10 +ValueMax:55 +ChangeAmount:0.1 +FormatY:0.0 +FormatTable:0.00 +MathY:X*0.013334 +MathTable:X*0.1 +############################# +ROMLocationX:0x1913C +ROMLocationY:0x15674 +ROMLocationTable:0x14B34 +Name:--30\x00b0 +Unit1:RPM/MAP +TableSize:10x20 +ValueMin:-10 +ValueMax:55 +ChangeAmount:0.1 +FormatY:0.0 +FormatTable:0.00 +MathY:X*0.013334 +MathTable:X*0.1 +############################# +ROMLocationX:0x1913C +ROMLocationY:0x15674 +ROMLocationTable:0x14CC4 +Name:--40\x00b0 +Unit1:RPM/MAP +TableSize:10x20 +ValueMin:-10 +ValueMax:55 +ChangeAmount:0.1 +FormatY:0.0 +FormatTable:0.00 +MathY:X*0.013334 +MathTable:X*0.1 +############################# +ROMLocationX:0x1913C +ROMLocationY:0x15674 +ROMLocationTable:0x14E54 +Name:Ignition Timing VTC High +Unit1:RPM/MAP +TableSize:10x20 +ValueMin:-10 +ValueMax:55 +ChangeAmount:0.1 +FormatY:0.0 +FormatTable:0.00 +MathY:X*0.013334 +MathTable:X*0.1 +############################# +ROMLocationX:0x1913C +ROMLocationY:0x15674 +ROMLocationTable:0x14FE4 +Name:--10\x00b0 +Unit1:RPM/MAP +TableSize:10x20 +ValueMin:-10 +ValueMax:55 +ChangeAmount:0.1 +FormatY:0.0 +FormatTable:0.00 +MathY:X*0.013334 +MathTable:X*0.1 +############################# +ROMLocationX:0x1913C +ROMLocationY:0x15674 +ROMLocationTable:0x15174 +Name:--20\x00b0 +Unit1:RPM/MAP +TableSize:10x20 +ValueMin:-10 +ValueMax:55 +ChangeAmount:0.1 +FormatY:0.0 +FormatTable:0.00 +MathY:X*0.013334 +MathTable:X*0.1 +############################# +ROMLocationX:0x1913C +ROMLocationY:0x15674 +ROMLocationTable:0x15304 +Name:--30\x00b0 +Unit1:RPM/MAP +TableSize:10x20 +ValueMin:-10 +ValueMax:55 +ChangeAmount:0.1 +FormatY:0.0 +FormatTable:0.00 +MathY:X*0.013334 +MathTable:X*0.1 +############################# +ROMLocationX:0x1913C +ROMLocationY:0x15674 +ROMLocationTable:0x15494 +Name:--40\x00b0 +Unit1:RPM/MAP +TableSize:10x20 +ValueMin:-10 +ValueMax:55 +ChangeAmount:0.1 +FormatY:0.0 +FormatTable:0.00 +MathY:X*0.013334 +MathTable:X*0.1 +############################# +Name:AFM Fuel +############################# +ROMLocationX:0x11BF0 +ROMLocationY:0x12884 +ROMLocationTable:0x11BE0 +Name:--Fuel Value 1 +Unit1:AirMass (mg) +Unit2:IPW (ms) +TableSize:8x1 +ValueMin:0 +ValueMax:14 +ChangeAmount:0.1 +FormatX:0.00 +MathY:X*0.1 +MathX:X*0.002 +############################# +ROMLocationX:0x12894 +ROMLocationY:0x12884 +ROMLocationTable:0x11BE0 +Name:--Fuel Value 2 +Unit1:AirMass (mg) +Unit2:IPW (ms) +TableSize:8x1 +ValueMin:0 +ValueMax:14 +ChangeAmount:0.1 +FormatX:0.00 +MathY:X*0.1 +MathX:X*0.002 +############################# +Name:Lambda Target High Cam +############################# +ROMLocationX:0x1913C +ROMLocationY:0x15674 +ROMLocationTable:0x12132 +Name:--Target 1 +Unit1:RPM/MAP +TableSize:10x20 +ValueMin:10 +ValueMax:14.8 +ChangeAmount:0.1 +IsSingleByteTable:true +FormatY:0.0 +FormatTable:0.00 +MathY:X*0.013334 +MathTable:128.0/X*14.7 +############################# +ROMLocationX:0x1913C +ROMLocationY:0x15674 +ROMLocationTable:0x122C2 +Name:--Target 2 +Unit1:RPM/MAP +TableSize:10x20 +ValueMin:10 +ValueMax:14.8 +ChangeAmount:0.1 +IsSingleByteTable:true +FormatY:0.0 +FormatTable:0.00 +MathY:X*0.013334 +MathTable:128.0/X*14.7 +############################# +ROMLocationX:0x1913C +ROMLocationY:0x15674 +ROMLocationTable:0x1251A +Name:--Target 3 +Unit1:RPM/MAP +TableSize:10x20 +ValueMin:10 +ValueMax:14.8 +ChangeAmount:0.1 +IsSingleByteTable:true +FormatY:0.0 +FormatTable:0.00 +MathY:X*0.013334 +MathTable:128.0/X*14.7 +############################# +Name:Lambda Target Low Cam +############################# +ROMLocationX:0x1913C +ROMLocationY:0x15674 +ROMLocationTable:0x121FA +Name:--Target 1 +Unit1:RPM/MAP +TableSize:10x20 +ValueMin:10 +ValueMax:14.8 +ChangeAmount:0.1 +IsSingleByteTable:true +FormatY:0.0 +FormatTable:0.00 +MathY:X*0.013334 +MathTable:128.0/X*14.7 +############################# +ROMLocationX:0x1913C +ROMLocationY:0x15674 +ROMLocationTable:0x1238A +Name:--Target 2 +Unit1:RPM/MAP +TableSize:10x20 +ValueMin:10 +ValueMax:14.8 +ChangeAmount:0.1 +IsSingleByteTable:true +FormatY:0.0 +FormatTable:0.00 +MathY:X*0.013334 +MathTable:128.0/X*14.7 +############################# +ROMLocationX:0x1913C +ROMLocationY:0x15674 +ROMLocationTable:0x12452 +Name:--Target 3 +Unit1:RPM/MAP +TableSize:10x20 +ValueMin:10 +ValueMax:14.8 +ChangeAmount:0.1 +IsSingleByteTable:true +FormatY:0.0 +FormatTable:0.00 +MathY:X*0.013334 +MathTable:128.0/X*14.7 +############################# +ROMLocationX:0x11774 +Name:LAF Voltage to Lambda +Unit1:Volts(V) +Unit2:λ +MathX:32767/X +FormatX:0.00 +TableSize:15x1 +ValueMax:4 +ChangeAmount:0.01 +Headers:1.23,1.67,2.04,2.5,2.75,2.89,3.02,3.13,3.23,3.36,3.51,3.63,3.74,4.01,4.19 +############################# +ROMLocationX:0x1913C +ROMLocationY:0x15674 +ROMLocationTable:0x13660 +Name:Knock Limit High +Unit1:RPM/MAP +TableSize:10x20 +ValueMin:-25 +ValueMax:60 +ChangeAmount:0.1 +FormatY:0.0 +FormatTable:0.00 +MathY:X*0.013334 +MathTable:X*0.1 +############################# +ROMLocationX:0x1913C +ROMLocationY:0x15674 +ROMLocationTable:0x137F0 +Name:--10\x00b0 +Unit1:RPM/MAP +TableSize:10x20 +ValueMin:-25 +ValueMax:60 +ChangeAmount:0.1 +FormatY:0.0 +FormatTable:0.00 +MathY:X*0.013334 +MathTable:X*0.1 +############################# +ROMLocationX:0x1913C +ROMLocationY:0x15674 +ROMLocationTable:0x13980 +Name:--20\x00b0 +Unit1:RPM/MAP +TableSize:10x20 +ValueMin:-25 +ValueMax:60 +ChangeAmount:0.1 +FormatY:0.0 +FormatTable:0.00 +MathY:X*0.013334 +MathTable:X*0.1 +############################# +ROMLocationX:0x1913C +ROMLocationY:0x15674 +ROMLocationTable:0x13B10 +Name:--30\x00b0 +Unit1:RPM/MAP +TableSize:10x20 +ValueMin:-25 +ValueMax:60 +ChangeAmount:0.1 +FormatY:0.0 +FormatTable:0.00 +MathY:X*0.013334 +MathTable:X*0.1 +############################# +ROMLocationX:0x1913C +ROMLocationY:0x15674 +ROMLocationTable:0x13CA0 +Name:--40\x00b0 +Unit1:RPM/MAP +TableSize:10x20 +ValueMin:-25 +ValueMax:60 +ChangeAmount:0.1 +FormatY:0.0 +FormatTable:0.00 +MathY:X*0.013334 +MathTable:X*0.1 +############################# +ROMLocationX:0x1913C +ROMLocationY:0x15674 +ROMLocationTable:0x12E90 +Name:Knock Limit Low +Unit1:RPM/MAP +TableSize:10x20 +ValueMin:-25 +ValueMax:80 +ChangeAmount:0.1 +FormatY:0.0 +FormatTable:0.00 +MathY:X*0.013334 +MathTable:X*0.1 +############################# +ROMLocationX:0x1913C +ROMLocationY:0x15674 +ROMLocationTable:0x13020 +Name:--10\x00b0 +Unit1:RPM/MAP +TableSize:10x20 +ValueMin:-25 +ValueMax:80 +ChangeAmount:0.1 +FormatY:0.0 +FormatTable:0.00 +MathY:X*0.013334 +MathTable:X*0.1 +############################# +ROMLocationX:0x1913C +ROMLocationY:0x15674 +ROMLocationTable:0x131B0 +Name:--20\x00b0 +Unit1:RPM/MAP +TableSize:10x20 +ValueMin:-25 +ValueMax:80 +ChangeAmount:0.1 +FormatY:0.0 +FormatTable:0.00 +MathY:X*0.013334 +MathTable:X*0.1 +############################# +ROMLocationX:0x1913C +ROMLocationY:0x15674 +ROMLocationTable:0x13340 +Name:--30\x00b0 +Unit1:RPM/MAP +TableSize:10x20 +ValueMin:-25 +ValueMax:80 +ChangeAmount:0.1 +FormatY:0.0 +FormatTable:0.00 +MathY:X*0.013334 +MathTable:X*0.1 +############################# +ROMLocationX:0x1913C +ROMLocationY:0x15674 +ROMLocationTable:0x134D0 +Name:--40\x00b0 +Unit1:RPM/MAP +TableSize:10x20 +ValueMin:-25 +ValueMax:80 +ChangeAmount:0.1 +FormatY:0.0 +FormatTable:0.00 +MathY:X*0.013334 +MathTable:X*0.1 +############################# +ROMLocationX:0x1913C +ROMLocationY:0x15674 +ROMLocationTable:0x15E04 +Name:Knock Sensitivity High +Unit1:RPM/MAP +TableSize:10x20 +ValueMin:-5 +ValueMax:205 +ChangeAmount:0.1 +FormatY:0.0 +FormatTable:0.00 +MathY:X*0.013334 +MathTable:X*0.1 +############################# +ROMLocationX:0x1913C +ROMLocationY:0x15674 +ROMLocationTable:0x15C74 +Name:Knock Sensitivity Low +Unit1:RPM/MAP +TableSize:10x20 +ValueMin:-5 +ValueMax:205 +ChangeAmount:0.1 +FormatY:0.0 +FormatTable:0.00 +MathY:X*0.013334 +MathTable:X*0.1 +############################# +ROMLocationX:0x1913C +ROMLocationY:0x15674 +ROMLocationTable:0x12D00 +Name:Knock Retard High +Unit1:RPM/MAP +TableSize:10x20 +ValueMin:-5 +ValueMax:20 +ChangeAmount:0.1 +FormatY:0.0 +FormatTable:0.00 +MathY:X*0.013334 +MathTable:X*0.1 +IsSingleByteTable:true +############################# +ROMLocationX:0x1913C +ROMLocationY:0x15674 +ROMLocationTable:0x12DC8 +Name:Knock Retard Low +Unit1:RPM/MAP +TableSize:10x20 +ValueMin:-5 +ValueMax:20 +ChangeAmount:0.1 +FormatY:0.0 +FormatTable:0.00 +MathY:X*0.013334 +MathTable:X*0.1 +IsSingleByteTable:true +############################# +ROMLocationX:0xFC6C +ROMLocationY:0xFA70 +Name:Idle Speed +Unit1:Coolant Temp +Unit2:RPM +TableSize:8x1 +ValueMin:-1000 +ValueMax:4000 +ChangeAmount:50 +MathY:X/10 +############################# +ROMLocationX:0xFC7C +ROMLocationY:0xFA70 +Name:Post Start Idle Speed +Unit1:Coolant Temp +Unit2:RPM +TableSize:8x1 +ValueMin:-1000 +ValueMax:4000 +ChangeAmount:50 +MathY:X/10 +############################# +ROMLocationX:0xFE34 +Name:WOT Determiniation 1(TPS) +Unit1:RPM +Unit2:TPS(%) +TableSize:6x1 +ValueMin:-50 +ValueMax:200 +MathX:X*0.005 +FormatX:0.00 +ChangeAmount:1 +Headers:1000,2000,3000,4000,5000,6000 +############################# +ROMLocationX:0xFE4C +Name:WOT Determiniation 2(TPS) +Unit1:RPM +Unit2:TPS(%) +TableSize:6x1 +ValueMin:-50 +ValueMax:200 +MathX:X*0.005 +FormatX:0.00 +ChangeAmount:1 +Headers:1000,2000,3000,4000,5000,6000 +############################# +ROMLocationX:0x10064 +Name:WOT Determiniation (MAP) +Unit1:RPM +Unit2:MAP(kpa) +TableSize:7x1 +ValueMin:0 +ValueMax:120 +MathX:X*0.01 +FormatX:0.00 +ChangeAmount:1 +Headers:1000,2000,3000,4000,5000,6000,7000 +############################# +ROMLocationX:0x10F82 +ROMLocationY:0x10FB4 +ROMLocationTable:0x10D5C +Name:Throttle Response 1 +Unit1:RPM/MAP +TableSize:5x10 +ValueMin:-50 +ValueMax:200 +ChangeAmount:1 +FormatY:0.0 +FormatTable:0.00 +MathTable:X*0.006 +############################# +ROMLocationX:0x10FBE +ROMLocationY:0x10F96 +ROMLocationTable:0x10DC0 +Name:Throttle Response 2 +Unit1:RPM/KPH +TableSize:15x15 +ValueMin:-50 +ValueMax:200 +ChangeAmount:1 +FormatY:0.0 +FormatTable:0.00 +MathY:X*0.01 +MathTable:X*0.006 +############################# +ROMLocationX:0x11546 +Name:Overrun Fuel Cut(Gear Determiniation) +Unit1:Gear +Unit2:Delay(ms) +TableSize:5x1 +ValueMin:-1000 +ValueMax:5000 +ChangeAmount:50 +Headers:1,2,3,4,5-6 +############################# +ROMLocationX:0xAE82 +Name:MAF Load Limit +Unit1:Mg/Stroke +TableSize:4x1 +ValueMin:-1000 +ValueMax:4000 +ChangeAmount:50 +############################# +ROMLocationX:0xAE82 +Name:Minimum IPW +Unit1:Min IPW +TableSize:1x1 +ValueMin:-6 +ValueMax:5 +ChangeAmount:0.001 +MathX:X*0.002 +FormatX:0.000 +############################# \ No newline at end of file diff --git a/bin/Debug/Definitions/37805-RWC-A620.txt b/bin/Debug/Definitions/37805-RWC-A620.txt new file mode 100644 index 0000000..a0ef188 --- /dev/null +++ b/bin/Debug/Definitions/37805-RWC-A620.txt @@ -0,0 +1,126 @@ +####################################################################### +####################################################################### +####################################################################### +####################################################################### +# Supported ECU: +####################################################################### +37805-RWC-A620 +37805-RWC-A610 +####################################################################### +####################################################################### +####################################################################### +# ROM Parameters Definitions +####################################################################### +ROMLocationX:0xB730 +Name:VTEC Engagement +Unit2:RPM +TableSize:1x4 +IsInverted:true +ValueMin:-10000 +ValueMax:30000 +ChangeAmount:10 +Headers:Enable Low,Disable Low,Enable High,Disable High +############################# +ROMLocationX:0x1328C +Name:Revlimiter +Unit2:RPM +TableSize:2x1 +ValueMax:10000 +ChangeAmount:50 +############################# +ROMLocationX:0x13294 +Name:--Revlimiter 1 +Unit2:RPM +TableSize:2x1 +ValueMax:10000 +ChangeAmount:50 +############################# +ROMLocationX:0x1329C +Name:--Revlimiter 2 +Unit2:RPM +TableSize:2x1 +ValueMax:10000 +ChangeAmount:50 +############################# +ROMLocationX:0x132A4 +Name:--Revlimiter 3 +Unit2:RPM +TableSize:2x1 +ValueMax:10000 +ChangeAmount:50 +############################# +ROMLocationX:0x132AC +Name:--Revlimiter 4 +Unit2:RPM +TableSize:2x1 +ValueMax:10000 +ChangeAmount:50 +############################# +ROMLocationX:0x132B0 +Name:--Revlimiter 5 +Unit2:RPM +TableSize:2x1 +ValueMax:10000 +ChangeAmount:50 +############################# +ROMLocationX:0x132C0 +Name:--Revlimiter 6 +Unit2:RPM +TableSize:2x1 +ValueMax:10000 +ChangeAmount:50 +############################# +ROMLocationX:0x132C8 +Name:--Revlimiter 7 +Unit2:RPM +TableSize:2x1 +ValueMax:10000 +ChangeAmount:50 +############################# +ROMLocationX:0xBE8A +Name:Speedlimiter +Unit2:KPH +TableSize:1x1 +# MathX:X/1.609 +ValueMax:255 +############################# +ROMLocationX:0x1D32E +Name:Injector Voltage Compensation +Unit1:Volts +Unit2:ms +TableSize:5x1 +MathX:X*0.002 +FormatX:0.00 +ValueMin:-1000 +ValueMax:3000 +Headers:6.00,8.00,12.00,14.00,16.00 +############################# +ROMLocationX:0x10D0E +ROMLocationY:0x10D8E +Name:Mass Airflow Conversion Curve +Unit1:Volts +Unit2:g/s +TableSize:64x1 +MathY:X*0.0048828125 +ValueMin:-10000 +ValueMax:30000 +FormatY:0.00 +############################# +ROMLocationX:0xAF8A +Name:MAF Load Limit +Unit1:Mg/Stroke +TableSize:4x1 +ValueMin:-1000 +ValueMax:4000 +ChangeAmount:50 +############################# +ROMLocationX:0xC694 +Name:Minimum IPW +Unit1:Min IPW +TableSize:1x1 +ValueMin:-6 +ValueMax:5 +ChangeAmount:0.001 +MathX:X*0.002 +FormatX:0.000 +############################# \ No newline at end of file diff --git a/bin/Debug/Definitions/37805-S2K.txt b/bin/Debug/Definitions/37805-S2K.txt new file mode 100644 index 0000000..0cebd30 --- /dev/null +++ b/bin/Debug/Definitions/37805-S2K.txt @@ -0,0 +1,94 @@ +####################################################################### +####################################################################### +####################################################################### +####################################################################### +# Supported ECU: (UNKOWN YET) +####################################################################### +S2K +####################################################################### +####################################################################### +####################################################################### +# ROM Parameters Definitions +####################################################################### +ROMLocationX:0xB962 +Name:VTEC Engagement +Unit2:RPM +TableSize:1x4 +IsInverted:true +ValueMin:-10000 +ValueMax:30000 +ChangeAmount:10 +Headers:Enable Low,Disable Low,Enable High,Disable High +############################# +ROMLocationX:0x14D40 +Name:Revlimiter +Unit2:RPM +TableSize:2x1 +ValueMax:10000 +ChangeAmount:50 +############################# +ROMLocationX:0x16154 +Name:Injector Voltage Compensation +Unit1:Volts +Unit2:ms +TableSize:5x1 +MathX:X*0.002 +FormatX:0.00 +ValueMin:-1000 +ValueMax:3000 +Headers:6.00,8.00,12.00,14.00,16.00 +############################# +ROMLocationX:0x177D4 +ROMLocationY:0x1322C +ROMLocationTable:0x1718C +Name:Ignition Timing High Cam +Unit1:RPM/MAP +TableSize:10x20 +ValueMin:-10 +ValueMax:55 +ChangeAmount:0.1 +FormatY:0.0 +FormatTable:0.00 +MathY:X*0.013334 +MathTable:X*0.1 +############################# +ROMLocationX:0x16F98 +ROMLocationY:0x1322C +ROMLocationTable:0x16FD4 +Name:Ignition Timing Low Cam +Unit1:RPM/MAP +TableSize:10x20 +ValueMin:-10 +ValueMax:55 +ChangeAmount:0.1 +FormatY:0.0 +FormatTable:0.00 +MathY:X*0.013334 +MathTable:X*0.1 +############################# +ROMLocationX:0x177D4 +ROMLocationY:0x1322C +ROMLocationTable:0x15F74 +Name:Fuel High Cam +Unit1:RPM/MAP +TableSize:10x20 +ValueMin:0 +ValueMax:500 +FormatY:0.0 +FormatTable:0.00 +MathY:X*0.013334 +MathTable:X*0.1 +############################# +ROMLocationX:0x16F98 +ROMLocationY:0x1322C +ROMLocationTable:0x15DE4 +Name:Fuel Low Cam +Unit1:RPM/MAP +TableSize:10x20 +ValueMin:0 +ValueMax:500 +FormatY:0.0 +FormatTable:0.00 +MathY:X*0.013334 +MathTable:X*0.1 +############################# \ No newline at end of file diff --git a/bin/Debug/FlashToolTest.exe b/bin/Debug/FlashToolTest.exe index f35b852..da3b43c 100644 Binary files a/bin/Debug/FlashToolTest.exe and b/bin/Debug/FlashToolTest.exe differ diff --git a/bin/Debug/FlashToolTest.pdb b/bin/Debug/FlashToolTest.pdb index c638d49..a40d9a2 100644 Binary files a/bin/Debug/FlashToolTest.pdb and b/bin/Debug/FlashToolTest.pdb differ diff --git a/bin/Debug/FlashToolTest.zip b/bin/Debug/FlashToolTest.zip index 8ac83a7..089bd65 100644 Binary files a/bin/Debug/FlashToolTest.zip and b/bin/Debug/FlashToolTest.zip differ