-
Notifications
You must be signed in to change notification settings - Fork 8
/
GForm_PlatformSelect.cs
270 lines (234 loc) · 14.3 KB
/
GForm_PlatformSelect.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Runtime.CompilerServices;
using System.Windows.Forms;
using DarkUI.Controls;
using DarkUI.Forms;
public class GForm_PlatformSelect : DarkForm
{
internal Class_ECUS Class9_0 { get; set; }
public GForm_PlatformSelect()
{
this.InitializeComponent();
method_0();
}
public void GetPlatformAt(int ThisIndex)
{
this.Class9_0 = this.list_0[ThisIndex];
this.DialogResult = System.Windows.Forms.DialogResult.OK;
base.Close();
return;
}
private void method_0()
{
this.method_1();
for (int i = 0; i < this.list_0.Count; i++)
{
DataGridViewRow dataGridViewRow = (DataGridViewRow)this.dataGridView_0.RowTemplate.Clone();
dataGridViewRow.CreateCells(this.dataGridView_0, new object[]
{
this.list_0[i].Processor,
this.list_0[i].RomSize_String,
this.list_0[i].ECU_Byte_String,
this.list_0[i].TransmissionType
});
this.dataGridView_0.Rows.Add(dataGridViewRow);
}
this.dataGridView_0.AutoResizeColumns();
}
private void method_1()
{
//#################################################################################################################
/*if (headers2[0] == 0x0b) AdditionnalCanInfos = " (Shift by wire)"; //->54008-XXX-XXXX files
if (headers2[0] == 0x0e) AdditionnalCanInfos = " (CVT Transmission (maybe?))"; //->
if (headers2[0] == 0x10) AdditionnalCanInfos = " (ECM with Manual Transmission)"; //->37805-XXX-XXXX files
if (headers2[0] == 0x11) AdditionnalCanInfos = " (ECM with Automatics Transmission)"; //->37805-XXX-XXXX files
if (headers2[0] == 0x1e) AdditionnalCanInfos = " (TCM - Transmission Control Module)"; //->28101-XXX-XXXX files
if (headers2[0] == 0x28) AdditionnalCanInfos = " (VSA Module)"; //->57114-XXX-XXXX files
if (headers2[0] == 0x2b) AdditionnalCanInfos = " (Electric Brake Booster Module)"; //->39494-XXX-XXXX files
if (headers2[0] == 0x30) AdditionnalCanInfos = " (Electric Power Sterring Module)"; //->39990-XXX-XXXX files
if (headers2[0] == 0x3a) AdditionnalCanInfos = " (Unknown Module)"; //->39390-XXX-XXXX files
if (headers2[0] == 0x53) AdditionnalCanInfos = " (SRS Module)"; //->77959-XXX-XXXX files
if (headers2[0] == 0x60) AdditionnalCanInfos = " (Odometer Module)"; //->78109-XXX-XXXX files
if (headers2[0] == 0x61) AdditionnalCanInfos = " (HUD Module)"; //->78209-XXX-XXXX files
if (headers2[0] == 0xb0) AdditionnalCanInfos = " (FWD Radar Module)"; //->36802-XXX-XXXX files
if (headers2[0] == 0xb5) AdditionnalCanInfos = " (FWD Camera Module)"; //->36161-XXX-XXXX files
if (headers2[0] == 0xef) AdditionnalCanInfos = " (Gateway Module)"; //->38897-XXX-XXXX files*/
//#################################################################################################################
//this.list_0.Add(new Class_ECUS("512k", "SH7055", 16, "0x10", 0x7FFFF, 1015808, "Manual"));
//this.list_0.Add(new Class_ECUS("512k", "SH7055", 17, "0x11", 0x7FFFF, 1015808, "Automatic"));
//this.list_0.Add(new Class_ECUS("512k", "SH7055", 14, "0x0E", 0x7FFFF, 1015808, "CVT(maybe?)"));
this.list_0.Add(new Class_ECUS("1MB", "SH7058", 16, "0x10", 1048576, 1015808, "Manual"));
this.list_0.Add(new Class_ECUS("1MB", "SH7058", 17, "0x11", 1048576, 1015808, "Automatic"));
this.list_0.Add(new Class_ECUS("1MB", "SH7058", 14, "0x0E", 1048576, 1015808, "CVT(maybe?)"));
//this.list_0.Add(new Class_ECUS("1.5MB", "SH7059", 16, "0x10", 1048576, 1015808, "Manual"));
//this.list_0.Add(new Class_ECUS("1.5MB", "SH7059", 17, "0x11", 1048576, 1015808, "Automatic"));
//this.list_0.Add(new Class_ECUS("1.5MB", "SH7059", 14, "0x0E", 1048576, 1015808, "CVT(maybe?)"));
this.list_0.Add(new Class_ECUS("2MB", "SH72531/MPC5554", 16, "0x10", 2097152, 2031616, "Manual"));
this.list_0.Add(new Class_ECUS("2MB", "SH72531/MPC5554", 17, "0x11", 2097152, 2031616, "Automatic"));
this.list_0.Add(new Class_ECUS("2MB", "SH72531/MPC5554", 14, "0x0E", 2097152, 2031616, "CVT(maybe?)"));
this.list_0.Add(new Class_ECUS("4MB", "MED17.9.3/TC179X", 16, "0x10", 0x400000, 0x270000, "Manual"));
this.list_0.Add(new Class_ECUS("4MB", "MED17.9.3/TC179X", 17, "0x11", 0x400000, 0x270000, "Automatic"));
this.list_0.Add(new Class_ECUS("4MB", "MED17.9.3/TC179X", 14, "0x0E", 0x400000, 0x270000, "CVT(maybe?)"));
}
private void method_2(object sender, EventArgs e)
{
if (this.dataGridView_0.SelectedCells[0].RowIndex != -1)
{
this.Class9_0 = this.list_0[this.dataGridView_0.SelectedCells[0].RowIndex];
this.Class9_0.PlatformIndex = this.dataGridView_0.SelectedCells[0].RowIndex;
this.DialogResult = System.Windows.Forms.DialogResult.OK;
base.Close();
return;
}
MessageBox.Show("You have to select a platform before closing");
}
protected virtual void Dispose(bool disposing)
{
if (disposing && this.icontainer_0 != null)
{
this.icontainer_0.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
this.darkButton_0 = new DarkUI.Controls.DarkButton();
this.dataGridView_0 = new System.Windows.Forms.DataGridView();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.TransmissionType = new System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.dataGridView_0)).BeginInit();
this.SuspendLayout();
//
// darkButton_0
//
this.darkButton_0.Checked = false;
this.darkButton_0.DialogResult = System.Windows.Forms.DialogResult.OK;
this.darkButton_0.Location = new System.Drawing.Point(460, 196);
this.darkButton_0.Name = "darkButton_0";
this.darkButton_0.Size = new System.Drawing.Size(101, 23);
this.darkButton_0.TabIndex = 1;
this.darkButton_0.Text = "Accept";
this.darkButton_0.Click += new System.EventHandler(this.method_2);
//
// dataGridView_0
//
this.dataGridView_0.AllowUserToAddRows = false;
this.dataGridView_0.AllowUserToDeleteRows = false;
this.dataGridView_0.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dataGridView_0.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(63)))), ((int)(((byte)(65)))));
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(63)))), ((int)(((byte)(63)))));
dataGridViewCellStyle4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView_0.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4;
this.dataGridView_0.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView_0.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Column1,
this.Column2,
this.Column3,
this.TransmissionType});
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(63)))), ((int)(((byte)(63)))));
dataGridViewCellStyle5.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dataGridView_0.DefaultCellStyle = dataGridViewCellStyle5;
this.dataGridView_0.EnableHeadersVisualStyles = false;
this.dataGridView_0.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80)))));
this.dataGridView_0.Location = new System.Drawing.Point(8, 8);
this.dataGridView_0.Margin = new System.Windows.Forms.Padding(2);
this.dataGridView_0.Name = "dataGridView_0";
this.dataGridView_0.ReadOnly = true;
dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(63)))), ((int)(((byte)(63)))));
dataGridViewCellStyle6.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView_0.RowHeadersDefaultCellStyle = dataGridViewCellStyle6;
this.dataGridView_0.RowHeadersVisible = false;
this.dataGridView_0.RowHeadersWidth = 80;
this.dataGridView_0.RowTemplate.Height = 28;
this.dataGridView_0.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridView_0.Size = new System.Drawing.Size(436, 211);
this.dataGridView_0.TabIndex = 4;
this.dataGridView_0.DoubleClick += new System.EventHandler(this.method_2);
//
// Column1
//
this.Column1.FillWeight = 67.67797F;
this.Column1.HeaderText = "Processor Type";
this.Column1.MinimumWidth = 35;
this.Column1.Name = "Column1";
this.Column1.ReadOnly = true;
//
// Column2
//
this.Column2.FillWeight = 71.06599F;
this.Column2.HeaderText = "Rom Size";
this.Column2.MinimumWidth = 35;
this.Column2.Name = "Column2";
this.Column2.ReadOnly = true;
//
// Column3
//
this.Column3.FillWeight = 68.42973F;
this.Column3.HeaderText = "ECUID";
this.Column3.MinimumWidth = 35;
this.Column3.Name = "Column3";
this.Column3.ReadOnly = true;
//
// TransmissionType
//
this.TransmissionType.FillWeight = 192.8263F;
this.TransmissionType.HeaderText = "Transmission Type";
this.TransmissionType.MinimumWidth = 35;
this.TransmissionType.Name = "TransmissionType";
this.TransmissionType.ReadOnly = true;
//
// GForm_PlatformSelect
//
this.AcceptButton = this.darkButton_0;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(571, 225);
this.ControlBox = false;
this.Controls.Add(this.dataGridView_0);
this.Controls.Add(this.darkButton_0);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "GForm_PlatformSelect";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.Text = "Select Platform";
((System.ComponentModel.ISupportInitialize)(this.dataGridView_0)).EndInit();
this.ResumeLayout(false);
}
internal List<Class_ECUS> list_0 = new List<Class_ECUS>();
[CompilerGenerated]
private Class_ECUS class9_0;
private IContainer icontainer_0;
private DarkButton darkButton_0;
private DataGridView dataGridView_0;
private DataGridViewTextBoxColumn dataGridViewTextBoxColumn_0;
private DataGridViewTextBoxColumn dataGridViewTextBoxColumn_1;
private DataGridViewTextBoxColumn Column1;
private DataGridViewTextBoxColumn Column2;
private DataGridViewTextBoxColumn Column3;
private DataGridViewTextBoxColumn TransmissionType;
private DataGridViewTextBoxColumn dataGridViewTextBoxColumn_2;
}