Add files via upload

This commit is contained in:
Bouletmarc 2022-11-04 08:58:41 -04:00 committed by GitHub
parent 6daa183977
commit 2151bdb77b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
98 changed files with 94453 additions and 0 deletions

13
BMTune.csproj.user Normal file
View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishUrlHistory>publier\</PublishUrlHistory>
<InstallUrlHistory />
<SupportUrlHistory />
<UpdateUrlHistory />
<BootstrapperUrlHistory />
<ErrorReportUrlHistory />
<FallbackCulture>fr-FR</FallbackCulture>
<VerifyUploadedFiles>false</VerifyUploadedFiles>
</PropertyGroup>
</Project>

59
BMTune.sln Normal file
View File

@ -0,0 +1,59 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28803.352
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BMTune", "BMTune.csproj", "{C8ECFBB1-600A-4433-94ED-E9416D56158E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppCryptor", "AppCryptor\AppCryptor.csproj", "{15E3FE49-6A77-4D5C-927E-CA72304ABFB0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BMFuscator", "BMFuscator\BMFuscator.csproj", "{0FE687CD-6631-428E-A054-8039A20E6F6E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BMTune_Packer", "BMTune_Packer\BMTune_Packer.csproj", "{2BA666B0-971C-4500-AAF4-71F12EB4DD98}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C8ECFBB1-600A-4433-94ED-E9416D56158E}.Debug|Any CPU.ActiveCfg = Debug|x86
{C8ECFBB1-600A-4433-94ED-E9416D56158E}.Debug|x86.ActiveCfg = Debug|x86
{C8ECFBB1-600A-4433-94ED-E9416D56158E}.Debug|x86.Build.0 = Debug|x86
{C8ECFBB1-600A-4433-94ED-E9416D56158E}.Release|Any CPU.ActiveCfg = Release|x86
{C8ECFBB1-600A-4433-94ED-E9416D56158E}.Release|x86.ActiveCfg = Release|x86
{C8ECFBB1-600A-4433-94ED-E9416D56158E}.Release|x86.Build.0 = Release|x86
{15E3FE49-6A77-4D5C-927E-CA72304ABFB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{15E3FE49-6A77-4D5C-927E-CA72304ABFB0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{15E3FE49-6A77-4D5C-927E-CA72304ABFB0}.Debug|x86.ActiveCfg = Debug|Any CPU
{15E3FE49-6A77-4D5C-927E-CA72304ABFB0}.Debug|x86.Build.0 = Debug|Any CPU
{15E3FE49-6A77-4D5C-927E-CA72304ABFB0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{15E3FE49-6A77-4D5C-927E-CA72304ABFB0}.Release|Any CPU.Build.0 = Release|Any CPU
{15E3FE49-6A77-4D5C-927E-CA72304ABFB0}.Release|x86.ActiveCfg = Release|Any CPU
{15E3FE49-6A77-4D5C-927E-CA72304ABFB0}.Release|x86.Build.0 = Release|Any CPU
{0FE687CD-6631-428E-A054-8039A20E6F6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0FE687CD-6631-428E-A054-8039A20E6F6E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0FE687CD-6631-428E-A054-8039A20E6F6E}.Debug|x86.ActiveCfg = Debug|Any CPU
{0FE687CD-6631-428E-A054-8039A20E6F6E}.Debug|x86.Build.0 = Debug|Any CPU
{0FE687CD-6631-428E-A054-8039A20E6F6E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0FE687CD-6631-428E-A054-8039A20E6F6E}.Release|Any CPU.Build.0 = Release|Any CPU
{0FE687CD-6631-428E-A054-8039A20E6F6E}.Release|x86.ActiveCfg = Release|Any CPU
{0FE687CD-6631-428E-A054-8039A20E6F6E}.Release|x86.Build.0 = Release|Any CPU
{2BA666B0-971C-4500-AAF4-71F12EB4DD98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2BA666B0-971C-4500-AAF4-71F12EB4DD98}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2BA666B0-971C-4500-AAF4-71F12EB4DD98}.Debug|x86.ActiveCfg = Debug|Any CPU
{2BA666B0-971C-4500-AAF4-71F12EB4DD98}.Debug|x86.Build.0 = Debug|Any CPU
{2BA666B0-971C-4500-AAF4-71F12EB4DD98}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2BA666B0-971C-4500-AAF4-71F12EB4DD98}.Release|Any CPU.Build.0 = Release|Any CPU
{2BA666B0-971C-4500-AAF4-71F12EB4DD98}.Release|x86.ActiveCfg = Release|Any CPU
{2BA666B0-971C-4500-AAF4-71F12EB4DD98}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {FE0F426B-0CEF-4B00-A2E3-8C6A4A5C2FE3}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,2 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Int64 x:Key="/Default/Environment/SearchAndNavigation/DefaultOccurrencesGroupingIndex/@EntryValue">2</s:Int64></wpf:ResourceDictionary>

BIN
BMTune_Back.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
BMTune_Logo_128x28.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

BIN
BMTune_Logo_150x90.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

2804
Class10_settings.cs Normal file

File diff suppressed because it is too large Load Diff

320
Class11_u.cs Normal file
View File

@ -0,0 +1,320 @@
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Windows.Forms;
internal class Class11_u
{
private bool bool_0;
private bool bool_1;
private bool bool_2;
private Class18 class18_0;
private Class20_u class20_u_0;
private int int_0;
private Stack<Class20_u> class20_u_1;
private Stack<Class20_u> class20_u_2;
private string string_0;
public event Delegate33 delegate33_0;
public event Delegate32 delegate32_0;
internal Class11_u(Class18 class18_1)
{
this.class18_0 = class18_1;
this.class20_u_1 = new Stack<Class20_u>();
this.class20_u_2 = new Stack<Class20_u>();
}
internal void method_0(long long_0, byte byte_0, byte byte_1)
{
if (!this.bool_1)
{
this.int_0++;
}
this.class20_u_0 = new Class20_u();
this.class20_u_0.long_0 = long_0;
this.class20_u_0.byte_0 = byte_0;
this.class20_u_0.byte_1 = byte_1;
if (!this.bool_1)
{
this.class20_u_0.string_0 = "Undefined operation. Contact Dev!";
}
else
{
this.class20_u_0.string_0 = this.string_0;
}
this.class20_u_0.int_0 = this.int_0;
this.class20_u_1.Push(this.class20_u_0);
this.class20_u_2.Clear();
if (this.delegate32_0 != null)
{
this.delegate32_0();
}
}
public bool method_1()
{
return (this.class20_u_1.Count > 0);
}
public void method_10(bool bool_3, string string_1, bool bool_4, bool bool_5)
{
if (bool_5)
{
this.bool_2 = bool_4;
this.bool_1 = false;
this.int_0++;
}
else if (!this.bool_2 || !this.bool_1)
{
if (!bool_3)
{
this.bool_2 = bool_4;
this.bool_1 = false;
this.int_0++;
}
else
{
this.bool_2 = bool_4;
this.bool_1 = bool_3;
this.string_0 = string_1;
}
}
}
public void method_11(string string_1)
{
this.string_0 = string_1;
}
public void method_12()
{
this.class20_u_1.Clear();
this.class20_u_2.Clear();
if (this.delegate32_0 != null)
{
this.delegate32_0();
}
GC.Collect(6);
}
public List<Class20_u> method_13()
{
Class20_u[] class20_u_0 = this.class20_u_1.ToArray();
List<Class20_u> list = new List<Class20_u>();
int num = 0;
int num2 = 0;
for (int i = 0; i < class20_u_0.Length; i++)
{
if (class20_u_0[i] != null)
{
if (num != class20_u_0[i].int_0)
{
num = class20_u_0[i].int_0;
}
if (((i + 1) < class20_u_0.Length) && (num == class20_u_0[i + 1].int_0))
{
class20_u_0[i] = null;
}
}
}
for (int j = 0; j < class20_u_0.Length; j++)
{
if (class20_u_0[j] != null)
{
list.Add(class20_u_0[j]);
num2++;
if (num2 > 3)
{
break;
}
}
}
class20_u_0 = null;
return list;
}
public List<Class20_u> method_14()
{
Class20_u[] class20_u_0 = this.class20_u_2.ToArray();
List<Class20_u> list = new List<Class20_u>();
int num = 0;
int num2 = 0;
for (int i = 0; i < class20_u_0.Length; i++)
{
if (class20_u_0[i] != null)
{
if (num != class20_u_0[i].int_0)
{
num = class20_u_0[i].int_0;
}
if (((i + 1) < class20_u_0.Length) && (num == class20_u_0[i + 1].int_0))
{
class20_u_0[i] = null;
}
}
}
for (int j = 0; j < class20_u_0.Length; j++)
{
if (class20_u_0[j] != null)
{
list.Add(class20_u_0[j]);
num2++;
if (num2 > 3)
{
break;
}
}
}
class20_u_0 = null;
GC.Collect();
return list;
}
public bool method_2()
{
return (this.class20_u_2.Count > 0);
}
public bool method_3()
{
return this.bool_0;
}
public void UndoALL()
{
while (this.class20_u_1.Count > 0)
{
UndoOne();
Application.DoEvents();
}
}
private void UndoOne()
{
try
{
this.bool_0 = true;
this.class20_u_0 = this.class20_u_1.Pop();
this.class18_0.method_149_SetByte(this.class20_u_0.long_0, this.class20_u_0.byte_0);
this.class20_u_2.Push(this.class20_u_0);
while (this.method_6(this.class20_u_0.int_0))
{
this.class20_u_0 = this.class20_u_1.Pop();
this.class18_0.method_149_SetByte(this.class20_u_0.long_0, this.class20_u_0.byte_0);
this.class20_u_2.Push(this.class20_u_0);
}
this.bool_0 = false;
if ((this.class20_u_0.string_0 == "Fuel & Ign Table Settings")
|| (this.class20_u_0.string_0 == "Import Calibration")
|| (this.class20_u_0.string_0 == "Insert Column")
|| (this.class20_u_0.string_0 == "Delete Column")
|| (this.class20_u_0.string_0.Contains("fuel1_hi"))
|| (this.class20_u_0.string_0.Contains("fuel1_lo"))
|| (this.class20_u_0.string_0.Contains("fuel2_hi"))
|| (this.class20_u_0.string_0.Contains("fuel2_lo"))
|| (this.class20_u_0.string_0.Contains("ign1_hi"))
|| (this.class20_u_0.string_0.Contains("ign1_lo"))
|| (this.class20_u_0.string_0.Contains("ign2_hi"))
|| (this.class20_u_0.string_0.Contains("ign2_lo"))
|| (this.class20_u_0.string_0 == "Map Sensor Setting")
|| (this.class20_u_0.string_0 == "Boost Table Setup")
)
{
this.class18_0.method_52();
}
if (this.delegate33_0 != null)
{
this.delegate33_0();
}
if (this.delegate32_0 != null)
{
this.delegate32_0();
}
}
catch { }
}
public void method_4()
{
UndoOne();
}
public void method_5(int int_1)
{
}
public void method_7()
{
//Redo
try
{
this.class20_u_0 = this.class20_u_2.Pop();
this.bool_0 = true;
this.class18_0.method_149_SetByte(this.class20_u_0.long_0, this.class20_u_0.byte_1);
this.class20_u_1.Push(this.class20_u_0);
while (this.method_9(this.class20_u_0.int_0))
{
this.class20_u_0 = this.class20_u_2.Pop();
this.class18_0.method_149_SetByte(this.class20_u_0.long_0, this.class20_u_0.byte_1);
this.class20_u_1.Push(this.class20_u_0);
}
this.bool_0 = false;
if ((this.class20_u_0.string_0 == "Fuel & Ign Table Settings")
|| (this.class20_u_0.string_0 == "Import Calibration")
|| (this.class20_u_0.string_0 == "Insert Column")
|| (this.class20_u_0.string_0 == "Delete Column")
|| (this.class20_u_0.string_0.Contains("fuel1_hi"))
|| (this.class20_u_0.string_0.Contains("fuel1_lo"))
|| (this.class20_u_0.string_0.Contains("fuel2_hi"))
|| (this.class20_u_0.string_0.Contains("fuel2_lo"))
|| (this.class20_u_0.string_0.Contains("ign1_hi"))
|| (this.class20_u_0.string_0.Contains("ign1_lo"))
|| (this.class20_u_0.string_0.Contains("ign2_hi"))
|| (this.class20_u_0.string_0.Contains("ign2_lo"))
|| (this.class20_u_0.string_0 == "Map Sensor Setting")
|| (this.class20_u_0.string_0 == "Boost Table Setup")
)
{
this.class18_0.method_52();
}
if (this.delegate33_0 != null)
{
this.delegate33_0();
}
if (this.delegate32_0 != null)
{
this.delegate32_0();
}
}
catch { }
}
public void method_8(int int_1)
{
}
public bool method_6(int int_1)
{
if (this.class20_u_1.Count <= 0)
{
return false;
}
return (this.class20_u_1.Peek().int_0 == int_1);
}
public bool method_9(int int_1)
{
if (this.class20_u_2.Count <= 0)
{
return false;
}
return (this.class20_u_2.Peek().int_0 == int_1);
}
public delegate void Delegate32();
public delegate void Delegate33();
}

1054
Class12_afrT.cs Normal file

File diff suppressed because it is too large Load Diff

438
Class13_u.cs Normal file
View File

@ -0,0 +1,438 @@
using System;
internal class Class13_u
{
public long long_0;
public long long_1;
public long long_10;
public long long_100;
public long long_101;
public long long_102;
public long long_103;
public long long_104;
public long long_105;
public long long_106;
public long long_11;
public long long_110;
public long long_111;
public long long_112;
public long long_113;
public long long_114;
public long long_115;
public long long_116;
public long long_117;
public long long_118;
public long long_119;
public long long_12;
public long long_120;
public long long_121;
public long long_122;
public long long_123;
public long long_124;
public long long_125;
public long long_126;
public long long_127;
public long long_128;
public long long_129;
public long long_13;
public long long_130;
public long long_131;
public long long_132;
public long long_133;
public long long_135;
public long long_136;
public long long_137;
public long long_138;
public long long_139;
public long long_140;
public long long_141;
public long long_142;
public long long_143;
public long long_144;
public long long_147;
public long long_148;
public long long_149;
public long long_150;
public long long_151;
public long long_152;
public long long_153;
public long long_154;
public long long_155;
public long long_156;
public long long_157;
public long long_158;
public long long_159;
public long long_16;
public long long_160;
public long long_162;
public long long_163;
public long long_17;
public long long_171;
public long long_172;
public long long_173;
public long long_174;
public long long_175;
public long long_176;
public long long_177;
public long long_178;
public long long_179;
public long long_18;
public long long_180;
public long long_181;
public long long_183;
public long long_184;
public long long_185;
public long long_186;
public long long_187;
public long long_188;
public long long_189;
public long long_190;
public long long_191;
public long long_192;
public long long_193;
public long long_195;
public long long_196;
public long long_197;
public long long_198;
public long long_199;
public long long_2;
public long long_20;
public long long_200;
public long long_201;
public long long_202;
public long long_203;
public long long_204;
public long long_205;
public long long_206;
public long long_207;
public long long_208;
public long long_209;
public long long_21;
public long long_210;
public long long_211;
public long long_212;
public long long_213;
public long long_215;
public long long_216;
public long long_217;
public long long_218;
public long long_219;
public long long_22;
public long long_220;
public long long_221;
public long long_223;
public long long_224;
public long long_225;
public long long_227;
public long long_228;
public long long_229;
public long long_23;
public long long_230;
public long long_231;
public long long_232;
public long long_233;
public long long_234;
public long long_235;
public long long_236;
public long long_237;
public long long_239;
public long long_24;
public long long_240;
public long long_241;
public long long_242;
public long long_243;
public long long_244;
public long long_245;
public long long_246;
public long long_247;
public long long_248;
public long long_249;
public long long_25;
public long long_251;
public long long_253;
public long long_254;
public long long_255;
public long long_256;
public long long_257;
public long long_258;
public long long_259;
public long long_26;
public long long_260;
public long long_261;
public long long_262;
public long long_263;
public long long_264;
public long long_265;
public long long_266;
public long long_267;
public long long_268;
public long long_269;
public long long_27;
public long long_270;
public long long_271;
public long long_272;
public long long_273;
public long long_274;
public long long_275;
public long long_276;
public long long_277;
public long long_279;
public long long_280;
public long long_281;
public long long_282;
public long long_283;
public long long_284;
public long long_285;
public long long_286;
public long long_287;
public long long_288;
public long long_289;
public long long_29;
public long long_290;
public long long_291;
public long long_292;
public long long_293;
public long long_294;
public long long_295;
public long long_296;
public long long_297;
public long long_298;
public long long_299;
public long long_30;
public long long_300;
public long long_301;
public long long_302;
public long long_303;
public long long_304;
public long long_305;
public long long_306;
public long long_307;
public long long_308;
public long long_309;
public long long_31;
public long long_310;
public long long_311;
public long long_313;
public long long_314;
public long long_315;
public long long_316;
public long long_317;
public long long_318;
public long long_319;
public long long_32;
public long long_320;
public long long_321;
public long long_322;
public long long_323;
public long long_324;
public long long_325;
public long long_326;
public long long_327;
public long long_328;
public long long_329;
public long long_33;
public long long_330;
public long long_331;
public long long_332;
public long long_333;
public long long_335;
public long long_336;
public long long_337;
public long long_338;
public long long_339;
public long long_34;
public long long_340;
public long long_341;
public long long_342;
public long long_343;
public long long_344;
public long long_345;
public long long_346;
public long long_347;
public long long_348;
public long long_349;
public long long_35;
public long long_350;
public long long_351;
public long long_352;
public long long_353;
public long long_354;
public long long_355;
public long long_357;
public long long_358;
public long long_359;
public long long_36;
public long long_360;
public long long_361;
public long long_362;
public long long_363;
public long long_364;
public long long_365;
public long long_366;
public long long_367;
public long long_368;
public long long_369;
public long long_37;
public long long_370;
public long long_371;
public long long_372;
public long long_373;
public long long_374;
public long long_375;
public long long_376;
public long long_377;
public long long_378;
public long long_379;
public long long_38;
public long long_380;
public long long_381;
public long long_382;
public long long_383;
public long long_384;
public long long_385;
public long long_386;
public long long_390;
public long long_391;
public long long_400;
public long long_401;
public long long_402;
public long long_403;
public long long_404;
public long long_405;
public long long_406;
public long long_407;
public long long_408;
public long long_413;
public long long_414;
public long long_415;
public long long_416;
public long long_420;
public long long_421;
public long long_422;
public long long_423;
public long long_424;
public long long_430;
public long long_431;
public long long_432;
public long long_433;
public long long_434;
//public long long_435;
//public long long_436;
//public long long_437;
public long long_438;
public long long_439;
public long long_440;
public long long_450;
public long long_451;
public long long_452;
public long long_453;
public long long_454;
public long long_460;
public long long_461;
public long long_463;
public long long_464;
public long long_466;
public long long_472;
public long long_473;
public long long_474;
public long long_475;
public long long_480;
public long long_481;
public long long_482;
public long long_483;
public long long_484;
public long long_485;
public long long_490;
public long long_491;
public long long_492;
public long long_493;
public long long_494;
public long long_4Inj;
public long long_4PASS;
public long long_510;
public long long_511;
public long long_512;
public long long_513;
public long long_514;
public long long_520; //ign cut on decel
public long long_521; //enable CPR on ALTC
public long long_522; //CPR fully sync when cranking
public long long_523; //CPR dont fire before sync
public long long_525; //enable MIL on Ignition Cut
public long long_530_vts; //test output
public long long_531_fpump; //test output
public long long_532_a10; //test output
public long long_533_ac; //test output
public long long_534_pcs; //test output
public long long_535_iab; //test output
public long long_536_fanc; //test output
public long long_537_altc; //test output
public long long_39;
public long long_41;
public long long_43;
public long long_44;
public long long_45;
public long long_46;
public long long_47;
public long long_48;
public long long_49;
public long long_50;
public long long_51;
public long long_52;
public long long_53;
public long long_54;
public long long_55;
public long long_56;
public long long_58;
public long long_59;
public long long_6;
public long long_60;
public long long_61;
public long long_62;
public long long_63;
public long long_64;
public long long_65;
public long long_66;
public long long_67;
public long long_68;
public long long_71;
public long long_72;
public long long_75;
public long long_76;
public long long_77;
public long long_78;
public long long_79;
public long long_8;
public long long_80;
public long long_81;
public long long_82;
public long long_83;
public long long_84;
public long long_85;
public long long_88;
public long long_89;
public long long_9;
public long long_90;
public long long_94;
public long long_95;
}

318
Class15.cs Normal file
View File

@ -0,0 +1,318 @@
using Data;
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Net;
using System.Net.Mail;
using System.Text;
using System.Threading;
using System.Reflection;
using System.Security.Cryptography;
using System.Security.Principal;
using System.Management;
using System.Windows.Forms;
internal class Class15
{
private FrmMain frmMain_0;
private BMTuneVersions BMTuneVersions_0 = BMTuneVersions.Free;
internal string string_CurrentID;
private string DPath;
private Class15 Class15_0;
internal string BMIDDD;
//UPDATE SETTING
internal string CurrentBMTuneVersion;
public Class15(ref FrmMain FrmMain_1)
{
Class15_0 = this;
frmMain_0 = FrmMain_1;
string TeasteStr4 = "6E3-FEBF-BAF3-33C4-FBFF";
string TeasteStr6 = "V1.97";
DPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\BMTune\";
BMIDDD = TeasteStr4;
CurrentBMTuneVersion = TeasteStr6;
this.AdminRelauncher();
this.BMTuneVersions_0 = BMTuneVersions.Tuner;
if (!Directory.Exists(DPath)) Directory.CreateDirectory(DPath);
this.method_getversion();
this.GetUserID();
//################
//Check for updates
if (File.Exists(Application.StartupPath + @"\README.md")) File.Delete(Application.StartupPath + @"\README.md");
if (File.Exists(Application.StartupPath + @"\BMTuneUpdate" + ".exe")) File.Delete(Application.StartupPath + @"\BMTuneUpdate" + ".exe");
this.CheckForUpdate(false);
//################
}
private void AdminRelauncher()
{
if (!IsRunAsAdmin())
{
ProcessStartInfo proc = new ProcessStartInfo();
proc.UseShellExecute = true;
proc.WorkingDirectory = Environment.CurrentDirectory;
try
{
proc.FileName = Assembly.GetEntryAssembly().CodeBase;
}
catch
{
proc.FileName = Application.ExecutablePath;
}
proc.Verb = "runas";
try
{
Process.Start(proc);
}
catch { }
Environment.Exit(0);
}
}
private bool IsRunAsAdmin()
{
WindowsIdentity id = WindowsIdentity.GetCurrent();
WindowsPrincipal principal = new WindowsPrincipal(id);
return principal.IsInRole(WindowsBuiltInRole.Administrator);
}
private void GetUserID()
{
this.string_CurrentID = "";
string RSTRING = GSEEET(Path.GetPathRoot(Environment.SystemDirectory).Substring(0, 1));
for (int i = 0; i < RSTRING.Length; i++)
{
this.string_CurrentID += RSTRING[i];
if (i == 2 || i == 6 || i == 10 || i == 14) this.string_CurrentID += "-";
}
}
private string GSEEET(string F323F)
{
if (F323F.EndsWith(":\\")) F323F = F323F.Substring(0, F323F.Length - 2);
string SBSEEB = G233G3(F323F);
string G23G = HH2333S();
return G23G.Substring(13) + G23G.Substring(1, 4) + SBSEEB + G23G.Substring(4, 4);
}
private string G233G3(string DSEGESEG)
{
ManagementObject SDFV = new ManagementObject(@"win32_logicaldisk.deviceid=""" + DSEGESEG + @":""");
SDFV.Get();
string VSVESV = SDFV["VolumeSerialNumber"].ToString();
SDFV.Dispose();
return VSVESV;
}
private string HH2333S()
{
string VESEVE = "";
ManagementClass BANR = new ManagementClass("win32_processor");
ManagementObjectCollection NRDDR = BANR.GetInstances();
foreach (ManagementObject RDMRRD in NRDDR)
{
if (VESEVE == "")
{
VESEVE = RDMRRD.Properties["processorID"].Value.ToString();
break;
}
}
return VESEVE;
}
//####
private void method_getversion()
{
if (File.Exists(Application.StartupPath + @"\VersionV2.txt")) File.Delete(Application.StartupPath + @"\VersionV2.txt");
if (File.Exists(Application.StartupPath + @"\Version.txt"))
{
File.Create(DPath + "Version.txt").Dispose();
File.WriteAllBytes(DPath + "Version.txt", File.ReadAllBytes(Application.StartupPath + @"\Version.txt"));
try
{
File.Delete(Application.StartupPath + @"\Version.txt");
}
catch
{
LogTtheee("Unable to remove Version File at location:" + Environment.NewLine + "" + Application.StartupPath + @"\Version.txt");
}
}
if (File.Exists(Application.StartupPath + @"\VersionBETA.txt")) File.Delete(Application.StartupPath + @"\VersionBETA.txt");
if (File.Exists(DPath + "Version.txt")) CurrentBMTuneVersion = File.ReadAllText(DPath + "Version.txt");
else
{
File.Create(DPath + "Version.txt").Dispose();
File.WriteAllText(DPath + "Version.txt", CurrentBMTuneVersion);
}
}
private void LogTtheee(string string_8)
{
this.frmMain_0.LogThis("Loading - " + string_8);
}
private string DLStringFromURL(string ThisURL)
{
string String_00 = "";
//###########################################################
//Using HttpWebRequest
try
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(ThisURL);
request.Timeout = 6000;
request.ReadWriteTimeout = 6000;
WebResponse wresp = (HttpWebResponse)request.GetResponse();
Stream memoryStream = wresp.GetResponseStream();
StreamReader streamReader = new StreamReader(memoryStream);
String_00 = streamReader.ReadToEnd();
}
catch
{
}
//###########################################################
//###########################################################
//###########################################################
//Using WebClient
/*using (var webpage = new WebClient())
{
//webpage.Headers[HttpRequestHeader.UserAgent] = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0; WOW64) Gecko/20100101 Firefox/25.0 AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.121 Safari/535.2";
webpage.Headers.Add("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0; WOW64) Gecko/20100101 Firefox/25.0 AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.121 Safari/535.2");
//webpage.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)");
try
{
String_00 = webpage.DownloadString(ThisURL);
}
catch (Exception mess)
{
Console.WriteLine("Cant get Text from URL with error:" + mess);
}
webpage.Dispose();
}*/
//if (String_00 != "") Console.WriteLine("Managed to get internet version from:" + Environment.NewLine + ThisURL);
return String_00;
}
public void CheckForUpdate(bool ShowWarning)
{
bool BMTuneUpdated = true;
//XXXX();
try
{
string String_00 = "";
//if (String_00 == "") String_00 = this.frmMain_0.class31_0.GetFTPBMTuneVersion("Version.txt");
if (String_00 == "") String_00 = DLStringFromURL("https://raw.githubusercontent.com/MarcDevs/bmbuild/master/Version.txt");
if (String_00 == "") String_00 = DLStringFromURL("http://www.bmtune.com/build/Version.txt");
if (String_00 != "")
{
double LastVersion = double.Parse(String_00.Substring(1).Replace(".", ""));
if (LastVersion > 1000) LastVersion = LastVersion / 10;
double CurrentVersion = double.Parse(this.CurrentBMTuneVersion.Substring(1).Replace(".", ""));
if (CurrentVersion > 1000) CurrentVersion = CurrentVersion / 10;
if (CurrentVersion < LastVersion) BMTuneUpdated = false;
if (!BMTuneUpdated)
{
DialogResult result = DialogResult.Yes;
result = MessageBox.Show(Form.ActiveForm, "New update available!" + Environment.NewLine + "Version: " + String_00 + Environment.NewLine + "Do you want to update?", "BMTune", MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk);
if (result == DialogResult.Yes) this.UpdateBMTune();
}
//InternetConnected = true;
}
}
catch {
if (ShowWarning) ShowManualUpdate();
}
}
public void ShowManualUpdate()
{
DialogResult result = MessageBox.Show(Form.ActiveForm, "Can't update BMTune" + Environment.NewLine + "Do you want to download BMTune manually?", "BMTune", MessageBoxButtons.YesNo, MessageBoxIcon.Hand);
if (result == DialogResult.Yes) Process.Start("http://www.bmtune.com/");
}
private void UpdateBMTune()
{
frmDownloadUpdate frmDownloadUpdate_0 = new frmDownloadUpdate(ref this.frmMain_0, ref Class15_0);
DialogResult result = frmDownloadUpdate_0.ShowDialog();
if (result == DialogResult.Cancel) ShowManualUpdate();
}
internal BMTuneVersions method_22()
{
return this.BMTuneVersions_0;
}
internal bool method_5(Enum4 enum4_0)
{
return true;
/*switch (enum4_0)
{
case Enum4.const_0:
return (this.BMTuneVersions_0 == BMTuneVersions.datalogger);
case Enum4.const_1:
return (this.BMTuneVersions_0 == BMTuneVersions.Free);
case Enum4.const_2:
return (this.BMTuneVersions_0 == BMTuneVersions.Pro_Demon);
case Enum4.const_3:
return (this.BMTuneVersions_0 == BMTuneVersions.Tuner);
case Enum4.const_11:
return (this.BMTuneVersions_0 == BMTuneVersions.Dev || this.BMTuneVersions_0 == BMTuneVersions.Tuner);
case Enum4.const_12:
return (this.BMTuneVersions_0 == BMTuneVersions.Dev);
}
return false;*/
}
private string That(string Hex)
{
string Left = Hex;
string Returning = "";
while (Left != "")
{
try
{
int This = Int32.Parse(Left.Substring(0, 2), System.Globalization.NumberStyles.AllowHexSpecifier) - 40;
if (This < 0) This = 256 + This;
Returning += Convert.ToChar(This).ToString();
Left = Left.Substring(2);
}
catch { Left = ""; }
}
return Returning;
}
}

52
Class16_u.cs Normal file
View File

@ -0,0 +1,52 @@
using System;
using System.Drawing;
internal class Class16_u
{
private Bitmap bitmap_0;
private Graphics graphics_0;
private int int_0 = 0;
private int int_1 = 0;
public bool method_0()
{
return (this.graphics_0 != null);
}
public bool method_1(Graphics graphics_1, int int_2, int int_3)
{
if (this.bitmap_0 != null)
{
this.bitmap_0.Dispose();
this.bitmap_0 = null;
}
if (this.graphics_0 != null)
{
this.graphics_0.Dispose();
this.graphics_0 = null;
}
if ((int_2 == 0) || (int_3 == 0))
{
return false;
}
this.int_1 = int_2;
this.int_0 = int_3;
this.bitmap_0 = new Bitmap(int_2, int_3);
this.graphics_0 = Graphics.FromImage(this.bitmap_0);
return true;
}
public void method_2(Graphics graphics_1)
{
if (this.bitmap_0 != null)
{
graphics_1.DrawImage(this.bitmap_0, new Rectangle(0, 0, this.int_1, this.int_0), 0, 0, this.int_1, this.int_0, GraphicsUnit.Pixel);
}
}
public Graphics method_3()
{
return this.graphics_0;
}
}

5124
Class17.cs Normal file

File diff suppressed because it is too large Load Diff

7185
Class18.cs Normal file

File diff suppressed because it is too large Load Diff

9
Class1_Version.cs Normal file
View File

@ -0,0 +1,9 @@
using System;
internal class Class1_Version
{
public int Version;
public bool Stable;
public string Infos;
}

16
Class1_u.cs Normal file
View File

@ -0,0 +1,16 @@
using System;
internal class Class1_u
{
public bool IsELD;
public bool IsBaro;
public bool IsInjTest;
public bool IsKnock;
public bool IsO2H;
public bool IsIAB;
public bool bool_7;
public string string_0;
public string string_1;
public string string_2;
}

11
Class20_u.cs Normal file
View File

@ -0,0 +1,11 @@
using System;
internal class Class20_u
{
public byte byte_0;
public byte byte_1;
public int int_0;
public long long_0;
public string string_0;
}

230
Class21_snap.cs Normal file
View File

@ -0,0 +1,230 @@
using Dal;
using Data;
using System;
using System.Collections.ObjectModel;
using System.IO;
using System.Globalization;
using System.Runtime.CompilerServices;
//using System.Runtime.Serialization;
//using System.Runtime.Serialization.Formatters.Binary;
using System.Windows.Forms;
internal class Class21_snap
{
private Class18 class18_0;
private QuickSaveListObjects quickSaveListObjects_0 = new QuickSaveListObjects();
private string string_0;
public event Delegate63 delegate63_0;
internal void method_0(ref Class18 class18_1)
{
this.class18_0 = class18_1;
this.class18_0.delegate58_0 += new Class18.Delegate58(this.method_1);
}
private void method_1()
{
if (this.class18_0.method_30_HasFileLoadedInBMTune())
{
if (!string.IsNullOrEmpty(this.class18_0.method_27()))
{
this.string_0 = this.class18_0.method_27() + @"\snapshots\";
}
this.method_8();
this.quickSaveListObjects_0.QuickSaveItem_0.Clear();
this.method_7();
}
}
public void method_2()
{
if (!this.class18_0.method_47() && !this.class18_0.method_48())
{
this.class18_0.method_155("Save Snapshot");
string str = string.Empty;
frmQuickSaveDesc desc = new frmQuickSaveDesc();
desc.ShowDialog();
if (desc.Tag == null)
{
desc.Dispose();
desc = null;
}
else
{
str = desc.Tag.ToString();
QuickSaveItem QuickSaveItem_1 = new QuickSaveItem {
description = str,
time = DateTime.Now,
filename = "snp" + this.quickSaveListObjects_0.QuickSaveItem_0.Count.ToString() + ".bin"
//filename = "snp" + this.quickSaveListObjects_0.quickSaveList.Count.ToString() + ".bml"
};
//this.class18_0.method_73(this.string_0 + item.filename); //save calibration .bml
try
{
if (!Directory.Exists(Path.GetDirectoryName(this.string_0 + QuickSaveItem_1.filename))) Directory.CreateDirectory(Path.GetDirectoryName(this.string_0 + QuickSaveItem_1.filename));
File.Create(this.string_0 + QuickSaveItem_1.filename).Dispose();
File.WriteAllBytes(this.string_0 + QuickSaveItem_1.filename, this.class18_0.GetAllByte());
}
catch (Exception exception)
{
MessageBox.Show(Form.ActiveForm, exception.Message, "BMTune", MessageBoxButtons.OK, MessageBoxIcon.Hand);
}
this.quickSaveListObjects_0.QuickSaveItem_0.Add(QuickSaveItem_1);
if (this.delegate63_0 != null)
{
this.delegate63_0();
}
}
}
}
public void method_3()
{
this.class18_0.method_155("Clear Snapshots");
this.quickSaveListObjects_0.QuickSaveItem_0.Clear();
FileInfo info = new FileInfo(this.string_0);
if (info.Directory.Exists)
{
foreach (FileInfo info2 in info.Directory.GetFiles())
{
info2.Delete();
}
}
DirectoryInfo info3 = new DirectoryInfo(this.string_0);
if (info3.Exists)
{
info3.Delete();
}
info3 = null;
if (this.delegate63_0 != null)
{
this.delegate63_0();
}
}
public Collection<QuickSaveItem> method_5()
{
return this.quickSaveListObjects_0.QuickSaveItem_0;
}
public void method_6(int int_1)
{
this.class18_0.method_155("Load Snapshot");
this.class18_0.method_75(this.string_0 + this.quickSaveListObjects_0.QuickSaveItem_0[int_1].filename, false, 1);
this.class18_0.method_65();
}
internal void method_7()
{
string fileName = this.string_0 + @"\snplist.pref";
//IFormatter formatter = new BinaryFormatter();
//Stream serializationStream = null;
FileInfo info = new FileInfo(fileName);
if (!info.Exists)
{
this.quickSaveListObjects_0 = new QuickSaveListObjects();
}
else
{
try
{
this.quickSaveListObjects_0 = new QuickSaveListObjects();
string[] AllLines = File.ReadAllLines(fileName);
if (AllLines.Length > 0)
{
for (int i = 0; i < AllLines.Length; i++)
{
if (AllLines[i].Contains("List"))
{
QuickSaveItem QuickSaveItem_0 = new QuickSaveItem();
string[] SplitCMD = AllLines[i].Split(',');
string[] SplitIndexEnc = SplitCMD[0].Split('=');
string[] SplitCmdEnc = SplitCMD[1].Split('=');
string[] SplitCMDDesc = AllLines[i + 1].Split(',');
string[] SplitCmdDescEnc = SplitCMDDesc[1].Split('=');
string[] SplitCMDTime = AllLines[i + 2].Split(',');
string[] SplitCmdTimeEnc = SplitCMDTime[1].Split('=');
if (SplitCmdEnc[0].Contains("filename")) QuickSaveItem_0.filename = SplitCmdEnc[1];
if (SplitCmdDescEnc[0].Contains("description")) QuickSaveItem_0.description = SplitCmdDescEnc[1];
try
{
if (SplitCmdTimeEnc[0].Contains("time")) QuickSaveItem_0.time = DateTime.ParseExact(SplitCmdTimeEnc[1], "dd/MM/yyyy HH:mm:ss", CultureInfo.InvariantCulture);
}
catch { }
this.quickSaveListObjects_0.QuickSaveItem_0.Add(QuickSaveItem_0);
i += 2;
}
}
}
//################
//serializationStream = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read);
//this.quickSaveListObjects_0 = (QuickSaveListObjects) formatter.Deserialize(serializationStream);
}
catch (Exception)
{
this.quickSaveListObjects_0 = new QuickSaveListObjects();
//method_8();
}
/*if (serializationStream != null)
{
serializationStream.Close();
serializationStream.Dispose();
serializationStream = null;
}
formatter = null;*/
info = null;
if (this.delegate63_0 != null) this.delegate63_0();
}
}
public void method_8()
{
string fileName = this.string_0 + @"\snplist.pref";
FileInfo info = new FileInfo(fileName);
if (info.Exists)
{
info.Delete();
}
if (this.quickSaveListObjects_0.QuickSaveItem_0.Count != 0)
{
string SaveStr = "";
for (int i = 0; i < this.quickSaveListObjects_0.QuickSaveItem_0.Count; i++)
{
SaveStr += "List=" + i + ",filename=" + this.quickSaveListObjects_0.QuickSaveItem_0[i].filename + Environment.NewLine;
SaveStr += "List=" + i + ",description=" + this.quickSaveListObjects_0.QuickSaveItem_0[i].description + Environment.NewLine;
SaveStr += "List=" + i + ",time=" + this.quickSaveListObjects_0.QuickSaveItem_0[i].time.ToString("dd/MM/yyyy HH:mm:ss", CultureInfo.InvariantCulture) + Environment.NewLine;
}
StreamWriter writer = new StreamWriter(fileName, false);
writer.Write(SaveStr);
writer.Close();
writer.Dispose();
writer = null;
//####################
/*IFormatter formatter = new BinaryFormatter();
Stream serializationStream = new FileStream(fileName, FileMode.Create, FileAccess.Write, FileShare.None);
formatter.Serialize(serializationStream, this.quickSaveListObjects_0);
serializationStream.Close();
serializationStream.Dispose();
formatter = null;*/
info = null;
this.quickSaveListObjects_0.QuickSaveItem_0.Clear();
if (this.delegate63_0 != null) this.delegate63_0();
}
}
public delegate void Delegate63();
}

205
Class22_startup.cs Normal file
View File

@ -0,0 +1,205 @@
using System;
using System.IO;
using System.IO.Compression;
using System.Windows.Forms;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.Win32;
using System.Security.Cryptography;
using System.Security.Permissions;
using System.Security.Principal;
using System.Management;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
internal static class Class22_startup
{
public static string string_8;
public static string string_15135;
[STAThread]
private static void Main()
{
bool l̴͚͎̙̻͎̟̩͓͕̜̀̉̓̀͛̿ͣ̆̿̊̃ͨ̄̇̔̀ͣ̒ͣu̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭp̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘m̨̫͈̣̦̼̱̦͓͈̲͙̫͈͔̞̟͙̠̲͑͑ͦͦ͛ͧ̓̕͝p̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅf̸̡͈͍̳̯̖͊͊͋̂̚̚ = false;
bool l̴͚͎̙̻͎̟̩͓͕̜̀̉̓̀͛̿ͣ̆̿̊̃ͨ̄̇̔̀ͣ̒ͣu̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠m̨̫͈̣̦̼̱̦͓͈̲͙̫͈͔̞̟͙̠̲͑͑ͦͦ͛ͧ̓̕͝p̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅf̸̡͈͍̳̯̖͊͊͋̂̚̚ = false;
bool l̴͚͎̙̻͎̟̩͓͕̜̀̉̓̀͛̿ͣ̆̿̊̃ͨ̄̇̔̀ͣ̒ͣu̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅf̸̡͈͍̳̯̖͊͊͋̂̚̚ = false;
bool l̴͚͎̙̻͎̟̩͓͕̜̀̉̓̀͛̿ͣ̆̿̊̃ͨ̄̇̔̀ͣ̒ͣu̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅf̸̡͈͍̳̯̖͊͊͋̂̚̚d̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ = false;
bool l̴͚͎̙̻͎̟̩͓͕̜̀̉̓̀͛̿ͣ̆̿̊̃ͨ̄̇̔̀ͣ̒ͣu̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅf̸̡͈͍̳̯̖͊͊͋̂̚̚d̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ = false;
DirectoryInfo info = new DirectoryInfo(Environment.GetEnvironmentVariable("systemroot") + @"\Microsoft.NET\Framework");
if (info.Exists)
{
DirectoryInfo[] directories = info.GetDirectories();
for (int i = 0; i < directories.Length; i++)
{
if (directories[i].Name.Contains("v2.0.5"))
{
l̴͚͎̙̻͎̟̩͓͕̜̀̉̓̀͛̿ͣ̆̿̊̃ͨ̄̇̔̀ͣ̒ͣu̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭp̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘m̨̫͈̣̦̼̱̦͓͈̲͙̫͈͔̞̟͙̠̲͑͑ͦͦ͛ͧ̓̕͝p̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅf̸̡͈͍̳̯̖͊͊͋̂̚̚ = true;
string_8 = string_8 + ".NET Framework Version: 2.0" + Environment.NewLine;
}
if (directories[i].Name.Contains("v3.5"))
{
string_8 = string_8 + ".NET Framework Version: 3.5" + Environment.NewLine;
l̴͚͎̙̻͎̟̩͓͕̜̀̉̓̀͛̿ͣ̆̿̊̃ͨ̄̇̔̀ͣ̒ͣu̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠m̨̫͈̣̦̼̱̦͓͈̲͙̫͈͔̞̟͙̠̲͑͑ͦͦ͛ͧ̓̕͝p̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅf̸̡͈͍̳̯̖͊͊͋̂̚̚ = true;
}
if (directories[i].Name.Contains("v4"))
{
string_8 = string_8 + ".NET Framework Version: 4.0" + Environment.NewLine;
l̴͚͎̙̻͎̟̩͓͕̜̀̉̓̀͛̿ͣ̆̿̊̃ͨ̄̇̔̀ͣ̒ͣu̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅf̸̡͈͍̳̯̖͊͊͋̂̚̚ = true;
}
}
}
using (RegistryKey key = RegistryKey.OpenBaseKey((RegistryHive)RegistryHive.LocalMachine, (RegistryView)RegistryView.Registry32).OpenSubKey(@"SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\"))
{
if ((key != null) && (key.GetValue("Release") != null))
{
string_15135 = smethod_7((int)key.GetValue("Release"));
string_8 = string_8 + ".NET Framework Version: " + string_15135;
l̴͚͎̙̻͎̟̩͓͕̜̀̉̓̀͛̿ͣ̆̿̊̃ͨ̄̇̔̀ͣ̒ͣu̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅf̸̡͈͍̳̯̖͊͊͋̂̚̚d̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ = true;
}
}
if (!l̴͚͎̙̻͎̟̩͓͕̜̀̉̓̀͛̿ͣ̆̿̊̃ͨ̄̇̔̀ͣ̒ͣu̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅf̸̡͈͍̳̯̖͊͊͋̂̚̚d̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ)
{
if (!l̴͚͎̙̻͎̟̩͓͕̜̀̉̓̀͛̿ͣ̆̿̊̃ͨ̄̇̔̀ͣ̒ͣu̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭp̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘m̨̫͈̣̦̼̱̦͓͈̲͙̫͈͔̞̟͙̠̲͑͑ͦͦ͛ͧ̓̕͝p̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅf̸̡͈͍̳̯̖͊͊͋̂̚̚ || !l̴͚͎̙̻͎̟̩͓͕̜̀̉̓̀͛̿ͣ̆̿̊̃ͨ̄̇̔̀ͣ̒ͣu̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠m̨̫͈̣̦̼̱̦͓͈̲͙̫͈͔̞̟͙̠̲͑͑ͦͦ͛ͧ̓̕͝p̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅf̸̡͈͍̳̯̖͊͊͋̂̚̚ || !l̴͚͎̙̻͎̟̩͓͕̜̀̉̓̀͛̿ͣ̆̿̊̃ͨ̄̇̔̀ͣ̒ͣu̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅf̸̡͈͍̳̯̖͊͊͋̂̚̚ || !l̴͚͎̙̻͎̟̩͓͕̜̀̉̓̀͛̿ͣ̆̿̊̃ͨ̄̇̔̀ͣ̒ͣu̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅf̸̡͈͍̳̯̖͊͊͋̂̚̚d̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ)
{
if (!l̴͚͎̙̻͎̟̩͓͕̜̀̉̓̀͛̿ͣ̆̿̊̃ͨ̄̇̔̀ͣ̒ͣu̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭp̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘m̨̫͈̣̦̼̱̦͓͈̲͙̫͈͔̞̟͙̠̲͑͑ͦͦ͛ͧ̓̕͝p̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅf̸̡͈͍̳̯̖͊͊͋̂̚̚) MessageBox.Show(".Net framework not found" + Environment.NewLine + "Please install .Net framework 2.0 and 3.5", "BMTune", MessageBoxButtons.OK, MessageBoxIcon.Hand);
else if (!l̴͚͎̙̻͎̟̩͓͕̜̀̉̓̀͛̿ͣ̆̿̊̃ͨ̄̇̔̀ͣ̒ͣu̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠m̨̫͈̣̦̼̱̦͓͈̲͙̫͈͔̞̟͙̠̲͑͑ͦͦ͛ͧ̓̕͝p̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅf̸̡͈͍̳̯̖͊͊͋̂̚̚) MessageBox.Show(".Net framework not found" + Environment.NewLine + "Please install .Net framework 3.5", "BMTune", MessageBoxButtons.OK, MessageBoxIcon.Hand);
else if (!l̴͚͎̙̻͎̟̩͓͕̜̀̉̓̀͛̿ͣ̆̿̊̃ͨ̄̇̔̀ͣ̒ͣu̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅf̸̡͈͍̳̯̖͊͊͋̂̚̚) MessageBox.Show(".Net framework not found" + Environment.NewLine + "Please install .Net framework 4.0", "BMTune", MessageBoxButtons.OK, MessageBoxIcon.Hand);
else if (!l̴͚͎̙̻͎̟̩͓͕̜̀̉̓̀͛̿ͣ̆̿̊̃ͨ̄̇̔̀ͣ̒ͣu̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅf̸̡͈͍̳̯̖͊͊͋̂̚̚d̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ) MessageBox.Show(".Net framework not found" + Environment.NewLine + "Please install .Net framework 4.5", "BMTune", MessageBoxButtons.OK, MessageBoxIcon.Hand);
Environment.Exit(0);
}
else
{
//######################################################
//Install DLL
Class34_Zip d̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜ = new Class34_Zip();
d̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜.ExtractZip();
string j̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡ = "mtssdk.ocx";
string m̨̫͈̣̦̼̱̦͓͈̲͙̫͈͔̞̟͙̠̲͑͑ͦͦ͛ͧ̓̕͝p̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅ = "DLL";
string b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ = Application.StartupPath + @"\" + m̨̫͈̣̦̼̱̦͓͈̲͙̫͈͔̞̟͙̠̲͑͑ͦͦ͛ͧ̓̕͝p̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅ + @"\" + j̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡;
string u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ = Application.StartupPath + @"\" + j̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡;
if (!File.Exists(u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ))
{
d̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜.UnZipFile(Application.StartupPath, m̨̫͈̣̦̼̱̦͓͈̲͙̫͈͔̞̟͙̠̲͑͑ͦͦ͛ͧ̓̕͝p̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅ);
File.Create(u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ).Dispose();
File.WriteAllBytes(u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ, File.ReadAllBytes(b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ));
File.Delete(b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ);
}
//##############
j̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡ = "Interop.MTSSDKLib.dll";
b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ = Application.StartupPath + @"\" + m̨̫͈̣̦̼̱̦͓͈̲͙̫͈͔̞̟͙̠̲͑͑ͦͦ͛ͧ̓̕͝p̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅ + @"\" + j̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡;
u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ = Application.StartupPath + @"\" + j̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡;
if (!File.Exists(u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ))
{
d̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜.UnZipFile(Application.StartupPath, m̨̫͈̣̦̼̱̦͓͈̲͙̫͈͔̞̟͙̠̲͑͑ͦͦ͛ͧ̓̕͝p̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅ);
File.Create(u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ).Dispose();
File.WriteAllBytes(u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ, File.ReadAllBytes(b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ));
File.Delete(b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ);
}
//##############
j̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡ = "mts.dll";
b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ = Application.StartupPath + @"\" + m̨̫͈̣̦̼̱̦͓͈̲͙̫͈͔̞̟͙̠̲͑͑ͦͦ͛ͧ̓̕͝p̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅ + @"\" + j̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡;
u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ = Application.StartupPath + @"\" + j̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡;
if (!File.Exists(u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ))
{
d̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜.UnZipFile(Application.StartupPath, m̨̫͈̣̦̼̱̦͓͈̲͙̫͈͔̞̟͙̠̲͑͑ͦͦ͛ͧ̓̕͝p̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅ);
File.Create(u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ).Dispose();
File.WriteAllBytes(u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ, File.ReadAllBytes(b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ));
File.Delete(b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ);
}
//##############
j̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡ = "System.IO.Compression.dll";
b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ = Application.StartupPath + @"\" + m̨̫͈̣̦̼̱̦͓͈̲͙̫͈͔̞̟͙̠̲͑͑ͦͦ͛ͧ̓̕͝p̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅ + @"\" + j̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡;
u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ = Application.StartupPath + @"\" + j̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡;
if (!File.Exists(u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ))
{
d̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜.UnZipFile(Application.StartupPath, m̨̫͈̣̦̼̱̦͓͈̲͙̫͈͔̞̟͙̠̲͑͑ͦͦ͛ͧ̓̕͝p̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅ);
File.Create(u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ).Dispose();
File.WriteAllBytes(u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ, File.ReadAllBytes(b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ));
File.Delete(b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ);
}
//##############
j̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡ = "System.IO.Compression.FileSystem.dll";
b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ = Application.StartupPath + @"\" + m̨̫͈̣̦̼̱̦͓͈̲͙̫͈͔̞̟͙̠̲͑͑ͦͦ͛ͧ̓̕͝p̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅ + @"\" + j̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡;
u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ = Application.StartupPath + @"\" + j̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡;
if (!File.Exists(u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ))
{
d̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜.UnZipFile(Application.StartupPath, m̨̫͈̣̦̼̱̦͓͈̲͙̫͈͔̞̟͙̠̲͑͑ͦͦ͛ͧ̓̕͝p̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅ);
File.Create(u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ).Dispose();
File.WriteAllBytes(u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ, File.ReadAllBytes(b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ));
File.Delete(b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ);
}
//##############
/*j̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡ = "J2534-Sharp.dll";
b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ = Application.StartupPath + @"\" + m̨̫͈̣̦̼̱̦͓͈̲͙̫͈͔̞̟͙̠̲͑͑ͦͦ͛ͧ̓̕͝p̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅ + @"\" + j̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡;
u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ = Application.StartupPath + @"\" + j̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡;
if (!File.Exists(u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ))
{
d̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜.UnZipFile(Application.StartupPath, m̨̫͈̣̦̼̱̦͓͈̲͙̫͈͔̞̟͙̠̲͑͑ͦͦ͛ͧ̓̕͝p̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅ);
File.Create(u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ).Dispose();
File.WriteAllBytes(u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ, File.ReadAllBytes(b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ));
File.Delete(b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ);
}*/
//##############
j̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡ = "Interop.IWshRuntimeLibrary.dll";
b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ = Application.StartupPath + @"\" + m̨̫͈̣̦̼̱̦͓͈̲͙̫͈͔̞̟͙̠̲͑͑ͦͦ͛ͧ̓̕͝p̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅ + @"\" + j̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡;
u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ = Application.StartupPath + @"\" + j̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡;
if (!File.Exists(u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ))
{
d̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜.UnZipFile(Application.StartupPath, m̨̫͈̣̦̼̱̦͓͈̲͙̫͈͔̞̟͙̠̲͑͑ͦͦ͛ͧ̓̕͝p̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅ);
File.Create(u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ).Dispose();
File.WriteAllBytes(u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ, File.ReadAllBytes(b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ));
File.Delete(b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ);
}
//##############
j̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡ = "Interop.Shell32.dll";
b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ = Application.StartupPath + @"\" + m̨̫͈̣̦̼̱̦͓͈̲͙̫͈͔̞̟͙̠̲͑͑ͦͦ͛ͧ̓̕͝p̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅ + @"\" + j̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡;
u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ = Application.StartupPath + @"\" + j̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡;
if (!File.Exists(u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ))
{
d̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜.UnZipFile(Application.StartupPath, m̨̫͈̣̦̼̱̦͓͈̲͙̫͈͔̞̟͙̠̲͑͑ͦͦ͛ͧ̓̕͝p̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅ);
File.Create(u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ).Dispose();
File.WriteAllBytes(u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ, File.ReadAllBytes(b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ));
File.Delete(b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ);
}
//##############
j̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡ = "NCalc.dll";
b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ = Application.StartupPath + @"\" + m̨̫͈̣̦̼̱̦͓͈̲͙̫͈͔̞̟͙̠̲͑͑ͦͦ͛ͧ̓̕͝p̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅ + @"\" + j̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡;
u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ = Application.StartupPath + @"\" + j̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡;
if (!File.Exists(u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ))
{
d̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜.UnZipFile(Application.StartupPath, m̨̫͈̣̦̼̱̦͓͈̲͙̫͈͔̞̟͙̠̲͑͑ͦͦ͛ͧ̓̕͝p̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅ);
File.Create(u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ).Dispose();
File.WriteAllBytes(u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ, File.ReadAllBytes(b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ));
File.Delete(b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭd̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ);
}
//######################################################
Application.EnableVisualStyles();
Application.Run(new FrmMain());
}
}
}
public static string smethod_7(int int_0)
{
return ((int_0 < 0x80ea8) ? ((int_0 < 0x70bf0) ? ((int_0 < 0x709fc) ? ((int_0 < 0x707fe) ? ((int_0 < 0x60632) ? ((int_0 < 0x6040e) ? ((int_0 < 0x6004f) ? ((int_0 < 0x5cbf5) ? ((int_0 < 0x5c733) ? ((int_0 < 0x5c615) ? "No 4.5 or later version detected" : "4.5") : "4.5.1") : "4.5.2") : "4.6") : "4.6.1") : "4.6.2") : "4.7") : "4.7.1") : "4.7.2") : "4.8 or later");
}
}

9
Class24_u.cs Normal file
View File

@ -0,0 +1,9 @@
using System;
internal class Class24_u
{
public double[] double_0;
public double[] double_1;
public string string_0 = "";
}

3697
Class25.cs Normal file

File diff suppressed because it is too large Load Diff

41
Class27_EmuProgress.cs Normal file
View File

@ -0,0 +1,41 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
internal class Class27_EmuProgress
{
private BackgroundWorker backgroundWorker_0 = new BackgroundWorker();
private Class25 class25_0;
private FrmMain frmMain_0;
private int int_0;
internal Class27_EmuProgress()
{
this.backgroundWorker_0.WorkerReportsProgress = false;
this.backgroundWorker_0.WorkerSupportsCancellation = false;
this.backgroundWorker_0.DoWork += new DoWorkEventHandler(this.backgroundWorker_0_DoWork);
}
private void backgroundWorker_0_DoWork(object sender, DoWorkEventArgs e)
{
this.frmMain_0.stutasEmulatorProgress.Value = this.int_0;
}
internal void method_0(ref Class25 class25_1, ref FrmMain frmMain_1)
{
this.class25_0 = class25_1;
this.frmMain_0 = frmMain_1;
this.class25_0.delegate66_0 += new Class25.Delegate66(this.method_1);
}
private void method_1(int int_1)
{
this.int_0 = int_1;
if (!this.backgroundWorker_0.IsBusy)
{
this.backgroundWorker_0.RunWorkerAsync();
}
}
}

214
Class28_Shortcuts.cs Normal file
View File

@ -0,0 +1,214 @@
using System;
using System.ComponentModel;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
internal class Class28_Shortcuts
{
public List<string> KeysList = new List<string>();
public List<byte> KeysListByte = new List<byte>();
internal Class28_Shortcuts()
{
PopulateKeyCodes();
}
private void PopulateKeyCodes() {
KeysList.Add("NO KEY"); KeysListByte.Add(0);
KeysList.Add("LEFT MOUSE CLIC"); KeysListByte.Add(1);
KeysList.Add("RGIHT MOUSE CLIC"); KeysListByte.Add(2);
KeysList.Add("CANCEL"); KeysListByte.Add(3);
KeysList.Add("MIDLE MOUSE CLIC"); KeysListByte.Add(4);
KeysList.Add("FIRST X"); KeysListByte.Add(5);
KeysList.Add("SECOND X"); KeysListByte.Add(6);
KeysList.Add("UNDEFINED"); KeysListByte.Add(7);
KeysList.Add("BACKSPACE"); KeysListByte.Add(8);
KeysList.Add("TAB"); KeysListByte.Add(9);
KeysList.Add("LINEFEED"); KeysListByte.Add(10);
KeysList.Add("CLEAR"); KeysListByte.Add(12);
KeysList.Add("RETURN"); KeysListByte.Add(13);
KeysList.Add("SHIFT"); KeysListByte.Add(16);
KeysList.Add("CTRL"); KeysListByte.Add(17);
KeysList.Add("ALT"); KeysListByte.Add(18);
KeysList.Add("PAUSE"); KeysListByte.Add(19);
KeysList.Add("CAPSLOCK"); KeysListByte.Add(20);
KeysList.Add("IME_KANA"); KeysListByte.Add(21);
KeysList.Add("IME_JUNJA"); KeysListByte.Add(23);
KeysList.Add("IME_FINAL"); KeysListByte.Add(24);
KeysList.Add("IME_HANJA"); KeysListByte.Add(25);
KeysList.Add("ESC"); KeysListByte.Add(27);
KeysList.Add("IME_CONV"); KeysListByte.Add(28);
KeysList.Add("IME_NONC"); KeysListByte.Add(29);
KeysList.Add("IME_ACPT"); KeysListByte.Add(30);
KeysList.Add("IME_MODE"); KeysListByte.Add(31);
KeysList.Add("SPACE"); KeysListByte.Add(32);
KeysList.Add("PAGE UP"); KeysListByte.Add(33);
KeysList.Add("PAGE DOWN"); KeysListByte.Add(34);
KeysList.Add("END"); KeysListByte.Add(35);
KeysList.Add("HOME"); KeysListByte.Add(36);
KeysList.Add("LEFT"); KeysListByte.Add(37);
KeysList.Add("UP"); KeysListByte.Add(38);
KeysList.Add("RIGHT"); KeysListByte.Add(39);
KeysList.Add("DOWN"); KeysListByte.Add(40);
KeysList.Add("SELECT"); KeysListByte.Add(41);
KeysList.Add("PRINT"); KeysListByte.Add(42);
KeysList.Add("EXECUTE"); KeysListByte.Add(43);
KeysList.Add("PRINT SCREEN"); KeysListByte.Add(44);
KeysList.Add("INSERT"); KeysListByte.Add(45);
KeysList.Add("DELETE"); KeysListByte.Add(46);
KeysList.Add("HELP"); KeysListByte.Add(47);
KeysList.Add(");"); KeysListByte.Add(48);
KeysList.Add("0"); KeysListByte.Add(48);
KeysList.Add("!"); KeysListByte.Add(49);
KeysList.Add("1"); KeysListByte.Add(49);
KeysList.Add("@"); KeysListByte.Add(50);
KeysList.Add("2"); KeysListByte.Add(50);
KeysList.Add("#"); KeysListByte.Add(51);
KeysList.Add("3"); KeysListByte.Add(51);
KeysList.Add("$"); KeysListByte.Add(52);
KeysList.Add("4"); KeysListByte.Add(52);
KeysList.Add("%"); KeysListByte.Add(53);
KeysList.Add("5"); KeysListByte.Add(53);
KeysList.Add("^"); KeysListByte.Add(54);
KeysList.Add("6"); KeysListByte.Add(54);
KeysList.Add("&"); KeysListByte.Add(55);
KeysList.Add("7"); KeysListByte.Add(55);
KeysList.Add("*"); KeysListByte.Add(56);
KeysList.Add("8"); KeysListByte.Add(56);
KeysList.Add("("); KeysListByte.Add(57);
KeysList.Add("9"); KeysListByte.Add(57);
KeysList.Add("A"); KeysListByte.Add(65);
KeysList.Add("B"); KeysListByte.Add(66);
KeysList.Add("C"); KeysListByte.Add(67);
KeysList.Add("D"); KeysListByte.Add(68);
KeysList.Add("E"); KeysListByte.Add(69);
KeysList.Add("F"); KeysListByte.Add(70);
KeysList.Add("G"); KeysListByte.Add(71);
KeysList.Add("H"); KeysListByte.Add(72);
KeysList.Add("I"); KeysListByte.Add(73);
KeysList.Add("J"); KeysListByte.Add(74);
KeysList.Add("K"); KeysListByte.Add(75);
KeysList.Add("L"); KeysListByte.Add(76);
KeysList.Add("M"); KeysListByte.Add(77);
KeysList.Add("N"); KeysListByte.Add(78);
KeysList.Add("O"); KeysListByte.Add(79);
KeysList.Add("P"); KeysListByte.Add(80);
KeysList.Add("Q"); KeysListByte.Add(81);
KeysList.Add("R"); KeysListByte.Add(82);
KeysList.Add("S"); KeysListByte.Add(83);
KeysList.Add("T"); KeysListByte.Add(84);
KeysList.Add("U"); KeysListByte.Add(85);
KeysList.Add("V"); KeysListByte.Add(86);
KeysList.Add("W"); KeysListByte.Add(87);
KeysList.Add("X"); KeysListByte.Add(88);
KeysList.Add("Y"); KeysListByte.Add(89);
KeysList.Add("Z"); KeysListByte.Add(90);
KeysList.Add("LEFT WINDOWS KEY"); KeysListByte.Add(91);
KeysList.Add("RIGHT WINDOWS KEY"); KeysListByte.Add(92);
KeysList.Add("CONTEXT"); KeysListByte.Add(93);
KeysList.Add("RESERVED"); KeysListByte.Add(94);
KeysList.Add("SLEEP"); KeysListByte.Add(95);
KeysList.Add("*"); KeysListByte.Add(106);
KeysList.Add("+"); KeysListByte.Add(107);
KeysList.Add("SEPARATOR"); KeysListByte.Add(108);
KeysList.Add("-"); KeysListByte.Add(109);
KeysList.Add("DEL"); KeysListByte.Add(110);
KeysList.Add("/"); KeysListByte.Add(111);
KeysList.Add("F1"); KeysListByte.Add(112);
KeysList.Add("F2"); KeysListByte.Add(113);
KeysList.Add("F3"); KeysListByte.Add(114);
KeysList.Add("F4"); KeysListByte.Add(115);
KeysList.Add("F5"); KeysListByte.Add(116);
KeysList.Add("F6"); KeysListByte.Add(117);
KeysList.Add("F7"); KeysListByte.Add(118);
KeysList.Add("F8"); KeysListByte.Add(119);
KeysList.Add("F9"); KeysListByte.Add(120);
KeysList.Add("F10"); KeysListByte.Add(121);
KeysList.Add("F11"); KeysListByte.Add(122);
KeysList.Add("F12"); KeysListByte.Add(123);
KeysList.Add("F13"); KeysListByte.Add(124);
KeysList.Add("F14"); KeysListByte.Add(125);
KeysList.Add("F15"); KeysListByte.Add(126);
KeysList.Add("F16"); KeysListByte.Add(127);
KeysList.Add("F17"); KeysListByte.Add(128);
KeysList.Add("F18"); KeysListByte.Add(129);
KeysList.Add("F19"); KeysListByte.Add(130);
KeysList.Add("F20"); KeysListByte.Add(131);
KeysList.Add("F21"); KeysListByte.Add(132);
KeysList.Add("F22"); KeysListByte.Add(133);
KeysList.Add("F23"); KeysListByte.Add(134);
KeysList.Add("F24"); KeysListByte.Add(135);
KeysList.Add("UNASSIGNED"); KeysListByte.Add(136);
KeysList.Add("NUMPAD LOCK"); KeysListByte.Add(144);
KeysList.Add("SCROLL LOCK"); KeysListByte.Add(145);
KeysList.Add("OEM SPECIFIC"); KeysListByte.Add(146);
KeysList.Add("LEFT SHIFT"); KeysListByte.Add(160);
KeysList.Add("RIGHT SHIFT"); KeysListByte.Add(161);
KeysList.Add("LEFT CTRL"); KeysListByte.Add(162);
KeysList.Add("RIGHT CTRL"); KeysListByte.Add(163);
KeysList.Add("LEFT ALT"); KeysListByte.Add(164);
KeysList.Add("RIGHT ALT"); KeysListByte.Add(165);
KeysList.Add("BACK"); KeysListByte.Add(166);
KeysList.Add("FORWARD"); KeysListByte.Add(167);
KeysList.Add("REFRESH"); KeysListByte.Add(168);
KeysList.Add("STOP"); KeysListByte.Add(169);
KeysList.Add("SEARCH"); KeysListByte.Add(170);
KeysList.Add("FAVORITES"); KeysListByte.Add(171);
KeysList.Add("MUTE"); KeysListByte.Add(173);
KeysList.Add("VOLUME DOWN"); KeysListByte.Add(174);
KeysList.Add("VOLUME UP"); KeysListByte.Add(175);
KeysList.Add("NEXT"); KeysListByte.Add(176);
KeysList.Add("PREV"); KeysListByte.Add(177);
KeysList.Add("PLAY"); KeysListByte.Add(179);
KeysList.Add("EMAIL"); KeysListByte.Add(180);
KeysList.Add("MEDIA"); KeysListByte.Add(181);
KeysList.Add("START1"); KeysListByte.Add(182);
KeysList.Add("START2"); KeysListByte.Add(183);
KeysList.Add(":"); KeysListByte.Add(186);
KeysList.Add(";"); KeysListByte.Add(186);
KeysList.Add("+"); KeysListByte.Add(187);
KeysList.Add("="); KeysListByte.Add(187);
KeysList.Add("<"); KeysListByte.Add(188);
KeysList.Add(","); KeysListByte.Add(188);
KeysList.Add("_"); KeysListByte.Add(189);
KeysList.Add("-"); KeysListByte.Add(189);
KeysList.Add(">"); KeysListByte.Add(190);
KeysList.Add("."); KeysListByte.Add(190);
KeysList.Add("?"); KeysListByte.Add(191);
KeysList.Add("/"); KeysListByte.Add(191);
KeysList.Add("~"); KeysListByte.Add(192);
KeysList.Add("`"); KeysListByte.Add(192);
KeysList.Add("{"); KeysListByte.Add(219);
KeysList.Add("["); KeysListByte.Add(219);
KeysList.Add("|"); KeysListByte.Add(220);
KeysList.Add(@"\"); KeysListByte.Add(220);
KeysList.Add("}"); KeysListByte.Add(221);
KeysList.Add("]"); KeysListByte.Add(221);
KeysList.Add("'"); KeysListByte.Add(222);
KeysList.Add("MISC"); KeysListByte.Add(223);
KeysList.Add("OEM"); KeysListByte.Add(225);
KeysList.Add("OEM ANG"); KeysListByte.Add(226);
KeysList.Add("PROCESS"); KeysListByte.Add(229);
KeysList.Add("UNICODE"); KeysListByte.Add(231);
KeysList.Add("ATTN"); KeysListByte.Add(246);
KeysList.Add("CRSEL"); KeysListByte.Add(247);
KeysList.Add("EXSEL"); KeysListByte.Add(248);
KeysList.Add("ERASE EOF"); KeysListByte.Add(249);
KeysList.Add("ZOOM"); KeysListByte.Add(251);
KeysList.Add("PA1"); KeysListByte.Add(253);
}
public Keys GetKeyCode(string ShortcutKey) {
if (ShortcutKey == " ") return (Keys) 32;
else
{
int Index = -1;
for (int i = 0; i < KeysList.Count; i++) if (KeysList[i] == ShortcutKey) { Index = i; i = KeysList.Count; }
if (Index != -1) return (Keys) KeysListByte[Index];
else return (Keys) 0;
}
}
}

191
Class29_Dyno.cs Normal file
View File

@ -0,0 +1,191 @@
using System;
using System.Drawing;
using System.Text.RegularExpressions;
using System.IO.Ports;
using System.Threading;
using System.Windows.Forms;
internal class Class29_Dyno
{
public SerialPort ComPort = new SerialPort();
public SerialPort ComPortBC = new SerialPort();
public readonly byte[] DynoPoll = new byte[] { 0x45 };
public readonly byte[] DynoRPMUP = new byte[] { 70 };
public readonly byte[] DynoRPMDOWN = new byte[] { 0x47 };
public readonly byte[] DynoBRAKE = new byte[] { 0x48 };
public long HP = 0L;
public long NM = 0L;
public long AUX1 = 0L;
public long AUX2 = 0L;
public long AUX3 = 0L;
public long THC = 0L;
public long WS = 0L;
public long RPM = 0L;
public string[] _Data;
public string COMPORTDyno;
public static string[] Data;
Class18 class18_0;
public Class29_Dyno(ref Class18 class18_1)
{
class18_0 = class18_1;
COMPORTDyno = class18_0.class10_settings_0.Dyno_COMPort;
ComPort.DataReceived += new SerialDataReceivedEventHandler(DLCOM_DataReceived);
}
public void Connect()
{
if (this.class18_0.class10_settings_0.Dyno_COMPort == null)
{
MessageBox.Show(Form.ActiveForm, "You Need to select a comport for the Dyno in Dyno settings!", "BMTune");
}
else
{
ComPort.ReadBufferSize = 0x34;
ComPort.BaudRate = 0x9600;
ComPort.PortName = Convert.ToString(this.class18_0.class10_settings_0.Dyno_COMPort);
this.WorkThreadFunction();
}
}
public void Disconnect()
{
try
{
ComPort.Close();
}
catch
{
}
}
public void DLCOM_DataReceived(object sender, SerialDataReceivedEventArgs e)
{
if (ComPort.IsOpen)
{
try
{
ProcessPacket(ComPort.ReadLine());
ComPort.Write(DynoPoll, 0, DynoPoll.Length);
}
catch
{
HP = 0L;
NM = 0L;
AUX1 = 0L;
AUX2 = 0L;
AUX3 = 0L;
THC = 0L;
WS = 0L;
}
}
}
public void ProcessPacket(string packet)
{
char[] separator = new char[] { ':' };
Data = packet.Replace("PUT-", "").Split(separator);
if (Data.Length == 8)
{
try
{
HP = (long)Math.Round((double)float.Parse(Data[0]), 4);
}
catch
{
HP = 0L;
}
try
{
NM = (long)float.Parse(Data[1]);
}
catch
{
NM = 0L;
}
try
{
AUX1 = (long)float.Parse(Data[2]);
}
catch
{
AUX1 = 0L;
}
try
{
AUX2 = (long)float.Parse(Data[3]);
}
catch
{
AUX2 = 0L;
}
try
{
AUX3 = (long)float.Parse(Data[4]);
}
catch
{
AUX3 = 0L;
}
try
{
THC = (long)float.Parse(Data[5]);
}
catch
{
THC = 0L;
}
try
{
WS = (long)(((float.Parse(Data[6]) / 100f) / ((float)RPM)) * 100f);
}
catch
{
WS = 0L;
}
try
{
frmDynoControl.BrakeA = Data[7];
}
catch
{
frmDynoControl.BrakeA = "0000";
}
}
}
/*public string SL(string lan)
{
string str;
return (!Class22_startup.sl.TryGetValue(lan, out str) ? "No Lang File" : Regex.Replace(str, "<NL>", Environment.NewLine));
}*/
public void WorkThreadFunction()
{
try
{
ComPort.BaudRate = 0x9600;
ComPort.Open();
while (ComPort.IsOpen)
{
ComPort.Write(DynoPoll, 0, DynoPoll.Length);
Thread.Sleep(100);
}
}
catch
{
frmDynoSetup.Dyno_Connected = false;
this.class18_0.class17_0.frmMain_0.connectToolStripMenuItem.ForeColor = Color.FromArgb(0xd7, 120, 120);
this.class18_0.class17_0.frmMain_0.connectToolStripMenuItem.Text = "Connect";
this.class18_0.class17_0.frmMain_0.dynoToolStripMenuItem.ForeColor = Color.FromArgb(0xd7, 120, 120);
this.class18_0.class17_0.frmMain_0.controlToolStripMenuItem.Enabled = false;
MessageBox.Show(Form.ActiveForm, "Failed to connect to dyno", "BMTune");
this.class18_0.class17_0.frmMain_0.statusDyno.Text = "Dyno:Disconnected";
this.class18_0.class17_0.frmMain_0.statusDyno.ForeColor = Color.FromArgb(0xd7, 120, 120);
}
}
}

783
Class2_serialWB.cs Normal file
View File

@ -0,0 +1,783 @@
using Data;
using MTSSDKLib;
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.IO.Ports;
using System.Text;
internal class Class2_serialWB
{
private BackgroundWorker backgroundWorker_0;
private bool bool_0;
private bool bool_1;
private bool bool_2;
private byte[] byte_0;
private Class18 class18_0;
private FrmMain frmMain_0;
private double double_0;
public static double[] double_1 = new double[] {
2.33, 2.26, 2.2, 2.13, 2.07, 2.01, 1.95, 1.9, 1.85, 1.8, 1.75, 1.7, 1.66, 1.62, 1.58, 1.54,
1.5, 1.47, 1.44, 1.4, 1.37, 1.34, 1.31, 1.29, 1.26, 1.24, 1.21, 1.19, 1.17, 1.15, 1.12, 1.1,
1.08, 1.06, 1.05, 1.03, 1.0, 1.0, 0.99, 0.98, 0.97, 0.96, 0.95, 0.94, 0.93, 0.92, 0.92, 0.91,
0.9, 0.89, 0.89, 0.88, 0.87, 0.86, 0.86, 0.85, 0.84, 0.84, 0.83, 0.83, 0.82, 0.81, 0.81, 0.8,
0.8, 0.79, 0.79, 0.78, 0.78, 0.77, 0.77, 0.76, 0.75, 0.75, 0.74, 0.74, 0.73, 0.73, 0.72, 0.72,
0.71, 0.71, 0.7, 0.7, 0.69
};
private int int_2;
private MTS mts_0;
private SerialPort serialPort_0;
public string[] string_0;
private bool Loading = true;
internal Class2_serialWB(ref Class18 rm, ref FrmMain rm2)
{
this.class18_0 = rm;
this.frmMain_0 = rm2;
this.backgroundWorker_0 = new BackgroundWorker();
this.backgroundWorker_0.DoWork += new DoWorkEventHandler(this.backgroundWorker_0_DoWork);
this.backgroundWorker_0.WorkerSupportsCancellation = true;
//this.LogThis("Background worker created");
this.method_16();
//this.LogThis("innovate Init + GetPorts");
}
private void backgroundWorker_0_DoWork(object sender, DoWorkEventArgs e)
{
if (this.class18_0.class10_settings_0.wideband_Serial_0 == Wideband_Serial.TechEdge)
{
//this.LogThis("TE 2.0 frame set to port");
this.serialPort_0.NewLine = "" + Environment.NewLine + "";
this.serialPort_0.WriteLine("s03e1");
this.serialPort_0.DiscardInBuffer();
}
StringBuilder builder = new StringBuilder();
int num = 0;
int num2 = 0;
int num3 = 0;
bool flag = false;
byte[] buffer = new byte[] { 0 };
Label_006A:
if (!this.backgroundWorker_0.CancellationPending)
{
try
{
string str = string.Empty;
if (this.class18_0.class10_settings_0.wideband_Serial_0 == Wideband_Serial.FJO)
{
double num4 = 0.0;
while (num2 <= 10)
{
//this.LogThis("byte to read: " + this.serialPort_0.BytesToRead.ToString());
num = this.serialPort_0.ReadByte();
str = str + Convert.ToChar(num);
if (num == 10)
{
//this.LogThis("detected 0x0a");
break;
}
num2++;
}
//this.LogThis("Received FJO line: " + str.ToString());
if (builder.ToString().Contains("H-1"))
{
this.double_0 = 0.0;
}
else if (builder.ToString().Contains("."))
{
num4 = double.Parse(builder.ToString()) / 14.7;
this.double_0 = num4;
}
else if (builder.ToString().Contains("Err"))
{
this.bool_0 = false;
this.serialPort_0.Close();
this.serialPort_0.Dispose();
this.serialPort_0 = null;
this.LogThis("error detected: " + builder.ToString());
goto Label_09D1;
//throw new Exception("error detected: " + builder.ToString());
}
goto Label_006A;
}
if (this.class18_0.class10_settings_0.wideband_Serial_0 != Wideband_Serial.TechEdge)
{
goto Label_03B7;
}
bool flag2 = false;
goto Label_02D4;
Label_01E9:
//this.LogThis("byte to read: " + this.serialPort_0.BytesToRead.ToString());
while (this.serialPort_0.BytesToRead < 0x1c)
{
}
byte num6 = (byte) this.serialPort_0.ReadByte();
byte num7 = 0;
//this.LogThis("b1: " + num6.ToString("X2"));
if (num6 != 90)
{
goto Label_01E9;
}
num7 = (byte) this.serialPort_0.ReadByte();
if (num6 != 90)
{
goto Label_01E9;
}
//this.LogThis("b2: " + num7.ToString("X2"));
//this.LogThis("Te_frame_detected");
flag2 = true;
this.byte_0[0] = num6;
this.byte_0[1] = num7;
for (int i = 0; i < 0x1a; i++)
{
this.byte_0[2 + i] = (byte) this.serialPort_0.ReadByte();
}
//this.LogThis("read remaining 26 bytes");
Label_02D4:
if (!flag2)
{
goto Label_01E9;
}
//this.LogThis("Reading/calc frame");
int num9 = this.class18_0.method_146(this.byte_0[6], this.byte_0[5]);
//this.LogThis("b8/9: " + num9.ToString());
byte num10 = 0;
byte num11 = 0;
num10 = this.byte_0[0x19];
num11 = this.byte_0[0x1a];
//this.LogThis("Status 1: " + num10.ToString() + " Status 2: " + num11.ToString());
if ((num11 == 0) && (num10 == 3))
{
this.serialPort_0.DiscardInBuffer();
double num12 = (((double) num9) / 8192.0) + 0.5;
//this.LogThis("Lambda temp: " + num12.ToString());
this.double_0 = num12;
}
else
{
this.LogThis("Status byte 27 not 0");
}
goto Label_006A;
Label_03B7:
if (this.class18_0.class10_settings_0.wideband_Serial_0 != Wideband_Serial.Zeitronix)
{
goto Label_0560;
}
bool flag3 = false;
goto Label_04F0;
Label_03D5:
//this.LogThis("byte to read: " + this.serialPort_0.BytesToRead.ToString());
byte num13 = (byte) this.serialPort_0.ReadByte();
byte num14 = 0;
byte num15 = 0;
//this.LogThis("b1: " + num13.ToString("X2"));
if (num13 != 0)
{
goto Label_03D5;
}
num14 = (byte) this.serialPort_0.ReadByte();
//this.LogThis("b2: " + num14.ToString("X2"));
if (num14 != 1)
{
goto Label_03D5;
}
num15 = (byte) this.serialPort_0.ReadByte();
//this.LogThis("b3: " + num15.ToString("X2"));
if (num15 != 2)
{
goto Label_03D5;
}
//this.LogThis("ZE_frame_detected");
flag3 = true;
this.byte_0[0] = num13;
this.byte_0[1] = num14;
this.byte_0[2] = num15;
for (int j = 0; j < 11; j++)
{
this.byte_0[3 + j] = (byte) this.serialPort_0.ReadByte();
}
//this.LogThis("read remaning 11 bytes");
Label_04F0:
if (!flag3)
{
goto Label_03D5;
}
//this.LogThis("Reading/calc frame");
double num17 = ((double) this.byte_0[3]) / 10.0;
//this.LogThis("Afr temp: " + num17.ToString());
double num18 = num17 / 14.7;
//this.LogThis("Lambda temp: " + num18.ToString());
this.double_0 = num18;
goto Label_006A;
Label_0560:
if (this.class18_0.class10_settings_0.wideband_Serial_0 != Wideband_Serial.Plx)
{
goto Label_07F4;
}
bool flag4 = false;
goto Label_05E0;
Label_057B:
//this.LogThis("byte to read: " + this.serialPort_0.BytesToRead.ToString());
byte num19 = (byte) this.serialPort_0.ReadByte();
//this.LogThis("b1: " + num19.ToString("X2"));
if (num19 != 0xff)
{
goto Label_057B;
}
//this.LogThis("Plx_frame_detected last 0xff, read frame");
flag4 = true;
Label_05E0:
if (!flag4)
{
goto Label_057B;
}
Label_05E4:
if (this.backgroundWorker_0.CancellationPending)
{
goto Label_09D1;
}
while (this.serialPort_0.BytesToRead < 9)
{
}
//this.LogThis("read remaning 9 bytes");
for (int k = 0; k < 9; k++)
{
this.byte_0[k] = (byte) this.serialPort_0.ReadByte();
}
if (this.byte_0[8] == 0xff)
{
//this.LogThis("frame: " + this.byte_0[0].ToString("X2") + " " + this.byte_0[1].ToString("X2") + " " + this.byte_0[2].ToString("X2") + " " + this.byte_0[3].ToString("X2") + " " + this.byte_0[4].ToString("X2") + " " + this.byte_0[5].ToString("X2") + " " + this.byte_0[6].ToString("X2") + " " + this.byte_0[7].ToString("X2") + " " + this.byte_0[8].ToString("X2") + " ");
double num21 = (this.byte_0[7] * 0.0026667) + 0.68;
//this.LogThis("Lambda temp: " + num21.ToString());
this.double_0 = num21;
goto Label_05E4;
}
goto Label_006A;
Label_07F4:
if (this.class18_0.class10_settings_0.wideband_Serial_0 == Wideband_Serial.Aem)
{
double num22 = 0.0;
str = this.serialPort_0.ReadLine();
//this.LogThis("Received AE< line: " + str.ToString());
if (str.ToString().Contains("."))
{
double num23 = double.Parse(str.ToString());
if (num23 > 2.0)
{
num22 = num23 / 14.7;
}
this.double_0 = num22;
}
goto Label_006A;
}
if (this.class18_0.class10_settings_0.wideband_Serial_0 != Wideband_Serial.JAW)
{
goto Label_09D1;
}
Label_089A:
if (!flag)
{
//this.LogThis("Sending request 0x00");
this.serialPort_0.Write(buffer, 0, 1);
}
//this.LogThis("byte to read: " + this.serialPort_0.BytesToRead.ToString());
if (this.serialPort_0.BytesToRead < 6)
{
flag = true;
goto Label_089A;
}
flag = false;
for (int m = 0; m < 6; m++)
{
this.byte_0[m] = (byte) this.serialPort_0.ReadByte();
}
//this.LogThis("read remaning 6 bytes");
//this.LogThis("Reading/calc frame");
double num25 = this.byte_0[1];
//this.LogThis("Jaw wb temp: " + num25.ToString());
if (num25 < 15.0)
{
this.LogThis("Jaw temp smaller then 16");
}
else
{
double num26 = double_1[this.byte_0[0]];
//this.LogThis("Lambda temp: " + num26.ToString());
this.double_0 = num26;
}
goto Label_006A;
}
catch (Exception exception)
{
if (this.serialPort_0.IsOpen)
{
num3++;
this.LogThis("" + exception.Message);
if (num3 >= 9)
{
goto Label_09D1;
//throw exception;
}
goto Label_006A;
}
}
}
Label_09D1:
builder = null;
num2 = 0;
num = 0;
}
public void method_0()
{
//if (!Loading) this.LogThis("Selected: " + this.class18_0.class10_settings_0.wideband_Serial_0.ToString());
/*if (this.class18_0.class10_0.wideband_Serial_0 == Wideband_Serial.const_0)
{
this.method_15();
if (!Loading) this.LogThis("Innovate ports created");
}
else
{*/
this.string_0 = new string[20];
for (int i = 0; i <= 0x13; i++) this.string_0[i] = "COM" + ((i + 1)).ToString();
//if (!Loading) this.LogThis("comm ports 20 created");
//}
if (this.class18_0.class10_settings_0.wideband_Serial_0 == Wideband_Serial.TechEdge)
{
this.byte_0 = new byte[this.method_14()];
//if (!Loading) this.LogThis("Serial frame (" + this.class18_0.class10_settings_0.wideband_Serial_0.ToString() + ") with size:" + this.method_14().ToString() + " created");
}
else if (this.class18_0.class10_settings_0.wideband_Serial_0 == Wideband_Serial.Zeitronix)
{
this.byte_0 = new byte[this.method_14()];
//if (!Loading) this.LogThis("Serial frame (" + this.class18_0.class10_settings_0.wideband_Serial_0.ToString() + ") with size:" + this.method_14().ToString() + " created");
}
if (this.class18_0.class10_settings_0.wideband_Serial_0 == Wideband_Serial.Plx)
{
this.byte_0 = new byte[this.method_14()];
//if (!Loading) this.LogThis("Serial frame (" + this.class18_0.class10_settings_0.wideband_Serial_0.ToString() + ") with size:" + this.method_14().ToString() + " created");
}
Loading = false;
}
public double method_1()
{
if (!this.method_4())
{
return 0.0;
}
if ((this.class18_0.class10_settings_0.wideband_Serial_0 == Wideband_Serial.const_0) && this.bool_2)
{
this.LogThis("Innovate Connection Error detected");
return 0.0;
//throw new Exception("Innovate Connection Error detected");
}
return this.double_0;
}
private Parity method_10()
{
switch (this.class18_0.class10_settings_0.wideband_Serial_0)
{
case Wideband_Serial.const_0:
break;
//throw new Exception("parity selection failed");
case Wideband_Serial.FJO:
return Parity.None;
case Wideband_Serial.TechEdge:
return Parity.None;
case Wideband_Serial.Zeitronix:
return Parity.None;
case Wideband_Serial.Aem:
return Parity.None;
case Wideband_Serial.Plx:
return Parity.Even;
}
this.LogThis("parity selection failed");
return Parity.None;
//throw new Exception("parity selection failed");
}
private StopBits method_11()
{
switch (this.class18_0.class10_settings_0.wideband_Serial_0)
{
case Wideband_Serial.const_0:
break;
//throw new Exception("stop bit selection failed");
case Wideband_Serial.FJO:
return StopBits.One;
case Wideband_Serial.TechEdge:
return StopBits.One;
case Wideband_Serial.Zeitronix:
return StopBits.One;
case Wideband_Serial.Aem:
return StopBits.One;
case Wideband_Serial.Plx:
return StopBits.One;
case Wideband_Serial.JAW:
return StopBits.One;
}
this.LogThis("stop bit selection failed");
return StopBits.One;
//throw new Exception("stop bit selection failed");
}
private int method_12()
{
switch (this.class18_0.class10_settings_0.wideband_Serial_0)
{
case Wideband_Serial.const_0:
break;
//throw new Exception("data bit selection failed");
case Wideband_Serial.FJO:
return 8;
case Wideband_Serial.TechEdge:
return 8;
case Wideband_Serial.Zeitronix:
return 8;
case Wideband_Serial.Aem:
return 8;
case Wideband_Serial.Plx:
return 8;
case Wideband_Serial.JAW:
return 8;
}
this.LogThis("data bit selection failed");
return 8;
//throw new Exception("data bit selection failed");
}
private string method_13()
{
return this.string_0[this.method_7()].ToString();
}
private int method_14()
{
switch (this.class18_0.class10_settings_0.wideband_Serial_0)
{
case Wideband_Serial.const_0:
break;
//throw new Exception("frame seize selection failed");
case Wideband_Serial.FJO:
break;
//throw new Exception("frame seize selection failed");
case Wideband_Serial.TechEdge:
return 0x1c;
case Wideband_Serial.Zeitronix:
return 14;
case Wideband_Serial.Plx:
return 9;
case Wideband_Serial.JAW:
return 6;
}
this.LogThis("frame size selection failed");
return 9;
//throw new Exception("frame seize selection failed");
}
//#################################################################################
public void method_15()
{
int portCount = this.mts_0.PortCount;
this.string_0 = new string[portCount];
if (portCount != 0)
{
for (int i = 0; i < portCount; i++)
{
this.mts_0.CurrentPort = i;
this.string_0[i] = this.mts_0.PortName;
}
}
}
private void method_16()
{
try
{
this.mts_0 = new MTS();
this.mts_0.ConnectionError += new _IMTSEvents_ConnectionErrorEventHandler(this.method_19);
this.mts_0.ConnectionEvent += new _IMTSEvents_ConnectionEventEventHandler(this.method_18);
this.mts_0.NewData += new _IMTSEvents_NewDataEventHandler(this.method_17);
}
catch
{
}
}
private void method_17()
{
Enum0 inputFunction;
//this.LogThis("innovate new data()");
double inputSample = 0.0;
this.bool_2 = false;
if (this.mts_0.InputCount > 0)
{
this.int_2++;
inputSample = this.mts_0.InputSample;
inputFunction = (Enum0)this.mts_0.InputFunction;
if (this.mts_0.InputType == 1)
{
if (inputFunction == Enum0.const_0)
{
inputSample = (inputSample * 0.001) + 0.5;
}
else
{
if (inputFunction != Enum0.const_1)
{
goto Label_00DB;
}
inputSample *= 0.1;
}
}
else
{
if (this.mts_0.InputType != 0)
{
goto Label_00DB;
}
if (inputFunction == Enum0.const_0)
{
inputSample = (inputSample * 0.001) + 0.5;
}
else
{
if (inputFunction != Enum0.const_1)
{
goto Label_00DB;
}
inputSample *= 0.1;
}
}
this.double_0 = inputSample;
this.int_2 = 0;
}
return;
Label_00DB:
this.int_2 = 0;
switch (inputFunction)
{
case Enum0.const_2:
case Enum0.const_3:
break;
case Enum0.const_4:
this.double_0 = 0.0;
return;
case Enum0.const_5:
this.double_0 = 0.0;
return;
case Enum0.const_6:
this.double_0 = 0.0;
return;
case Enum0.const_7:
this.double_0 = 0.0;
return;
case Enum0.const_8:
this.double_0 = 0.0;
return;
case Enum0.const_9:
this.double_0 = 0.0;
return;
case Enum0.const_10:
this.double_0 = 0.0;
break;
default:
return;
}
}
private void method_18(int int_3)
{
if (this.class18_0.class10_settings_0.wideband_Serial_0 == Wideband_Serial.const_0)
{
//this.LogThis("innovate event : " + int_3.ToString());
switch (int_3)
{
case -1:
this.bool_1 = false;
this.bool_0 = this.bool_1;
this.bool_2 = true;
this.LogThis("Innovate wideband not detected");
return;
//throw new Exception("Innovate wideband not detected");
case 0:
this.bool_1 = true;
this.bool_0 = this.bool_1;
this.bool_2 = false;
return;
}
this.bool_1 = false;
this.bool_0 = this.bool_1;
this.bool_2 = true;
this.LogThis("Innovate error: " + int_3.ToString());
//throw new Exception("Innovate error: " + int_3.ToString());
}
}
private void method_19()
{
if (this.class18_0.class10_settings_0.wideband_Serial_0 == Wideband_Serial.const_0)
{
this.LogThis("innovate connection error");
this.bool_2 = true;
this.mts_0.Disconnect();
}
}
//############################################################################
public bool method_2()
{
this.LogThis("Connecting: " + this.class18_0.class10_settings_0.wideband_Serial_0.ToString());
//###########################################
if (this.class18_0.class10_settings_0.wideband_Serial_0 == Wideband_Serial.const_0)
{
this.mts_0.CurrentPort = this.method_7();
this.mts_0.Connect();
if (!this.bool_1)
{
this.LogThis("Innovate wideband not detected");
return this.bool_1;
//throw new Exception("Innovate wideband not detected");
}
//this.LogThis("Innovate SDK startdata");
this.mts_0.StartData();
this.LogThis("Innovate SDK connected");
return this.bool_1;
}
//###########################################
try
{
this.serialPort_0 = new SerialPort(this.method_13(), this.method_9(), this.method_10(), this.method_12(), this.method_11());
this.serialPort_0.Open();
this.serialPort_0.ReadTimeout = 200;
//this.LogThis("Serial port created " + this.method_13().ToString() + " " + this.method_9().ToString() + " " + this.method_10().ToString() + " " + this.method_12().ToString() + " " + this.method_11().ToString());
}
catch (Exception exception)
{
this.serialPort_0.Close();
this.LogThis(exception.Message);
this.bool_1 = false;
return this.bool_1;
//throw exception;
}
this.bool_0 = this.serialPort_0.IsOpen;
if (!this.bool_0)
{
this.LogThis("Unable to open comm port");
return this.bool_0;
//throw new Exception("Unable to open comm port");
}
this.backgroundWorker_0.RunWorkerAsync();
//this.LogThis("Running background worker for Wideband");
return this.bool_0;
}
public void method_3()
{
this.mts_0.Disconnect();
}
public bool method_4()
{
return this.bool_0;
}
private void LogThis(string string_1)
{
this.frmMain_0.LogThis("Wideband - " + string_1);
}
private int method_7()
{
return this.class18_0.class10_settings_0.int_10;
}
private int method_9()
{
switch (this.class18_0.class10_settings_0.wideband_Serial_0)
{
case Wideband_Serial.const_0:
break;
//throw new Exception("Baud selection failed");
case Wideband_Serial.FJO:
return 0x4b00;
case Wideband_Serial.TechEdge:
return 0x4b00;
case Wideband_Serial.Zeitronix:
return 0x2580;
case Wideband_Serial.Aem:
return 0x2580;
case Wideband_Serial.Plx:
return 0x960;
case Wideband_Serial.JAW:
return 0x3840;
}
this.LogThis("Baud selection failed");
return 0x960;
//throw new Exception("Baud selection failed");
}
public enum Enum0
{
const_0,
const_1,
const_2,
const_3,
const_4,
const_5,
const_6,
const_7,
const_8,
const_9,
const_10
}
}

4633
Class30_OBD2.cs Normal file

File diff suppressed because it is too large Load Diff

959
Class32_Locations.cs Normal file
View File

@ -0,0 +1,959 @@
using System;
using System.IO;
using System.Reflection;
using System.Collections.Generic;
internal class Class32_Locations
{
private Class18 class18_0;
//List<long> OldLocations = new List<long>();
//List<long> NewLocations = new List<long>();
public void LoadReference(ref Class18 thisC18)
{
class18_0 = thisC18;
}
public void ResetAddresseForVersion(int Version)
{
if (Version != this.class18_0.LastLocationLoaded)
{
this.class18_0.LastLocationLoaded = Version;
//Load Original Locations
this.class18_0.method_145();
//Load all new locations representative to 1.11 and beyond
if (Version >= 114 && Version < 116) Reset114();
if (Version >= 116) Reset116();
//Reset Some Parameters Locations
this.class18_0.GetInputsOutputsLocations();
this.class18_0.GetECT_IAT_Temp_Area();
this.class18_0.Get_TestOutputs_Area();
}
}
private void Reset114()
{
this.class18_0.class13_u_0.long_43 = 0x5fd2L;
this.class18_0.class13_u_0.long_44 = 0x5fceL;
this.class18_0.class13_u_0.long_46 = 0x606bL;
this.class18_0.class13_u_0.long_54 = 0x5fd1L;
this.class18_0.class13_u_0.long_55 = 0x5fcdL;
this.class18_0.class13_u_0.long_58 = 0x606cL; //Fcut delay (overrun fcut)
this.class18_0.class13_u_0.long_59 = 0x5fcaL;
this.class18_0.class13_u_0.long_61 = 0x5fc5L; //Fcut Leak
this.class18_0.class13_u_0.long_60 = 0x5fc6L; //FCut Leak
this.class18_0.class13_u_0.long_62 = 0x5fc7L; //FCut Leak
this.class18_0.class13_u_0.long_79 = 0x606aL;
this.class18_0.class13_u_0.long_82 = 0x6014L; //gear based rev limiter
this.class18_0.class13_u_0.long_83 = 0x6013L; //rev limiter ect threshold (cold/hot)
this.class18_0.class13_u_0.long_84 = 0x6012L;
this.class18_0.class13_u_0.long_85 = 0x6020L;
this.class18_0.class13_u_0.long_88 = 0x5fd3L; //kill injector
this.class18_0.class13_u_0.long_89 = 0x5f87L; //Calibration Area (previous: 0x5f28L; ectune: 0x5f44L)
this.class18_0.class13_u_0.long_116 = 0x5fd4L; //ign sync on/off
this.class18_0.class13_u_0.long_132 = 0x6069L; //ect protect, above ect
this.class18_0.class13_u_0.long_133 = 0x6068L; //ect protect enabled
this.class18_0.class13_u_0.long_135 = 0x5ffbL; //ect protect limit to rpm
this.class18_0.class13_u_0.long_136 = 0x6029L;
this.class18_0.class13_u_0.long_150 = 0x6004L; //fts rpm
this.class18_0.class13_u_0.long_151 = 0x6002L; //fts above tps
this.class18_0.class13_u_0.long_152 = 0x6003L; //fts gear based rpm enable
this.class18_0.class13_u_0.long_153 = 0x5fddL; //fts type (fixed or adjustable rpm)
this.class18_0.class13_u_0.long_154 = 0x5fdcL; //fts antilag enabled
this.class18_0.class13_u_0.long_155 = 0x5fdaL; //fts fuel
this.class18_0.class13_u_0.long_156 = 0x5fd9L; //fts ign retard
this.class18_0.class13_u_0.long_162 = 0x6011L; //FTL Antilag ign mode (static, by retard)
this.class18_0.class13_u_0.long_163 = 0x6010L; //FTL retard static
this.class18_0.class13_u_0.long_171 = 0x5fd8L; //Burnout Control Rpm
this.class18_0.class13_u_0.long_172 = 0x5fd7L; //Burnout Control Input
this.class18_0.class13_u_0.long_173 = 0x5fd5L; //Burnout Control
this.class18_0.class13_u_0.long_189 = 0x5fc8L; //Gear Corr Above Load
this.class18_0.class13_u_0.long_192 = 0x6021L; //Idle Ign Corr Enabled
this.class18_0.class13_u_0.long_193 = 0x6022L; //Idle Ign Corr Above ect
this.class18_0.class13_u_0.long_195 = 0x6027L;
this.class18_0.class13_u_0.long_196 = 0x6025L;
this.class18_0.class13_u_0.long_197 = 0x6026L;
this.class18_0.class13_u_0.long_198 = 0x6023L;
this.class18_0.class13_u_0.long_199 = 0x6024L;
this.class18_0.class13_u_0.long_200 = 0x6028L;
this.class18_0.class13_u_0.long_217 = 0x5fdeL;
this.class18_0.class13_u_0.long_231 = 0x5fffL;
this.class18_0.class13_u_0.long_232 = 0x6000L;
this.class18_0.class13_u_0.long_233 = 0x6001L;
this.class18_0.class13_u_0.long_237 = 0x6037L;
this.class18_0.class13_u_0.long_239 = 0x5ff7L;
this.class18_0.class13_u_0.long_240 = 0x5ff8L;
this.class18_0.class13_u_0.long_242 = 0x5fcfL;
this.class18_0.class13_u_0.long_256 = 0x606dL;
this.class18_0.class13_u_0.long_260 = 0x60a5L;
this.class18_0.class13_u_0.long_261 = 0x608fL;
this.class18_0.class13_u_0.long_262 = 0x6079L;
this.class18_0.class13_u_0.long_263 = 0x60bbL;
this.class18_0.class13_u_0.long_264 = 0x6037L;
this.class18_0.class13_u_0.long_265 = 0x5fefL;
this.class18_0.class13_u_0.long_266 = 0x602bL;
this.class18_0.class13_u_0.long_268 = 0x5ff9L;
this.class18_0.class13_u_0.long_269 = 0x6033L;
this.class18_0.class13_u_0.long_270 = 0x5fe7L;
this.class18_0.class13_u_0.long_310 = 0x60c5L;
this.class18_0.class13_u_0.long_311 = 0x60dbL;
this.class18_0.class13_u_0.long_313 = 0x603bL;
this.class18_0.class13_u_0.long_314 = 0x603eL;
this.class18_0.class13_u_0.long_315 = 0x603fL;
this.class18_0.class13_u_0.long_316 = 0x603cL;
this.class18_0.class13_u_0.long_317 = 0x603dL;
this.class18_0.class13_u_0.long_318 = 0x6041L;
this.class18_0.class13_u_0.long_319 = 0x6040L;
this.class18_0.class13_u_0.long_320 = 0x6042L;
this.class18_0.class13_u_0.long_321 = 0x6043L;
this.class18_0.class13_u_0.long_322 = 0x6045L;
this.class18_0.class13_u_0.long_323 = 0x6047L;
this.class18_0.class13_u_0.long_324 = 0x6048L;
this.class18_0.class13_u_0.long_325 = 0x6049L;
this.class18_0.class13_u_0.long_326 = 0x604aL;
this.class18_0.class13_u_0.long_327 = 0x604bL;
this.class18_0.class13_u_0.long_328 = 0x604cL;
this.class18_0.class13_u_0.long_329 = 0x604dL;
this.class18_0.class13_u_0.long_330 = 0x604fL;
this.class18_0.class13_u_0.long_331 = 0x604eL;
this.class18_0.class13_u_0.long_332 = 0x60fcL;
this.class18_0.class13_u_0.long_333 = 0x6112L;
this.class18_0.class13_u_0.long_335 = 0x6050L;
this.class18_0.class13_u_0.long_336 = 0x6053L;
this.class18_0.class13_u_0.long_337 = 0x6054L;
this.class18_0.class13_u_0.long_338 = 0x6051L;
this.class18_0.class13_u_0.long_339 = 0x6052L;
this.class18_0.class13_u_0.long_340 = 0x6056L;
this.class18_0.class13_u_0.long_341 = 0x6055L;
this.class18_0.class13_u_0.long_342 = 0x6057L;
this.class18_0.class13_u_0.long_343 = 0x6058L;
this.class18_0.class13_u_0.long_344 = 0x605aL;
this.class18_0.class13_u_0.long_345 = 0x605cL;
this.class18_0.class13_u_0.long_346 = 0x605dL;
this.class18_0.class13_u_0.long_347 = 0x605eL;
this.class18_0.class13_u_0.long_348 = 0x605fL;
this.class18_0.class13_u_0.long_349 = 0x6060L;
this.class18_0.class13_u_0.long_350 = 0x6061L;
this.class18_0.class13_u_0.long_351 = 0x6062L;
this.class18_0.class13_u_0.long_352 = 0x6064L;
this.class18_0.class13_u_0.long_353 = 0x6063L;
this.class18_0.class13_u_0.long_370 = 0x6030L;
this.class18_0.class13_u_0.long_371 = 0x6031L;
this.class18_0.class13_u_0.long_372 = 0x6032L;
this.class18_0.class13_u_0.long_373 = 0x602cL;
this.class18_0.class13_u_0.long_377 = 0x5fdfL; //lean protect min rpm
this.class18_0.class13_u_0.long_378 = 0x5fe1L; //lean protect min tps
this.class18_0.class13_u_0.long_379 = 0x5fe3L; //lean protect
this.class18_0.class13_u_0.long_380 = 0x5fe2L; //lean protect
this.class18_0.class13_u_0.long_381 = 0x5fe4L; //lean protect
this.class18_0.class13_u_0.long_382 = 0x5fe5L; //lean protect
this.class18_0.class13_u_0.long_383 = 0x6034L; //lean protect
this.class18_0.class13_u_0.long_384 = 0x5fe6L; //lean protect
this.class18_0.class13_u_0.long_385 = 0x6035L; //lean protect
this.class18_0.class13_u_0.long_386 = 0x6036L; //lean protect
this.class18_0.class13_u_0.long_402 = 0x5fb3L; //FTS Speed
this.class18_0.class13_u_0.long_460 = 0x5f9cL; //FlexFuel Ethanol Content
this.class18_0.class13_u_0.long_461 = 0x5f8aL; //FlexFuel Fuel - Closeloop
//this.class18_0.class13_u_0.long_463 = 0x5f99L; //FlexFuel Fuel - Cranking
this.class18_0.class13_u_0.long_464 = 0x5fa4L; //FlexFuel Ignition - Closeloop
/*this.class18_0.class13_u_0.long_460 = 0x5f9cL; //FlexFuel Ethanol Content
this.class18_0.class13_u_0.long_461 = 0x5f78L; //FlexFuel Fuel - Closeloop
this.class18_0.class13_u_0.long_463 = 0x5f8aL; //FlexFuel Fuel - Cranking
this.class18_0.class13_u_0.long_464 = 0x5fa4L; //FlexFuel Ignition - Closeloop*/
//this.class18_0.class13_u_0.long_494 = 0x5f77L; //Ign Cut Mod (With fuel/ign mod or not)
this.class18_0.class13_u_0.long_494 = 0x5f89L; //Ign Cut Mod (With fuel/ign mod or not)
this.class18_0.class13_u_0.long_89 = 0x5f80L; //Calibration Area (previous: 0x5f28L; ectune: 0x5f44L)
this.class18_0.class13_u_0.long_493 = 0x5f88L; //Ign Cut Mod (With time millisecond mod or not)
}
private void Reset116()
{
this.class18_0.class13_u_0.long_0 = 0x621aL; //manual edit 1.11
this.class18_0.class13_u_0.long_1 = 0x621cL; //manual edit 1.11
this.class18_0.class13_u_0.long_2 = 0x6219L; //manual edit 1.11
this.class18_0.class13_u_0.long_24 = 0x62c3L;
this.class18_0.class13_u_0.long_25 = 0x62c5L; //this lcoation +1 refer to injectors index
this.class18_0.class13_u_0.long_31 = 0x622cL;
this.class18_0.class13_u_0.long_32 = 0x622dL;
this.class18_0.class13_u_0.long_33 = 0x621eL;
this.class18_0.class13_u_0.long_34 = 0x622aL;
this.class18_0.class13_u_0.long_35 = 0x6220L;
this.class18_0.class13_u_0.long_36 = 0x6222L;
this.class18_0.class13_u_0.long_37 = 0x6224L;
this.class18_0.class13_u_0.long_38 = 0x6226L;
this.class18_0.class13_u_0.long_39 = 0x6228L; //injector overall fuel trim
this.class18_0.class13_u_0.long_41 = 0x63abL;
this.class18_0.class13_u_0.long_43 = 0x60efL;
this.class18_0.class13_u_0.long_44 = 0x60ebL;
this.class18_0.class13_u_0.long_45 = 0x6319L;
this.class18_0.class13_u_0.long_46 = 0x6188L;
this.class18_0.class13_u_0.long_47 = 0x6310L;
this.class18_0.class13_u_0.long_48 = 0x632bL;
this.class18_0.class13_u_0.long_49 = 0x6311L;
this.class18_0.class13_u_0.long_50 = 0x6312L;
this.class18_0.class13_u_0.long_51 = 0x6316L;
this.class18_0.class13_u_0.long_52 = 0x6656L;
this.class18_0.class13_u_0.long_53 = 0x6313L;
this.class18_0.class13_u_0.long_54 = 0x60eeL;
this.class18_0.class13_u_0.long_55 = 0x60eaL;
this.class18_0.class13_u_0.long_56 = 0x6314L;
this.class18_0.class13_u_0.long_58 = 0x6189L; //Fcut delay (overrun fcut)
this.class18_0.class13_u_0.long_59 = 0x60e7L;
this.class18_0.class13_u_0.long_61 = 0x60e2L; //Fcut Leak
this.class18_0.class13_u_0.long_60 = 0x60e3L; //FCut Leak
this.class18_0.class13_u_0.long_62 = 0x60e4L; //FCut Leak
this.class18_0.class13_u_0.long_63 = 0x66a8L;
this.class18_0.class13_u_0.long_64 = 0x6330L;
this.class18_0.class13_u_0.long_66 = 0x6328L;
this.class18_0.class13_u_0.long_65 = 0x6315L;
this.class18_0.class13_u_0.long_67 = 0x6327L;
this.class18_0.class13_u_0.long_71 = 0x6242L;
this.class18_0.class13_u_0.long_72 = 0x6243L;
this.class18_0.class13_u_0.long_75 = 0x6318L;
this.class18_0.class13_u_0.long_76 = 0x628cL;
this.class18_0.class13_u_0.long_77 = 0x62b7L;
this.class18_0.class13_u_0.long_78 = 0x62c4L;
this.class18_0.class13_u_0.long_79 = 0x6187L;
this.class18_0.class13_u_0.long_80 = 0x62ebL;
this.class18_0.class13_u_0.long_81 = 0x632dL;
this.class18_0.class13_u_0.long_82 = 0x6131L; //gear based rev limiter
this.class18_0.class13_u_0.long_83 = 0x6130L; //rev limiter ect threshold (cold/hot)
this.class18_0.class13_u_0.long_84 = 0x612fL;
this.class18_0.class13_u_0.long_85 = 0x613dL;
this.class18_0.class13_u_0.long_88 = 0x60f0L; //kill injector
//this.class18_0.class13_u_0.long_89 = 0x60a4L; //Calibration Area (previous: 0x5f28L; ectune: 0x5f44L)
//this.class18_0.class13_u_0.long_89 = 0x6020L; //Calibration Area (previous: 0x5f28L; ectune: 0x5f44L)
this.class18_0.class13_u_0.long_95 = 0x62f5L;
this.class18_0.class13_u_0.long_100 = 0x631aL;
this.class18_0.class13_u_0.long_101 = 0x631fL; //ignition sync value
this.class18_0.class13_u_0.long_102 = 0x6325L;
this.class18_0.class13_u_0.long_103 = 0x6288L;
this.class18_0.class13_u_0.long_104 = 0x6289L;
this.class18_0.class13_u_0.long_105 = 0x628aL;
this.class18_0.class13_u_0.long_106 = 0x628bL; //Fan control enabled
this.class18_0.class13_u_0.long_110 = 0x628cL;
this.class18_0.class13_u_0.long_111 = 0x62dcL;
this.class18_0.class13_u_0.long_112 = 0x631dL;
this.class18_0.class13_u_0.long_113 = 0x6320L;
this.class18_0.class13_u_0.long_114 = 0x6255L;
this.class18_0.class13_u_0.long_115 = 0x6256L;
this.class18_0.class13_u_0.long_116 = 0x60f1L; //ign sync on/off
this.class18_0.class13_u_0.long_117 = 0x625fL; //mil shiftlight enable
this.class18_0.class13_u_0.long_118 = 0x6260L; //mil shiftlight per Gear enable
this.class18_0.class13_u_0.long_119 = 0x6261L;
this.class18_0.class13_u_0.long_120 = 0x6263L;
this.class18_0.class13_u_0.long_121 = 0x625bL;
this.class18_0.class13_u_0.long_122 = 0x625dL;
this.class18_0.class13_u_0.long_123 = 0x6257L;
this.class18_0.class13_u_0.long_124 = 0x6258L;
this.class18_0.class13_u_0.long_125 = 0x625aL;
this.class18_0.class13_u_0.long_126 = 0x626dL; //Boost cut enabled
this.class18_0.class13_u_0.long_127 = 0x626eL; //Boost cut Cold Load value
this.class18_0.class13_u_0.long_128 = 0x627bL; //Boost cut Hot Load value
this.class18_0.class13_u_0.long_129 = 0x627cL; //Boost cut ect threshold
this.class18_0.class13_u_0.long_130 = 0x627aL; //Boost cut activate boost cut if DTC
this.class18_0.class13_u_0.long_131 = 0x62b8L; //Boost cut limit rpm type (1200rpm or set at current rpm)
this.class18_0.class13_u_0.long_132 = 0x6186L; //ect protect, above ect
this.class18_0.class13_u_0.long_133 = 0x6185L; //ect protect enabled
this.class18_0.class13_u_0.long_135 = 0x6118L; //ect protect limit to rpm
this.class18_0.class13_u_0.long_136 = 0x6146L;
this.class18_0.class13_u_0.long_137 = 0x626fL;
this.class18_0.class13_u_0.long_138 = 0x6270L;
this.class18_0.class13_u_0.long_139 = 0x6272L;
this.class18_0.class13_u_0.long_140 = 0x6273L; //launch-FTL minimum RPM
this.class18_0.class13_u_0.long_141 = 0x6275L;
this.class18_0.class13_u_0.long_142 = 0x62ecL;
this.class18_0.class13_u_0.long_143 = 0x6282L;
this.class18_0.class13_u_0.long_144 = 0x6271L;
this.class18_0.class13_u_0.long_147 = 0x6276L;
this.class18_0.class13_u_0.long_148 = 0x6277L;
this.class18_0.class13_u_0.long_149 = 0x6278L;
this.class18_0.class13_u_0.long_150 = 0x6121L; //fts rpm
this.class18_0.class13_u_0.long_151 = 0x611fL; //fts above tps
this.class18_0.class13_u_0.long_152 = 0x6120L; //fts gear based rpm enable
this.class18_0.class13_u_0.long_153 = 0x60faL; //fts type (fixed or adjustable rpm)
this.class18_0.class13_u_0.long_154 = 0x60f9L; //fts antilag enabled
this.class18_0.class13_u_0.long_155 = 0x60f7L; //fts fuel
this.class18_0.class13_u_0.long_156 = 0x60f6L; //fts ign retard
this.class18_0.class13_u_0.long_157 = 0x6281L; //fts enabled
this.class18_0.class13_u_0.long_158 = 0x627dL; //FTL antilag above tps
this.class18_0.class13_u_0.long_159 = 0x627eL; //FTL fuel
this.class18_0.class13_u_0.long_160 = 0x6280L; //FTL Retard
this.class18_0.class13_u_0.long_162 = 0x612eL; //FTL Antilag ign mode (static, by retard)
this.class18_0.class13_u_0.long_163 = 0x612dL; //FTL retard static
this.class18_0.class13_u_0.long_171 = 0x60f5L; //Burnout Control Rpm
this.class18_0.class13_u_0.long_172 = 0x60f4L; //Burnout Control Input
this.class18_0.class13_u_0.long_173 = 0x60f2L; //Burnout Control
this.class18_0.class13_u_0.long_174 = 0x63bfL; //IAT Corr Table #1
this.class18_0.class13_u_0.long_176 = 0x634bL; //IAT Corr Table #2
this.class18_0.class13_u_0.long_178 = 0x6428L; //ECT Corr Table #1
this.class18_0.class13_u_0.long_179 = 0x65f9L; //Crank Corr Table
this.class18_0.class13_u_0.long_180 = 0x6238L; //Enabled Ign Corr
this.class18_0.class13_u_0.long_181 = 0x6239L; //disable ign corr above Load
this.class18_0.class13_u_0.long_183 = 0x6513L; //Individual Cyl Corr Table #1
this.class18_0.class13_u_0.long_184 = 0x6251L; //Individual Cyl Corr Table #2
this.class18_0.class13_u_0.long_185 = 0x652fL; //Injector Table
this.class18_0.class13_u_0.long_186 = 0x6245L; //Gear Corr Table #1
this.class18_0.class13_u_0.long_188 = 0x6244L; //Gear Corr Above VSS
this.class18_0.class13_u_0.long_187 = 0x624bL; //Gear Corr Table #2
this.class18_0.class13_u_0.long_189 = 0x60e5L; //Gear Corr Above Load
this.class18_0.class13_u_0.long_190 = 0x649fL; //Closeloop Table
this.class18_0.class13_u_0.long_192 = 0x613eL; //Idle Ign Corr Enabled
this.class18_0.class13_u_0.long_193 = 0x613fL; //Idle Ign Corr Above ect
this.class18_0.class13_u_0.long_195 = 0x6144L;
this.class18_0.class13_u_0.long_196 = 0x6142L;
this.class18_0.class13_u_0.long_197 = 0x6143L;
this.class18_0.class13_u_0.long_198 = 0x6140L;
this.class18_0.class13_u_0.long_199 = 0x6141L;
this.class18_0.class13_u_0.long_200 = 0x6145L;
this.class18_0.class13_u_0.long_206 = 0x622eL;
this.class18_0.class13_u_0.long_207 = 0x622fL;
this.class18_0.class13_u_0.long_208 = 0x6230L;
this.class18_0.class13_u_0.long_209 = 0x64b7L;
this.class18_0.class13_u_0.long_210 = 0x64abL;
this.class18_0.class13_u_0.long_211 = 0x6284L;
this.class18_0.class13_u_0.long_212 = 0x6286L;
this.class18_0.class13_u_0.long_213 = 0x62f2L;
this.class18_0.class13_u_0.long_215 = 0x62f4L;
this.class18_0.class13_u_0.long_216 = 0x62f1L;
this.class18_0.class13_u_0.long_217 = 0x60fbL;
this.class18_0.class13_u_0.long_218 = 0x630fL;
this.class18_0.class13_u_0.long_219 = 0x6326L;
this.class18_0.class13_u_0.long_220 = 0x623cL;
this.class18_0.class13_u_0.long_221 = 0x66b0L;
this.class18_0.class13_u_0.long_223 = 0x623bL;
this.class18_0.class13_u_0.long_224 = 0x6240L;
this.class18_0.class13_u_0.long_225 = 0x6241L;
this.class18_0.class13_u_0.long_227 = 0x623eL;
this.class18_0.class13_u_0.long_228 = 0x623dL;
this.class18_0.class13_u_0.long_229 = 0x623fL;
this.class18_0.class13_u_0.long_230 = 0x623aL;
this.class18_0.class13_u_0.long_231 = 0x611cL;
this.class18_0.class13_u_0.long_232 = 0x611dL;
this.class18_0.class13_u_0.long_233 = 0x611eL;
this.class18_0.class13_u_0.long_234 = 0x6332L;
this.class18_0.class13_u_0.long_235 = 0x6236L;
this.class18_0.class13_u_0.long_236 = 0x631eL;
this.class18_0.class13_u_0.long_237 = 0x6154L;
this.class18_0.class13_u_0.long_239 = 0x6114L;
this.class18_0.class13_u_0.long_240 = 0x6115L;
this.class18_0.class13_u_0.long_241 = 0x6231L;
this.class18_0.class13_u_0.long_242 = 0x60ecL;
this.class18_0.class13_u_0.long_243 = 0x6233L;
this.class18_0.class13_u_0.long_244 = 0x6234L;
this.class18_0.class13_u_0.long_245 = 0x6791L;
this.class18_0.class13_u_0.long_246 = 0x628dL;
this.class18_0.class13_u_0.long_247 = 0x628eL;
this.class18_0.class13_u_0.long_248 = 0x628fL;
this.class18_0.class13_u_0.long_249 = 0x6290L;
this.class18_0.class13_u_0.long_251 = 0x6295L;
this.class18_0.class13_u_0.long_253 = 0x6292L;
this.class18_0.class13_u_0.long_254 = 0x6294L;
this.class18_0.class13_u_0.long_255 = 0x6293L;
this.class18_0.class13_u_0.long_256 = 0x618aL;
this.class18_0.class13_u_0.long_257 = 0x62a8L;
this.class18_0.class13_u_0.long_258 = 0x629cL;
this.class18_0.class13_u_0.long_259 = 0x62a2L;
this.class18_0.class13_u_0.long_260 = 0x61c2L;
this.class18_0.class13_u_0.long_261 = 0x61acL;
this.class18_0.class13_u_0.long_262 = 0x6196L;
this.class18_0.class13_u_0.long_263 = 0x61d8L;
this.class18_0.class13_u_0.long_264 = 0x6154L;
this.class18_0.class13_u_0.long_265 = 0x610cL;
this.class18_0.class13_u_0.long_266 = 0x6148L;
this.class18_0.class13_u_0.long_267 = 0x62b6L;
this.class18_0.class13_u_0.long_268 = 0x6116L;
this.class18_0.class13_u_0.long_269 = 0x6150L;
this.class18_0.class13_u_0.long_270 = 0x6104L;
this.class18_0.class13_u_0.long_271 = 0x62b8L;
this.class18_0.class13_u_0.long_272 = 0x6299L;
this.class18_0.class13_u_0.long_273 = 0x6298L;
this.class18_0.class13_u_0.long_274 = 0x6297L;
this.class18_0.class13_u_0.long_275 = 0x629aL;
this.class18_0.class13_u_0.long_276 = 0x629bL;
this.class18_0.class13_u_0.long_277 = 0x62b5L;
this.class18_0.class13_u_0.long_279 = 0x62b4L;
this.class18_0.class13_u_0.long_280 = 0x6278L;
this.class18_0.class13_u_0.long_281 = 0x6279L;
this.class18_0.class13_u_0.long_282 = 0x62b9L;
this.class18_0.class13_u_0.long_283 = 0x62baL;
this.class18_0.class13_u_0.long_284 = 0x62bbL;
this.class18_0.class13_u_0.long_285 = 0x62bdL;
this.class18_0.class13_u_0.long_286 = 0x62bcL;
this.class18_0.class13_u_0.long_287 = 0x62c2L;
this.class18_0.class13_u_0.long_288 = 0x62c1L;
this.class18_0.class13_u_0.long_289 = 0x62c0L;
this.class18_0.class13_u_0.long_290 = 0x62bfL;
this.class18_0.class13_u_0.long_291 = 0x62c7L;
this.class18_0.class13_u_0.long_292 = 0x62caL;
this.class18_0.class13_u_0.long_293 = 0x62cbL;
this.class18_0.class13_u_0.long_294 = 0x62c8L;
this.class18_0.class13_u_0.long_295 = 0x62c9L;
this.class18_0.class13_u_0.long_296 = 0x62cdL;
this.class18_0.class13_u_0.long_297 = 0x62ccL;
this.class18_0.class13_u_0.long_298 = 0x62ceL;
this.class18_0.class13_u_0.long_299 = 0x62cfL;
this.class18_0.class13_u_0.long_300 = 0x62d1L;
this.class18_0.class13_u_0.long_301 = 0x62d3L;
this.class18_0.class13_u_0.long_302 = 0x62d4L;
this.class18_0.class13_u_0.long_303 = 0x62d5L;
this.class18_0.class13_u_0.long_304 = 0x62d6L;
this.class18_0.class13_u_0.long_305 = 0x62d7L;
this.class18_0.class13_u_0.long_306 = 0x62d8L;
this.class18_0.class13_u_0.long_307 = 0x62d9L;
this.class18_0.class13_u_0.long_308 = 0x62dbL;
this.class18_0.class13_u_0.long_309 = 0x62daL;
this.class18_0.class13_u_0.long_310 = 0x61e2L;
this.class18_0.class13_u_0.long_311 = 0x61f8L;
this.class18_0.class13_u_0.long_313 = 0x6158L;
this.class18_0.class13_u_0.long_314 = 0x615bL;
this.class18_0.class13_u_0.long_315 = 0x615cL;
this.class18_0.class13_u_0.long_316 = 0x6159L;
this.class18_0.class13_u_0.long_317 = 0x615aL;
this.class18_0.class13_u_0.long_318 = 0x615eL;
this.class18_0.class13_u_0.long_319 = 0x615dL;
this.class18_0.class13_u_0.long_320 = 0x615fL;
this.class18_0.class13_u_0.long_321 = 0x6160L;
this.class18_0.class13_u_0.long_322 = 0x6162L;
this.class18_0.class13_u_0.long_323 = 0x6164L;
this.class18_0.class13_u_0.long_324 = 0x6165L;
this.class18_0.class13_u_0.long_325 = 0x6166L;
this.class18_0.class13_u_0.long_326 = 0x6167L;
this.class18_0.class13_u_0.long_327 = 0x6168L;
this.class18_0.class13_u_0.long_328 = 0x6169L;
this.class18_0.class13_u_0.long_329 = 0x616aL;
this.class18_0.class13_u_0.long_330 = 0x616cL;
this.class18_0.class13_u_0.long_331 = 0x616bL;
this.class18_0.class13_u_0.long_332 = 0x6219L;
this.class18_0.class13_u_0.long_333 = 0x622fL;
this.class18_0.class13_u_0.long_335 = 0x616dL;
this.class18_0.class13_u_0.long_336 = 0x6170L;
this.class18_0.class13_u_0.long_337 = 0x6171L;
this.class18_0.class13_u_0.long_338 = 0x616eL;
this.class18_0.class13_u_0.long_339 = 0x616fL;
this.class18_0.class13_u_0.long_340 = 0x6173L;
this.class18_0.class13_u_0.long_341 = 0x6172L;
this.class18_0.class13_u_0.long_342 = 0x6174L;
this.class18_0.class13_u_0.long_343 = 0x6175L;
this.class18_0.class13_u_0.long_344 = 0x6177L;
this.class18_0.class13_u_0.long_345 = 0x6179L;
this.class18_0.class13_u_0.long_346 = 0x617aL;
this.class18_0.class13_u_0.long_347 = 0x617bL;
this.class18_0.class13_u_0.long_348 = 0x617cL;
this.class18_0.class13_u_0.long_349 = 0x617dL;
this.class18_0.class13_u_0.long_350 = 0x617eL;
this.class18_0.class13_u_0.long_351 = 0x617fL;
this.class18_0.class13_u_0.long_352 = 0x6181L;
this.class18_0.class13_u_0.long_353 = 0x6180L;
this.class18_0.class13_u_0.long_354 = 0x61e2L;
this.class18_0.class13_u_0.long_355 = 0x61f8L;
this.class18_0.class13_u_0.long_357 = 0x62ddL;
this.class18_0.class13_u_0.long_358 = 0x62deL;
this.class18_0.class13_u_0.long_359 = 0x62dfL;
this.class18_0.class13_u_0.long_360 = 0x62e0L;
this.class18_0.class13_u_0.long_361 = 0x62e1L;
this.class18_0.class13_u_0.long_362 = 0x62e3L;
this.class18_0.class13_u_0.long_363 = 0x62e4L;
this.class18_0.class13_u_0.long_364 = 0x62e5L;
this.class18_0.class13_u_0.long_365 = 0x62e8L;
this.class18_0.class13_u_0.long_366 = 0x62e6L;
this.class18_0.class13_u_0.long_367 = 0x62e9L;
this.class18_0.class13_u_0.long_368 = 0x62e7L;
this.class18_0.class13_u_0.long_369 = 0x62eaL;
this.class18_0.class13_u_0.long_370 = 0x614dL;
this.class18_0.class13_u_0.long_371 = 0x614eL;
this.class18_0.class13_u_0.long_372 = 0x614fL;
this.class18_0.class13_u_0.long_373 = 0x6149L;
this.class18_0.class13_u_0.long_377 = 0x60fcL; //lean protect min rpm
this.class18_0.class13_u_0.long_378 = 0x60feL; //lean protect min tps
this.class18_0.class13_u_0.long_379 = 0x6100L; //lean protect
this.class18_0.class13_u_0.long_380 = 0x60ffL; //lean protect
this.class18_0.class13_u_0.long_381 = 0x6101L; //lean protect
this.class18_0.class13_u_0.long_382 = 0x6102L; //lean protect
this.class18_0.class13_u_0.long_383 = 0x6151L; //lean protect
this.class18_0.class13_u_0.long_384 = 0x6103L; //lean protect
this.class18_0.class13_u_0.long_385 = 0x6152L; //lean protect
this.class18_0.class13_u_0.long_386 = 0x6153L; //lean protect
this.class18_0.class13_u_0.long_390 = 0x645bL; //closeloop rate of change
this.class18_0.class13_u_0.long_391 = 0x6333L; //injector phase
this.class18_0.class13_u_0.long_402 = 0x60d0L; //FTS Speed
this.class18_0.class13_u_0.long_420 = 0x62f5L; //ignition cut delay
this.class18_0.class13_u_0.long_421 = 0x6301L; //Ignition Cut Delay (FTL - Launch)
this.class18_0.class13_u_0.long_422 = 0x6302L; //Ignition Cut Delay (FTS)
this.class18_0.class13_u_0.long_423 = 0x6303L; //Ignition Cut Fuel Adding
this.class18_0.class13_u_0.long_424 = 0x6305L; //Ignition Cut Ign retarding
this.class18_0.class13_u_0.long_430 = 0x62f6L; //acs input
this.class18_0.class13_u_0.long_431 = 0x62f7L; //psp input
this.class18_0.class13_u_0.long_432 = 0x62f8L; //scs input
this.class18_0.class13_u_0.long_433 = 0x62f9L; //bkws input
this.class18_0.class13_u_0.long_434 = 0x62faL; //vtp input
this.class18_0.class13_u_0.long_438 = 0x62feL; //locking rpm
this.class18_0.class13_u_0.long_439 = 0x6300L; //antitheft enabled
this.class18_0.class13_u_0.long_440 = 0x6301L; //FTS strain cut active
this.class18_0.class13_u_0.long_450 = 0x6410L; //injector rate of decay1
this.class18_0.class13_u_0.long_451 = 0x6418L; //injector rate of decay2
this.class18_0.class13_u_0.long_452 = 0x6420L; //injector rate of decay3
this.class18_0.class13_u_0.long_453 = 0x6614L; //crank fuel RPM Compensation
this.class18_0.class13_u_0.long_454 = 0x6618L; //crank fuel MAP Compensation
this.class18_0.class13_u_0.long_460 = 0x60b9L; //FlexFuel Ethanol Content
this.class18_0.class13_u_0.long_461 = 0x60a7L; //FlexFuel Fuel - Closeloop
this.class18_0.class13_u_0.long_464 = 0x60c1L; //FlexFuel Ignition - Closeloop
this.class18_0.class13_u_0.long_466 = 0x62fbL; //FlexFuel Input
this.class18_0.class13_u_0.long_472 = 0x6307L; //FTS Ign Mode (Static or vise versa)
this.class18_0.class13_u_0.long_473 = 0x6306L; //FTS Static Ignition Value
this.class18_0.class13_u_0.long_474 = 0x6308L; //Fan Cutout Speed
this.class18_0.class13_u_0.long_475 = 0x6309L; //AC Cutout Speed
this.class18_0.class13_u_0.long_482 = 0x661cL; //Overrun Fuel resume (initial) hondata 4f4b
this.class18_0.class13_u_0.long_483 = 0x662aL; //Overrun Fuel resume (normal) hondata 4f59
this.class18_0.class13_u_0.long_484 = 0x6559L; //Tip-In Fuel (initial) hondata 4ea6
this.class18_0.class13_u_0.long_485 = 0x6547L; //Tip-In Fuel (normal) hondata 4e94
this.class18_0.class13_u_0.long_494 = 0x60a6L; //Ign Cut Mod (With fuel/ign mod or not)
this.class18_0.class13_u_0.long_4Inj = 0x62c6L;
this.class18_0.class13_u_0.long_89 = 0x6076L; //Calibration Area (previous: 0x5f28L; ectune: 0x5f44L)
this.class18_0.class13_u_0.long_493 = 0x60a5L; //Ign Cut Mod (With time millisecond mod or not)
this.class18_0.class13_u_0.long_463 = 0x6091L; //FlexFuel Fuel - Cranking
this.class18_0.class13_u_0.long_512 = 0x62fcL; //FlexFuel Input
this.class18_0.class13_u_0.long_510 = 0x60b9L; //long_324 in HTS used in knock
this.class18_0.class13_u_0.long_511 = 0x60a7L; //long_325 in HTS used in knock
this.class18_0.class13_u_0.long_512 = 0x62fcL; //long_326 in HTS used in knock
this.class18_0.class13_u_0.long_513 = 0x60a7L; //long_327 in HTS used in knock
this.class18_0.class13_u_0.long_514 = 0x60c1L; //long_328 in HTS ** Used in flex Fuel !!!!! **
this.class18_0.class13_u_0.long_520 = 0x60a4L; //rev limiter cutting type
this.class18_0.class13_u_0.long_521 = 0x60a3L; //enable CPR on ALTC
//this.class18_0.class13_u_0.long_522 = 0x0175L; //CPR fully sync when cranking //should reload
//this.class18_0.class13_u_0.long_523 = 0x1508L; //CPR dont fire before sync //should reload
this.class18_0.class13_u_0.long_525 = 0x60e6L; //enable MIL on Ignition Cut
}
//#####################################################################################################################################################
//#####################################################################################################################################################
//#####################################################################################################################################################
//#####################################################################################################################################################
//#####################################################################################################################################################
//#####################################################################################################################################################
/*public void ConvertBaserom()
{
System.Reflection.FieldInfo[] TestInfo = class13_u_0.GetType().GetFields();
foreach (FieldInfo property in TestInfo)
{
Console.WriteLine(property.GetValue(this).ToString());
}
}
private void LoadLocationsSizes()
{
Class13_u class2 = new Class13_u
{
long_6 = 24L, //0x6e59L **This table dont change location**
long_8 = 20L, //0x6e71L **This table dont change location**
long_9 = 20L, //0x6e85L **This table dont change location**
long_10 = 504L, //0x6eadL **This table dont change location**
long_11 = 142L, //0x70a5L **This table dont change location**
long_12 = 93L, //0x729dL **This table dont change location**
long_13 = 120L, //0x747dL **This table dont change location**
long_16 = 20L, //0x6e2fL **This table dont change location**
long_17 = 22L, //0x6e43L **This table dont change location**
long_18 = 24L, //0x6e17L **This table dont change location**
long_20 = 504L, //0x765fL **This table dont change location**
long_21 = 504L, //0x7857L **This table dont change location**
long_22 = 480L, //0x7a4fL **This table dont change location**
long_23 = 480L, //0x7c2fL **This table dont change location**
long_24 = 1L, //0x61a6L
long_25 = 2L, //0x61a8L
long_29 = 20L, //0x6e99L **This table dont change location**
long_31 = 1L, //0x610fL
long_32 = 1L, //0x6110L
long_33 = 2L, //0x6101L
long_34 = 2L, //0x610dL
long_35 = 2L, //0x6103L
long_36 = 2L, //0x6105L
long_37 = 2L, //0x6107L
long_38 = 2L, //0x6109L
long_39 = 2L, //0x610bL
long_43 = 1L, //0x5f4eL
long_44 = 1L, //0x5f4aL
long_46 = 1L, //0x5ffdL
long_47 = 1L, //0x61f3L
long_48 = 1L, //0x620eL
long_49 = 1L, //0x61f4L
long_50 = 1L, //0x61f5L
long_51 = 1L, //0x61f9L
long_53 = 1L, //0x61f6L
long_54 = 1L, //0x5f4dL
long_55 = 1L, //0x5f49L
long_56 = 1L, //0x61f7L
long_58 = 1L, //0x5ffeL
long_59 = 1L, //0x5f46L
long_60 = 1L, //0x5f42L
long_61 = 1L, //0x5f41L
long_62 = 1L, //0x5f43L
long_63 = 8L, //0x664fL **This table dont change location**
long_65 = 1L, //0x61f8L
long_66 = 1L, //0x620bL
long_67 = 1L, //0x620aL
long_71 = 1L, //0x6125L
long_72 = 1L, //0x6126L
long_76 = 1L, //0x616fL
long_77 = 1L, //0x619aL
long_78 = 1L, //0x61a7L
long_79 = 1L, //0x5ffcL
long_80 = 1L, //0x61ceL
long_83 = 13L, //0x5f8fL
long_85 = 1L, //0x5f9cL
long_88 = 1L, //0x5f4fL
long_89 = 2L, //0x5f44L
long_95 = 1L, //0x61d8L
long_100 = 1L, //0x61fdL
long_101 = 1L, //0x6202L
long_103 = 1L, //0x616bL
long_104 = 1L, //0x616cL
long_105 = 1L, //0x616dL
long_106 = 1L, //0x616eL
long_110 = 1L, //0x616fL
long_111 = 1L, //0x61bfL
long_112 = 1L, //0x6200L
long_113 = 6L, //0x6203L
long_114 = 1L, //0x6138L
long_115 = 1L, //0x6139L
long_116 = 1L, //0x5f50L
long_117 = 1L, //0x6142L
long_118 = 1L, //0x6143L
long_119 = 12L, //0x6144L
long_121 = 2L, //0x613eL
long_122 = 2L, //0x6140L
long_123 = 1L, //0x613aL
long_124 = 2L, //0x613bL
long_125 = 1L, //0x613dL
long_126 = 1L, //0x6150L
long_127 = 1L, //0x6151L
long_128 = 1L, //0x615eL
long_129 = 1L, //0x615fL
long_130 = 1L, //0x615dL
long_131 = 1L, //0x619bL
long_132 = 1L, //0x5ffbL
long_133 = 1L, //0x5ffaL
long_135 = 4L, //0x5f77L
long_136 = 2L, //0x5fa5L
long_137 = 1L, //0x6152L
long_138 = 1L, //0x6153L
long_139 = 1L, //0x6155L
long_140 = 2L, //0x6156L
long_141 = 1L, //0x6158L
long_142 = 5L, //0x61cfL
long_143 = 2L, //0x6165L
long_144 = 1L, //0x6154L
long_147 = 1L, //0x6159L
long_148 = 1L, //0x615aL
long_149 = 1L, //0x615bL
long_150 = 12L, //0x5f80L
long_151 = 1L, //0x5f7eL
long_152 = 1L, //0x5f7fL
long_153 = 1L, //0x5f59L
long_154 = 1L, //0x5f58L
long_155 = 2L, //0x5f56L
long_156 = 1L, //0x5f55L
long_157 = 1L, //0x6164L
long_158 = 1L, //0x6160L
long_159 = 2L, //0x6161L
long_160 = 1L, //0x6163L
long_162 = 2L, //0x5f8dL
long_163 = 1L, //0x5f8cL
long_171 = 1L, //0x5f54L
long_172 = 1L, //0x5f53L
long_173 = 2L, //0x5f51L
long_174 = 27L, //0x62a2L **This table dont change location**
long_175 = 24L, //0x6ab6L **This table dont change location**
long_176 = 72L, //0x622eL **This table dont change location**
long_177 = 28L, //0x6a96L **This table dont change location**
long_178 = 27L, //0x630bL **This table dont change location**
long_179 = 27L, //0x6518L **This table dont change location**
long_180 = 1L, //0x611bL
long_181 = 1L, //0x611cL
long_183 = 4L, //0x6426L **This table dont change location**
long_184 = 1L, //0x6134L
long_185 = 24L, //0x6442L **This table dont change location**
long_186 = 6L, //0x6128L
long_187 = 6L, //0x612eL
long_188 = 1L, //0x6127L
long_189 = 2L, //0x5f44L
long_190 = 12L, //0x63b2L **This table dont change location**
long_191 = 16L, //0x6aecL **This table dont change location**
long_192 = 1L, //0x5f9dL
long_193 = 7L, //0x5f9eL
//long_194 = 4L, //0x649cL **This table dont change location**
long_201 = 42L, //0x6b7dL **This table dont change location**
long_202 = 6L, //0x6b77L **This table dont change location**
long_203 = 8L, //0x6ba7L **This table dont change location**
long_204 = 13L, //0x6b6aL **This table dont change location**
long_205 = 14L, //0x6b5cL **This table dont change location**
long_206 = 1L, //0x6111L
long_207 = 1L, //0x6112L
long_208 = 1L, //0x6113L
long_209 = 12L, //0x63caL **This table dont change location**
long_210 = 12L, //0x63beL **This table dont change location**
long_211 = 2L, //0x6167L
long_212 = 2L, //0x6169L
long_213 = 2L, //0x61d5L
long_215 = 1L, //0x61d7L
long_216 = 1L, //0x61d4L
long_217 = 1L, //0x5f5aL
long_218 = 1L, //0x61f2L
long_219 = 1L, //0x6209L
long_220 = 1L, //0x611fL
long_221 = 52L, //0x6657L **This table dont change location**
long_223 = 1L, //0x611eL
long_224 = 1L, //0x6123L
long_225 = 1L, //0x6124L
long_227 = 1L, //0x6121L
long_228 = 1L, //0x6120L
long_229 = 1L, //0x6122L
long_230 = 1L, //0x611dL
long_231 = 1L, //0x5f7bL
long_232 = 1L, //0x5f7cL
long_233 = 1L, //0x5f7dL
long_234 = 1L, //0x6215L **This table dont change location**
long_235 = 1L, //0x6119L
long_236 = 1L, //0x6201L
long_237 = 4L, //0x5fc9L
long_239 = 1L, //0x5f73L
long_240 = 1L, //0x5f74L
long_241 = 2L, //0x6114L
long_242 = 2L, //0x5f4bL
long_243 = 1L, //0x6116L
long_244 = 2L, //0x6117L
long_245 = 42L, //0x6738L **This table dont change location**
long_246 = 1L, //0x6170L
long_247 = 1L, //0x6171L
long_248 = 1L, //0x6172L
long_249 = 2L, //0x6173L
long_251 = 2L, //0x6178L
long_253 = 1L, //0x6175L
long_254 = 1L, //0x6177L
long_255 = 1L, //0x6176L
long_256 = 12L, //0x5fffL
long_257 = 12L, //0x618bL
long_258 = 6L, //0x617fL
long_259 = 6L, //0x6185L
long_260 = 22L, //0x6037L
long_261 = 22L, //0x6021L
long_262 = 22L, //0x600bL
long_263 = 10L, //0x604dL
long_264 = 22L, //0x5fb3L
long_265 = 8L, //0x5f6bL
long_266 = 1L, //0x5fa7L
long_267 = 1L, //0x6199L
long_268 = 2L, //0x5f75L
long_269 = 1L, //0x5fafL
long_270 = 8L, //0x5f63L
long_271 = 1L, //0x619bL
long_272 = 1L, //0x617cL
long_273 = 1L, //0x617bL
long_274 = 1L, //0x617aL
long_275 = 1L, //0x617dL
long_276 = 1L, //0x617eL
long_277 = 1L, //0x6198L
long_279 = 1L, //0x6197L
long_280 = 1L, //0x615bL
long_281 = 1L, //0x615cL
long_282 = 1L, //0x619cL
long_283 = 1L, //0x619dL
long_284 = 1L, //0x619eL
long_285 = 2L, //0x61a0L
long_286 = 1L, //0x619fL
long_287 = 1L, //0x61a5L
long_288 = 1L, //0x61a4L
long_289 = 1L, //0x61a3L
long_290 = 1L, //0x61a2L
long_291 = 1L, //0x61aaL
long_292 = 1L, //0x61adL
long_293 = 1L, //0x61aeL
long_294 = 1L, //0x61abL
long_295 = 1L, //0x61acL
long_296 = 1L, //0x61b0L
long_297 = 1L, //0x61afL
long_298 = 1L, //0x61b1L
long_299 = 2L, //0x61b2L
long_300 = 2L, //0x61b4L
long_301 = 1L, //0x61b6L
long_302 = 1L, //0x61b7L
long_303 = 1L, //0x61b8L
long_304 = 1L, //0x61b9L
long_305 = 1L, //0x61baL
long_306 = 1L, //0x61bbL
long_307 = 1L, //0x61bcL
long_308 = 1L, //0x61beL
long_309 = 1L, //0x61bdL
long_310 = 22L, //0x6057L
long_311 = 33L, //0x606dL
long_313 = 1L, //0x5fcdL
long_314 = 1L, //0x5fd0L
long_315 = 1L, //0x5fd1L
long_316 = 1L, //0x5fceL
long_317 = 1L, //0x5fcfL
long_318 = 1L, //0x5fd3L
long_319 = 1L, //0x5fd2L
long_320 = 1L, //0x5fd4L
long_321 = 2L, //0x5fd5L
long_322 = 2L, //0x5fd7L
long_323 = 1L, //0x5fd9L
long_324 = 1L, //0x5fdaL
long_325 = 1L, //0x5fdbL
long_326 = 1L, //0x5fdcL
long_327 = 1L, //0x5fddL
long_328 = 1L, //0x5fdeL
long_329 = 1L, //0x5fdfL
long_330 = 1L, //0x5fe1L
long_331 = 1L, //0x5fe0L
long_332 = 22L, //0x608eL
long_333 = 33L, //0x60a4L
long_335 = 1L, //0x5fe2L
long_336 = 1L, //0x5fe5L
long_337 = 1L, //0x5fe6L
long_338 = 1L, //0x5fe3L
long_339 = 1L, //0x5fe4L
long_340 = 1L, //0x5fe8L
long_341 = 1L, //0x5fe7L
long_342 = 1L, //0x5fe9L
long_343 = 2L, //0x5feaL
long_344 = 2L, //0x5fecL
long_345 = 1L, //0x5feeL
long_346 = 1L, //0x5fefL
long_347 = 1L, //0x5ff0L
long_348 = 1L, //0x5ff1L
long_349 = 1L, //0x5ff2L
long_350 = 1L, //0x5ff3L
long_351 = 1L, //0x5ff4L
long_352 = 1L, //0x5ff6L
long_353 = 1L, //0x5ff5L
long_354 = 22L, //0x60c5L
long_355 = 38L, //0x60dbL
long_357 = 1L, //0x61c0L
long_358 = 1L, //0x61c1L
long_359 = 1L, //0x61c2L
long_360 = 1L, //0x61c3L
long_361 = 2L, //0x61c4L
long_362 = 1L, //0x61c6L
long_363 = 1L, //0x61c7L
long_364 = 1L, //0x61c8L
long_365 = 1L, //0x61cbL
long_366 = 1L, //0x61c9L
long_367 = 1L, //0x61ccL
long_368 = 1L, //0x61caL
long_369 = 1L, //0x61cdL
long_370 = 1L, //0x5facL
long_371 = 1L, //0x5fadL
long_372 = 1L, //0x5faeL
long_373 = 4L, //0x5fa8L
long_374 = 14L, //0x6a7aL **This table dont change location**
long_375 = 16L, //0x6a56L **This table dont change location**
long_376 = 20L, //0x6a66L **This table dont change location**
long_377 = 2L, //0x5f5bL
long_378 = 1L, //0x5f5dL
long_379 = 1L, //0x5f5fL
long_380 = 1L, //0x5f5eL
long_381 = 1L, //0x5f60L
long_382 = 1L, //0x5f61L
long_383 = 1L, //0x5fb0L
long_384 = 1L, //0x5f62L
long_385 = 1L, //0x5fb1L
long_386 = 1L, //0x5fb2L
long_390 = 24L, //0x633eL **This table dont change location**
long_391 = 6L, //0x6216L **This table dont change location**
long_420 = 1L, //0x61d8L
long_421 = 1L, //0x61e4L
long_422 = 1L, //0x61e5L
long_423 = 2L, //0x61e6L
long_424 = 1L, //0x61e8L
long_430 = 1L, //0x61d9L
long_431 = 1L, //0x61daL
long_432 = 1L, //0x61dbL
long_433 = 1L, //0x61dcL
long_434 = 4L, //0x61ddL
long_438 = 2L, //0x61e1L
long_439 = 1L, //0x61e3L
long_440 = 1L, //0x61e4L
long_450 = 8L, //0x62f3L **This table dont change location**
long_451 = 8L, //0x62fbL **This table dont change location**
long_452 = 8L, //0x6303L **This table dont change location**
long_453 = 4L, //0x6533L **This table dont change location**
long_454 = 4L, //0x6537L **This table dont change location**
//long_471 = 1L, //0x61e8L
long_472 = 1L, //0x61eaL
long_473 = 1L, //0x61e9L
long_474 = 1L, //0x61ebL
long_475 = 5L, //0x61ecL
long_480 = 35L, //0x6afcL **This table dont change location**
long_481 = 16L, //0x6aecL **This table dont change location**
long_482 = 14L, //0x653bL **This table dont change location**
long_483 = 42L, //0x6549L **This table dont change location**
long_484 = 30L, //0x646cL **This table dont change location**
long_485 = 18L, //0x645aL **This table dont change location**
long_4Inj = 0x61a9L,
long_4PASS = 0x5ea6L //0x5ea6L **This table dont change location**
};
this.class18_0.class13_0_Sizes = class2;
}*/
}

663
Class33_Sensors.cs Normal file
View File

@ -0,0 +1,663 @@
using Data;
using System;
using System.Drawing;
using System.ComponentModel;
using System.Windows.Forms;
internal class Class33_Sensors
{
private Class10_settings class10_settings_0;
private Class18 class18_0;
public int VSS;
public int RPM;
public double InjDurr;
public long InjDuty;
public double InjFV;
public long Frame;
public string Duration;
public long Interval;
public double IATFC;
public double O2Short;
public double O2Long;
public int Gear;
public double Map;
public double Boost;
public int PA;
public int TPS;
public double TPSV;
public double IgnFinal;
public double IgnTable;
public int ECT;
public int IAT;
public double AFR;
public double EcuO2V;
public double WBV;
public double BatV;
public double ELDV;
public double KnockV;
public double MapV;
public bool MIL;
public double ECTFc;
public double VEFc;
public double ECTIc;
public double IATIc;
public double GearIc;
public double GearFc;
public bool PostFuel;
public bool OutIAB;
public bool OutVTS;
public bool OutVTSM;
public bool OutAC;
public bool OutO2H;
public bool OutMIL;
public bool OutPurge;
public bool OutFanC;
public bool OutFPump;
public bool OutFCut;
public bool OutAltCtrl;
public bool InPSP;
public bool InSCC;
public bool InACCs;
public bool InBKSW;
public bool InVTP;
public bool InVTSFB;
public bool InParkN;
public bool InStartS;
public bool InATShift1;
public bool InATShift2;
public bool SecMap;
public bool InFTL;
public bool ActiveFTL;
public bool InFTS;
public bool ActiveFTS;
public bool ActiveBstCut;
public bool ActiveOverHeat;
public bool ActiveAntilag;
public bool ICut;
public bool SCCChecker;
public bool InEBC;
public bool InEBCHi;
public bool ActiveEBC;
public double EBCBaseDuty;
public double EBCDuty;
public double EBCTarget;
public double EBCCurrent;
public bool InGPO1;
public bool OutGPO1;
public bool InGPO2;
public bool OutGPO2;
public bool InGPO3;
public bool OutGPO3;
public bool FanC;
public bool BSTS2;
public bool BSTS3;
public bool BSTS4;
public bool ActiveBST;
public bool InBST;
public bool LeanProtect;
public double Analog1;
public double Analog2;
public double Analog3;
public int IACVDuty;
public double AccelTime;
public double FuelUsage;
public double FlexFuel;
public double EGRV;
public double B6V;
public double ECTV;
public double IATV;
public Class33_Sensors(ref Class18 class18_1)
{
class18_0 = class18_1;
class10_settings_0 = class18_0.class10_settings_0;
this.class18_0.class17_0.delegate54_0 += new Class17.Delegate54(this.LoadSensorsData);
}
public void LoadSensorsData(Struct12 struct12_0)
{
if (this.class18_0.method_30_HasFileLoadedInBMTune())
{
this.method_10(SensorsX.rpmX, (long)struct12_0.ushort_0_E6_7);
this.method_9(SensorsX.ectX, struct12_0.byte_0);
this.method_9(SensorsX.iatX, struct12_0.byte_1);
this.method_9(SensorsX.tpsX, struct12_0.byte_5);
this.method_9(SensorsX.tpsV, struct12_0.byte_5);
this.method_9(SensorsX.ignFnl, struct12_0.byte_15_E19);
this.method_9(SensorsX.ignTbl, struct12_0.byte_16_E20);
this.method_9(SensorsX.vssX, struct12_0.byte_14_E16);
this.method_9(SensorsX.gearX, struct12_0.byte_20);
this.method_10(SensorsX.injFV, (long)struct12_0.ushort_1_E17_18);
this.method_10(SensorsX.injDur, (long)struct12_0.ushort_1_E17_18);
this.method_10(SensorsX.injDuty, (long)struct12_0.ushort_1_E17_18);
this.method_9(SensorsX.ecuO2V, struct12_0.byte_2);
this.method_9(SensorsX.wbO2V, struct12_0.byte_43);
this.method_9(SensorsX.afr, struct12_0.byte_43);
this.method_9(SensorsX.mapV, struct12_0.byte_4);
this.method_9(SensorsX.mapX, struct12_0.byte_4);
this.method_9(SensorsX.boostX, struct12_0.byte_4);
this.method_9(SensorsX.paX, struct12_0.byte_3);
this.method_10(SensorsX.frame, struct12_0.long_5);
this.method_10(SensorsX.interval, struct12_0.long_4);
this.method_10(SensorsX.duration, struct12_0.long_3);
this.method_9(SensorsX.mil, struct12_0.byte_19);
this.method_9(SensorsX.batV, struct12_0.byte_27_E25);
this.method_9(SensorsX.eldV, struct12_0.byte_24_E24);
this.method_9(SensorsX.outAc, struct12_0.byte_22_E22);
this.method_9(SensorsX.outPurge, struct12_0.byte_22_E22);
this.method_9(SensorsX.outFanc, struct12_0.byte_22_E22);
this.method_9(SensorsX.outFpump, struct12_0.byte_22_E22);
this.method_9(SensorsX.outIab, struct12_0.byte_22_E22);
this.method_9(SensorsX.outAltCtrl, struct12_0.byte_22_E22);
this.method_9(SensorsX.outVtsX, struct12_0.byte_23_E23);
this.method_9(SensorsX.outMil, struct12_0.byte_23_E23);
this.method_9(SensorsX.outO2h, struct12_0.byte_23_E23);
this.method_9(SensorsX.outVtsM, struct12_0.byte_6_E8);
this.method_9(SensorsX.inVtsFeedBack, struct12_0.byte_21_E21);
this.method_9(SensorsX.outFuelCut, struct12_0.byte_6_E8);
this.method_9(SensorsX.inAccs, struct12_0.byte_21_E21);
this.method_9(SensorsX.inVtp, struct12_0.byte_21_E21);
this.method_9(SensorsX.inStartS, struct12_0.byte_21_E21);
this.method_9(SensorsX.inBksw, struct12_0.byte_21_E21);
this.method_9(SensorsX.inParkN, struct12_0.byte_21_E21);
this.method_9(SensorsX.inAtShift1, struct12_0.byte_6_E8);
this.method_9(SensorsX.inAtShift2, struct12_0.byte_6_E8);
this.method_9(SensorsX.inPsp, struct12_0.byte_21_E21);
this.method_9(SensorsX.inSCC, struct12_0.byte_21_E21);
this.method_10(SensorsX.iacvDuty, struct12_0.ushort_2_E49_50);
this.method_9(SensorsX.postFuel, struct12_0.byte_6_E8);
this.method_9(SensorsX.ectFc, struct12_0.byte_28_E26);
this.method_10(SensorsX.o2Short, struct12_0.long_0_E27_28);
this.method_10(SensorsX.o2Long, struct12_0.long_1_E29_30);
this.method_10(SensorsX.iatFc, struct12_0.long_2_E31_32);
this.method_9(SensorsX.veFc, struct12_0.byte_29_E33);
this.method_9(SensorsX.iatIc, struct12_0.byte_30_E34);
this.method_9(SensorsX.ectIc, struct12_0.byte_31_E35);
this.method_9(SensorsX.gearIc, struct12_0.byte_32_E36);
this.method_9(SensorsX.gearFc, struct12_0.byte_33_E37);
this.method_9(SensorsX.ftsClutchInput, struct12_0.byte_34_E38);
this.method_9(SensorsX.ftlInput, struct12_0.byte_34_E38);
this.method_9(SensorsX.gpo1_in, struct12_0.byte_34_E38);
this.method_9(SensorsX.gpo2_in, struct12_0.byte_34_E38);
this.method_9(SensorsX.gpo3_in, struct12_0.byte_34_E38);
this.method_9(SensorsX.bstInput, struct12_0.byte_34_E38);
this.method_9(SensorsX.ftlActive, struct12_0.byte_35_E39);
this.method_9(SensorsX.ftsActive, struct12_0.byte_35_E39);
this.method_9(SensorsX.antilagActive, struct12_0.byte_35_E39);
this.method_9(SensorsX.boostcutActive, struct12_0.byte_35_E39);
this.method_9(SensorsX.ignitionCut, struct12_0.byte_6_E8);
this.method_9(SensorsX.sccChecker, struct12_0.byte_6_E8);
this.method_9(SensorsX.gpo1_out, struct12_0.byte_36_E43);
this.method_9(SensorsX.gpo2_out, struct12_0.byte_36_E43);
this.method_9(SensorsX.gpo3_out, struct12_0.byte_36_E43);
this.method_9(SensorsX.bstStage2, struct12_0.byte_36_E43);
this.method_9(SensorsX.bstStage3, struct12_0.byte_36_E43);
this.method_9(SensorsX.bstStage4, struct12_0.byte_36_E43);
this.method_9(SensorsX.overheatActive, struct12_0.byte_36_E43);
this.method_9(SensorsX.leanProtection, struct12_0.byte_36_E43);
this.method_9(SensorsX.fanCtrl, struct12_0.byte_35_E39);
this.method_9(SensorsX.bstActive, struct12_0.byte_35_E39);
this.method_9(SensorsX.secMaps, struct12_0.byte_35_E39);
this.method_9(SensorsX.ebcActive, struct12_0.byte_35_E39);
this.method_9(SensorsX.ebcInput, struct12_0.byte_34_E38);
this.method_9(SensorsX.ebcHiInput, struct12_0.byte_34_E38);
this.method_9(SensorsX.ebcDutyX, struct12_0.byte_38_E41);
this.method_9(SensorsX.ebcBaseDuty, struct12_0.byte_37_E40);
this.method_9(SensorsX.ebcCurrent, struct12_0.byte_4);
this.method_9(SensorsX.ebcTarget, struct12_0.byte_39_E42);
this.method_9(SensorsX.analog1, struct12_0.byte_40);
this.method_9(SensorsX.analog2, struct12_0.byte_41);
this.method_9(SensorsX.analog3, struct12_0.byte_42);
this.method_9(SensorsX.accelTime, struct12_0.byte_14_E16);
this.method_10(SensorsX.fuelUsage, struct12_0.ushort_1_E17_18);
this.method_9(SensorsX.egrV, struct12_0.byte_25_E44);
this.method_9(SensorsX.b6V, struct12_0.byte_26_E45);
this.method_9(SensorsX.ectV, struct12_0.byte_0);
this.method_9(SensorsX.iatV, struct12_0.byte_1);
this.method_9(SensorsX.flexFuel, GetFlexFuelByte(struct12_0));
}
}
public byte GetFlexFuelByte(Struct12 struct12_0)
{
switch (this.class18_0.GetByteAt(this.class18_0.class13_u_0.long_466))
{
case 0xff:
return 0;
case 0:
return 0;
case 2:
return struct12_0.byte_24_E24;
case 3:
return struct12_0.byte_25_E44;
case 4:
return struct12_0.byte_26_E45;
}
return 0;
}
private double ConvertBooltoDouble(bool IsActivated)
{
double RDouble = 0;
if (IsActivated) RDouble = 1;
return RDouble;
}
private void method_10(SensorsX sensors_0, long long_0)
{
try
{
if (sensors_0 == SensorsX.iacvDuty) IACVDuty = (int)((((long_0 / 32768.0) * 100.0) - 100.0));
if (sensors_0 == SensorsX.rpmX) RPM = this.class18_0.method_218(long_0);
if (sensors_0 == SensorsX.injDur) InjDurr = (double)this.class18_0.method_224((int)long_0);
if (sensors_0 == SensorsX.injDuty) InjDuty = (long)this.class18_0.method_225((int)long_0, RPM, 0);
if (sensors_0 == SensorsX.injFV) InjFV = this.class18_0.method_223((int)long_0);
if (sensors_0 == SensorsX.frame) Frame = long_0;
if (sensors_0 == SensorsX.duration)
{
Duration = TimeSpan.FromMilliseconds((double)long_0).ToString();
if (Duration.Length <= 8)
{
Duration = Duration + ".000";
return;
}
Duration = Duration.Remove(Duration.Length - 5, 5);
}
if (sensors_0 == SensorsX.interval) Interval = long_0;
if (sensors_0 == SensorsX.iatFc) IATFC = this.class18_0.method_203(long_0, Enum6.const_0);
if (sensors_0 == SensorsX.o2Short) O2Short = this.class18_0.method_203(long_0, Enum6.const_0);
if (sensors_0 == SensorsX.o2Long) O2Long = this.class18_0.method_203(long_0, Enum6.const_0);
if (sensors_0 == SensorsX.fuelUsage) FuelUsage = this.class18_0.GetInstantConsumption(VSS, RPM, (int)long_0);
}
catch { }
}
private void method_9(SensorsX sensors_0, byte byte_0)
{
try
{
if (sensors_0 == SensorsX.vssX) VSS = this.class18_0.method_197(byte_0);
if (sensors_0 == SensorsX.gearX) Gear = byte_0;
if (sensors_0 == SensorsX.mapX) Map = this.class18_0.method_193(byte_0);
if (sensors_0 == SensorsX.boostX) {
if (this.class18_0.method_206(byte_0) <= this.class10_settings_0.int_6) Boost = 0;
else Boost = this.class18_0.method_193(byte_0);
}
if (sensors_0 == SensorsX.paX) PA = (int)Math.Round((double)((((byte_0 / 2) + 0x18) * 7.221) - 59.0), 0);
if (sensors_0 == SensorsX.tpsX) TPS = this.class18_0.method_198(byte_0);
if (sensors_0 == SensorsX.tpsV) TPSV = this.class18_0.method_196(byte_0);
if (sensors_0 == SensorsX.ignFnl) IgnFinal = this.class18_0.method_188(byte_0);
if (sensors_0 == SensorsX.ignTbl) IgnTable = this.class18_0.method_188(byte_0);
if (sensors_0 == SensorsX.ectX) ECT = (int) this.class18_0.method_191(byte_0);
if (sensors_0 == SensorsX.iatX) IAT = (int) this.class18_0.method_191(byte_0);
if(sensors_0 == SensorsX.afr) AFR = this.class18_0.method_200(byte_0);
if (sensors_0 == SensorsX.ecuO2V) EcuO2V = this.class18_0.method_196(byte_0);
if (sensors_0 == SensorsX.wbO2V) WBV = this.class18_0.method_196(byte_0);
if (sensors_0 == SensorsX.batV) BatV = this.class18_0.method_208(byte_0);
if (sensors_0 == SensorsX.eldV) ELDV = this.class18_0.method_196(byte_0);
if (sensors_0 == SensorsX.knockV) KnockV = this.class18_0.method_196(byte_0);
if (sensors_0 == SensorsX.mapV) MapV = this.class18_0.method_196(byte_0);
if (sensors_0 == SensorsX.mil) MIL = (byte_0 == 1);
if (sensors_0 == SensorsX.ectFc) ECTFc = this.class18_0.method_205(byte_0, Enum6.const_1);
if (sensors_0 == SensorsX.veFc) VEFc = this.class18_0.method_205(byte_0, Enum6.const_1);
if (sensors_0 == SensorsX.ectIc) ECTIc = this.class18_0.method_189(byte_0);
if (sensors_0 == SensorsX.iatIc) IATIc = this.class18_0.method_189(byte_0);
if (sensors_0 == SensorsX.gearIc) GearIc = this.class18_0.method_189(byte_0);
if (sensors_0 == SensorsX.gearFc) GearFc = this.class18_0.method_205(byte_0, Enum6.const_1);
if (sensors_0 == SensorsX.postFuel) PostFuel = this.class18_0.method_258(byte_0, 0);
if (sensors_0 == SensorsX.outIab) OutIAB = this.class18_0.method_258(byte_0, 2);
if (sensors_0 == SensorsX.outVtsX) OutVTS = this.class18_0.method_258(byte_0, 7);
if (sensors_0 == SensorsX.outVtsM) OutVTSM = this.class18_0.method_258(byte_0, 3);
if (sensors_0 == SensorsX.outAc) OutAC = this.class18_0.method_258(byte_0, 7);
if (sensors_0 == SensorsX.outO2h) OutO2H = this.class18_0.method_258(byte_0, 6);
if (sensors_0 == SensorsX.outMil) OutMIL = this.class18_0.method_258(byte_0, 5);
if (sensors_0 == SensorsX.outPurge) OutPurge = this.class18_0.method_258(byte_0, 6);
if (sensors_0 == SensorsX.outFanc) OutFanC = this.class18_0.method_258(byte_0, 4);
if (sensors_0 == SensorsX.outFpump) OutFPump = this.class18_0.method_258(byte_0, 0);
if (sensors_0 == SensorsX.outFuelCut) OutFCut = (this.class18_0.method_258(byte_0, 4) || this.class18_0.method_258(byte_0, 5));
if (sensors_0 == SensorsX.outAltCtrl) OutAltCtrl = this.class18_0.method_258(byte_0, 5);
if (sensors_0 == SensorsX.inPsp) InPSP = this.class18_0.method_258(byte_0, 7);
if (sensors_0 == SensorsX.inSCC) InSCC = this.class18_0.method_258(byte_0, 5);
if (sensors_0 == SensorsX.inAccs) InACCs = this.class18_0.method_258(byte_0, 2);
if (sensors_0 == SensorsX.inBksw) InBKSW = this.class18_0.method_258(byte_0, 1);
if (sensors_0 == SensorsX.inVtp) InVTP = this.class18_0.method_258(byte_0, 3);
if (sensors_0 == SensorsX.inVtsFeedBack) InVTSFB = this.class18_0.method_258(byte_0, 6);
if (sensors_0 == SensorsX.inParkN) InParkN = this.class18_0.method_258(byte_0, 0);
if (sensors_0 == SensorsX.inStartS) InStartS = this.class18_0.method_258(byte_0, 4);
if (sensors_0 == SensorsX.inAtShift1) InATShift1 = this.class18_0.method_258(byte_0, 6);
if (sensors_0 == SensorsX.inAtShift2) InATShift2 = this.class18_0.method_258(byte_0, 7);
if (sensors_0 == SensorsX.secMaps) SecMap = this.class18_0.method_258(byte_0, 5);
if (sensors_0 == SensorsX.ftlInput) InFTL = this.class18_0.method_258(byte_0, 0);
if (sensors_0 == SensorsX.ftlActive) ActiveFTL = this.class18_0.method_258(byte_0, 0);
if (sensors_0 == SensorsX.ftsClutchInput) InFTS = this.class18_0.method_258(byte_0, 1);
if (sensors_0 == SensorsX.ftsActive) ActiveFTS = this.class18_0.method_258(byte_0, 2);
if (sensors_0 == SensorsX.boostcutActive) ActiveBstCut = this.class18_0.method_258(byte_0, 3);
if (sensors_0 == SensorsX.overheatActive) ActiveOverHeat = this.class18_0.method_258(byte_0, 6);
if (sensors_0 == SensorsX.antilagActive) ActiveAntilag = this.class18_0.method_258(byte_0, 1);
if (sensors_0 == SensorsX.ignitionCut) ICut = this.class18_0.method_258(byte_0, 2);
if (sensors_0 == SensorsX.sccChecker) SCCChecker = this.class18_0.method_258(byte_0, 1);
if (sensors_0 == SensorsX.ebcInput) InEBC = this.class18_0.method_258(byte_0, 2);
if (sensors_0 == SensorsX.ebcHiInput) InEBCHi = this.class18_0.method_258(byte_0, 3);
if (sensors_0 == SensorsX.ebcActive) ActiveEBC = this.class18_0.method_258(byte_0, 4);
if (sensors_0 == SensorsX.ebcBaseDuty) EBCBaseDuty = this.class18_0.method_207(byte_0);
if (sensors_0 == SensorsX.ebcDutyX) EBCDuty = this.class18_0.method_207(byte_0);
if (sensors_0 == SensorsX.ebcTarget) EBCTarget = this.class18_0.method_245(this.class18_0.method_206(byte_0));
if (sensors_0 == SensorsX.ebcCurrent) EBCCurrent = this.class18_0.method_245(this.class18_0.method_206(byte_0));
if (sensors_0 == SensorsX.gpo1_in) InGPO1 = this.class18_0.method_258(byte_0, 4);
if (sensors_0 == SensorsX.gpo1_out) OutGPO1 = this.class18_0.method_258(byte_0, 0);
if (sensors_0 == SensorsX.gpo2_in) InGPO2 = this.class18_0.method_258(byte_0, 5);
if (sensors_0 == SensorsX.gpo2_out) OutGPO2 = this.class18_0.method_258(byte_0, 1);
if (sensors_0 == SensorsX.gpo3_in) InGPO3 = this.class18_0.method_258(byte_0, 6);
if (sensors_0 == SensorsX.gpo3_out) OutGPO3 = this.class18_0.method_258(byte_0, 2);
if (sensors_0 == SensorsX.fanCtrl) FanC = this.class18_0.method_258(byte_0, 6);
if (sensors_0 == SensorsX.bstStage2) BSTS2 = this.class18_0.method_258(byte_0, 3);
if (sensors_0 == SensorsX.bstStage3) BSTS3 = this.class18_0.method_258(byte_0, 4);
if (sensors_0 == SensorsX.bstStage4) BSTS4 = this.class18_0.method_258(byte_0, 5);
if (sensors_0 == SensorsX.bstActive) ActiveBST = this.class18_0.method_258(byte_0, 7);
if (sensors_0 == SensorsX.bstInput) InBST = this.class18_0.method_258(byte_0, 7);
if (sensors_0 == SensorsX.leanProtection) LeanProtect = this.class18_0.method_258(byte_0, 7);
if ((this.class10_settings_0.bool_36) && sensors_0 == SensorsX.analog1) Analog1 = this.class18_0.method_201(AnalogInputs.analog1, byte_0);
if ((this.class10_settings_0.bool_38) && sensors_0 == SensorsX.analog2) Analog2 = this.class18_0.method_201(AnalogInputs.analog2, byte_0);
if ((this.class10_settings_0.bool_40) && sensors_0 == SensorsX.analog3) Analog3 = this.class18_0.method_201(AnalogInputs.analog3, byte_0);
if (sensors_0 == SensorsX.accelTime) AccelTime = this.class18_0.AccelTime(this.class18_0.method_197(byte_0));
if (sensors_0 == SensorsX.egrV) EGRV = this.class18_0.method_196(byte_0);
if (sensors_0 == SensorsX.b6V) B6V = this.class18_0.method_196(byte_0);
if (sensors_0 == SensorsX.ectV)
{
ECTV = (5.0 - ((this.class18_0.method_191_GetTempInC(byte_0) + 40.0) / 36.0));
//################
//Calc Difference from 3.72v
double Diff372v = ECTV - 3.72;
if (Diff372v > 0) ECTV += (Diff372v / 3.2);
if (Diff372v < 0) ECTV -= (-Diff372v / 4.2);
//################
}
if (sensors_0 == SensorsX.iatV)
{
IATV = (5.0 - ((this.class18_0.method_191_GetTempInC(byte_0) + 40.0) / 36.0));
//################
//Calc Difference from 3.72v
double Diff372v = IATV - 3.72;
if (Diff372v > 0) IATV += (Diff372v / 3.2);
if (Diff372v < 0) IATV -= (-Diff372v / 4.2);
//################
}
if (sensors_0 == SensorsX.flexFuel) FlexFuel = (this.class18_0.method_196(byte_0) * 100.0) / 5.0;
}
catch { }
}
public double GetSensors_VALUE(SensorsX sensors_0)
{
double ThisValue = 0;
if (sensors_0 == SensorsX.iacvDuty) ThisValue = IACVDuty;
if (sensors_0 == SensorsX.rpmX) ThisValue = RPM;
if (sensors_0 == SensorsX.injDur) ThisValue = InjDurr;
if (sensors_0 == SensorsX.injDuty) ThisValue = InjDuty;
if (sensors_0 == SensorsX.injFV) ThisValue = InjFV;
if (sensors_0 == SensorsX.frame) ThisValue = Frame;
if (sensors_0 == SensorsX.interval) ThisValue = Interval;
if (sensors_0 == SensorsX.iatFc) ThisValue = IATFC;
if (sensors_0 == SensorsX.o2Short) ThisValue = O2Short;
if (sensors_0 == SensorsX.o2Long) ThisValue = O2Long;
if (sensors_0 == SensorsX.fuelUsage) ThisValue = FuelUsage;
if (sensors_0 == SensorsX.vssX) ThisValue = VSS;
if (sensors_0 == SensorsX.gearX) ThisValue = Gear;
if (sensors_0 == SensorsX.mapX) ThisValue = Map;
if (sensors_0 == SensorsX.boostX) ThisValue = Boost;
if (sensors_0 == SensorsX.paX) ThisValue = PA;
if (sensors_0 == SensorsX.tpsX) ThisValue = TPS;
if (sensors_0 == SensorsX.tpsV) ThisValue = TPSV;
if (sensors_0 == SensorsX.ignFnl) ThisValue = IgnFinal;
if (sensors_0 == SensorsX.ignTbl) ThisValue = IgnTable;
if (sensors_0 == SensorsX.ectX) ThisValue = ECT;
if (sensors_0 == SensorsX.iatX) ThisValue = IAT;
if (sensors_0 == SensorsX.afr) ThisValue = AFR;
if (sensors_0 == SensorsX.ecuO2V) ThisValue = EcuO2V;
if (sensors_0 == SensorsX.wbO2V) ThisValue = WBV;
if (sensors_0 == SensorsX.batV) ThisValue = BatV;
if (sensors_0 == SensorsX.eldV) ThisValue = ELDV;
if (sensors_0 == SensorsX.knockV) ThisValue = KnockV;
if (sensors_0 == SensorsX.mapV) ThisValue = MapV;
if (sensors_0 == SensorsX.mil) ThisValue = ConvertBooltoDouble(MIL);
if (sensors_0 == SensorsX.ectFc) ThisValue = ECTFc;
if (sensors_0 == SensorsX.veFc) ThisValue = VEFc;
if (sensors_0 == SensorsX.ectIc) ThisValue = ECTIc;
if (sensors_0 == SensorsX.iatIc) ThisValue = IATIc;
if (sensors_0 == SensorsX.gearIc) ThisValue = GearIc;
if (sensors_0 == SensorsX.gearFc) ThisValue = GearFc;
if (sensors_0 == SensorsX.postFuel) ThisValue = ConvertBooltoDouble(PostFuel);
if (sensors_0 == SensorsX.outIab) ThisValue = ConvertBooltoDouble(OutIAB);
if (sensors_0 == SensorsX.outVtsX) ThisValue = ConvertBooltoDouble(OutVTS);
if (sensors_0 == SensorsX.outVtsM) ThisValue = ConvertBooltoDouble(OutVTSM);
if (sensors_0 == SensorsX.outAc) ThisValue = ConvertBooltoDouble(OutAC);
if (sensors_0 == SensorsX.outO2h) ThisValue = ConvertBooltoDouble(OutO2H);
if (sensors_0 == SensorsX.outMil) ThisValue = ConvertBooltoDouble(OutMIL);
if (sensors_0 == SensorsX.outPurge) ThisValue = ConvertBooltoDouble(OutPurge);
if (sensors_0 == SensorsX.outFanc) ThisValue = ConvertBooltoDouble(OutFanC);
if (sensors_0 == SensorsX.outFpump) ThisValue = ConvertBooltoDouble(OutFPump);
if (sensors_0 == SensorsX.outFuelCut) ThisValue = ConvertBooltoDouble(OutFCut);
if (sensors_0 == SensorsX.outAltCtrl) ThisValue = ConvertBooltoDouble(OutAltCtrl);
if (sensors_0 == SensorsX.inPsp) ThisValue = ConvertBooltoDouble(InPSP);
if (sensors_0 == SensorsX.inSCC) ThisValue = ConvertBooltoDouble(InSCC);
if (sensors_0 == SensorsX.inAccs) ThisValue = ConvertBooltoDouble(InACCs);
if (sensors_0 == SensorsX.inBksw) ThisValue = ConvertBooltoDouble(InBKSW);
if (sensors_0 == SensorsX.inVtp) ThisValue = ConvertBooltoDouble(InVTP);
if (sensors_0 == SensorsX.inVtsFeedBack) ThisValue = ConvertBooltoDouble(InVTSFB);
if (sensors_0 == SensorsX.inParkN) ThisValue = ConvertBooltoDouble(InParkN);
if (sensors_0 == SensorsX.inStartS) ThisValue = ConvertBooltoDouble(InStartS);
if (sensors_0 == SensorsX.inAtShift1) ThisValue = ConvertBooltoDouble(InATShift1);
if (sensors_0 == SensorsX.inAtShift2) ThisValue = ConvertBooltoDouble(InATShift2);
if (sensors_0 == SensorsX.secMaps) ThisValue = ConvertBooltoDouble(SecMap);
if (sensors_0 == SensorsX.ftlInput) ThisValue = ConvertBooltoDouble(InFTL);
if (sensors_0 == SensorsX.ftlActive) ThisValue = ConvertBooltoDouble(ActiveFTL);
if (sensors_0 == SensorsX.ftsClutchInput) ThisValue = ConvertBooltoDouble(InFTS);
if (sensors_0 == SensorsX.ftsActive) ThisValue = ConvertBooltoDouble(ActiveFTS);
if (sensors_0 == SensorsX.boostcutActive) ThisValue = ConvertBooltoDouble(ActiveBstCut);
if (sensors_0 == SensorsX.overheatActive) ThisValue = ConvertBooltoDouble(ActiveOverHeat);
if (sensors_0 == SensorsX.antilagActive) ThisValue = ConvertBooltoDouble(ActiveAntilag);
if (sensors_0 == SensorsX.ignitionCut) ThisValue = ConvertBooltoDouble(ICut);
if (sensors_0 == SensorsX.sccChecker) ThisValue = ConvertBooltoDouble(SCCChecker);
if (sensors_0 == SensorsX.ebcInput) ThisValue = ConvertBooltoDouble(InEBC);
if (sensors_0 == SensorsX.ebcHiInput) ThisValue = ConvertBooltoDouble(InEBCHi);
if (sensors_0 == SensorsX.ebcActive) ThisValue = ConvertBooltoDouble(ActiveEBC);
if (sensors_0 == SensorsX.ebcBaseDuty) ThisValue = EBCBaseDuty;
if (sensors_0 == SensorsX.ebcDutyX) ThisValue = EBCDuty;
if (sensors_0 == SensorsX.ebcTarget) ThisValue = EBCTarget;
if (sensors_0 == SensorsX.ebcCurrent) ThisValue = EBCCurrent;
if (sensors_0 == SensorsX.gpo1_in) ThisValue = ConvertBooltoDouble(InGPO1);
if (sensors_0 == SensorsX.gpo1_out) ThisValue = ConvertBooltoDouble(OutGPO1);
if (sensors_0 == SensorsX.gpo2_in) ThisValue = ConvertBooltoDouble(InGPO2);
if (sensors_0 == SensorsX.gpo2_out) ThisValue = ConvertBooltoDouble(OutGPO2);
if (sensors_0 == SensorsX.gpo3_in) ThisValue = ConvertBooltoDouble(InGPO3);
if (sensors_0 == SensorsX.gpo3_out) ThisValue = ConvertBooltoDouble(OutGPO3);
if (sensors_0 == SensorsX.fanCtrl) ThisValue = ConvertBooltoDouble(FanC);
if (sensors_0 == SensorsX.bstStage2) ThisValue = ConvertBooltoDouble(BSTS2);
if (sensors_0 == SensorsX.bstStage3) ThisValue = ConvertBooltoDouble(BSTS3);
if (sensors_0 == SensorsX.bstStage4) ThisValue = ConvertBooltoDouble(BSTS4);
if (sensors_0 == SensorsX.bstActive) ThisValue = ConvertBooltoDouble(ActiveBST);
if (sensors_0 == SensorsX.bstInput) ThisValue = ConvertBooltoDouble(InBST);
if (sensors_0 == SensorsX.leanProtection) ThisValue = ConvertBooltoDouble(LeanProtect);
if ((this.class10_settings_0.bool_36) && sensors_0 == SensorsX.analog1) ThisValue = Analog1;
if ((this.class10_settings_0.bool_38) && sensors_0 == SensorsX.analog2) ThisValue = Analog2;
if ((this.class10_settings_0.bool_40) && sensors_0 == SensorsX.analog3) ThisValue = Analog3;
if (sensors_0 == SensorsX.accelTime) ThisValue = AccelTime;
if (sensors_0 == SensorsX.egrV) ThisValue = EGRV;
if (sensors_0 == SensorsX.b6V) ThisValue = B6V;
if (sensors_0 == SensorsX.ectV) ThisValue = ECTV;
if (sensors_0 == SensorsX.iatV) ThisValue = IATV;
if (sensors_0 == SensorsX.flexFuel) ThisValue = FlexFuel;
return ThisValue;
}
public Color GetSensorColor(SensorsX sensors_0)
{
return this.class18_0.method_234(GetSensors_VALUE(sensors_0), (double)this.class10_settings_0.method_20(sensors_0), (double)this.class10_settings_0.method_22(sensors_0));
}
public string GetSensors_STRING(SensorsX sensors_0)
{
string RString = "";
double SensorValue = GetSensors_VALUE(sensors_0);
if (sensors_0 == SensorsX.iacvDuty) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.rpmX) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.injDur) RString = SensorValue.ToString("0.00") + " ms";
if (sensors_0 == SensorsX.injDuty) RString = SensorValue + " %";
if (sensors_0 == SensorsX.injFV) RString = SensorValue.ToString("0.00");
if (sensors_0 == SensorsX.frame) RString = SensorValue.ToString("0");
//if (sensors_0 == Sensors.duration) RString = Get_Sensors_Long_STRING(sensors_0, struct12_0.long_3);
if (sensors_0 == SensorsX.duration) RString = Duration;
if (sensors_0 == SensorsX.interval) RString = SensorValue + " mS";
if (sensors_0 == SensorsX.iatFc)
{
if (this.class10_settings_0.correctionUnits_0 != CorrectionUnits.multi) RString = SensorValue.ToString("0");
else RString = SensorValue.ToString("0.00");
}
if (sensors_0 == SensorsX.o2Short)
{
if (this.class10_settings_0.correctionUnits_0 != CorrectionUnits.multi) RString = SensorValue.ToString("0");
else RString = SensorValue.ToString("0.00");
}
if (sensors_0 == SensorsX.o2Long)
{
if (this.class10_settings_0.correctionUnits_0 != CorrectionUnits.multi) RString = SensorValue.ToString("0");
else RString = SensorValue.ToString("0.00");
}
if (sensors_0 == SensorsX.fuelUsage) RString = SensorValue.ToString("0.00");
//###########################################################################
if (sensors_0 == SensorsX.vssX) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.gearX) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.mapX)
{
if (this.class10_settings_0.mapSensorUnits_0 != MapSensorUnits.mBar) RString = SensorValue.ToString("0.00") + this.class10_settings_0.mapSensorUnits_0.ToString();
else RString = SensorValue.ToString("0") + this.class10_settings_0.mapSensorUnits_0.ToString();
}
if (sensors_0 == SensorsX.boostX)
{
if (this.class10_settings_0.mapSensorUnits_1 != MapSensorUnits.mBar) RString = SensorValue.ToString("0.00") + this.class10_settings_0.mapSensorUnits_1.ToString();
else RString = SensorValue.ToString("0") + this.class10_settings_0.mapSensorUnits_1.ToString();
}
if (sensors_0 == SensorsX.paX) RString = SensorValue.ToString("0") + " mBar";
if (sensors_0 == SensorsX.tpsX) RString = SensorValue.ToString("0") + " %";
if (sensors_0 == SensorsX.tpsV) RString = SensorValue.ToString("0.00") + " V";
if (sensors_0 == SensorsX.ignFnl) RString = SensorValue.ToString("0.00") + " \x00b0";
if (sensors_0 == SensorsX.ignTbl) RString = SensorValue.ToString("0.00") + " \x00b0";
if (sensors_0 == SensorsX.ectX) RString = SensorValue.ToString("0.00") + " \x00b0" + this.class10_settings_0.temperatureUnits_0.ToString();
if (sensors_0 == SensorsX.iatX) RString = SensorValue.ToString("0.00") + " \x00b0" + this.class10_settings_0.temperatureUnits_0.ToString();
if (sensors_0 == SensorsX.afr) RString = SensorValue.ToString("0.00") + " " + this.class10_settings_0.airFuelUnits_0.ToString();
if (sensors_0 == SensorsX.ecuO2V) RString = SensorValue.ToString("0.00") + " V";
if (sensors_0 == SensorsX.wbO2V) RString = SensorValue.ToString("0.00") + " V";
if (sensors_0 == SensorsX.batV) RString = SensorValue.ToString("0.00") + " V";
if (sensors_0 == SensorsX.eldV) RString = SensorValue.ToString("0.00") + " V";
if (sensors_0 == SensorsX.knockV) RString = SensorValue.ToString("0.00") + " V";
if (sensors_0 == SensorsX.mapV) RString = SensorValue.ToString("0.00") + " V";
if (sensors_0 == SensorsX.mil) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.ectFc)
{
if (this.class10_settings_0.correctionUnits_0 != CorrectionUnits.multi) RString = SensorValue.ToString("0");
else RString = SensorValue.ToString("0.00");
}
if (sensors_0 == SensorsX.veFc)
{
if (this.class10_settings_0.correctionUnits_0 != CorrectionUnits.multi) RString = SensorValue.ToString("0");
else RString = SensorValue.ToString("0.00");
}
if (sensors_0 == SensorsX.ectIc) RString = SensorValue.ToString("0.00");
if (sensors_0 == SensorsX.iatIc) RString = SensorValue.ToString("0.00");
if (sensors_0 == SensorsX.gearIc) RString = SensorValue.ToString("0.00");
if (sensors_0 == SensorsX.gearFc)
{
if (this.class10_settings_0.correctionUnits_0 != CorrectionUnits.multi) RString = SensorValue.ToString("0");
else RString = SensorValue.ToString("0.00");
}
if (sensors_0 == SensorsX.postFuel) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.outIab) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.outVtsX) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.outVtsM) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.outAc) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.outO2h) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.outMil) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.outPurge) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.outFanc) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.outFpump) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.outFuelCut) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.outAltCtrl) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.inPsp) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.inSCC) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.inAccs) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.inBksw) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.inVtp) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.inVtsFeedBack) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.inParkN) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.inStartS) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.inAtShift1) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.inAtShift2) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.secMaps) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.ftlInput) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.ftlActive) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.ftsClutchInput) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.ftsActive) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.boostcutActive) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.overheatActive) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.antilagActive) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.ignitionCut) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.sccChecker) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.ebcInput) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.ebcHiInput) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.ebcActive) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.ebcBaseDuty) RString = SensorValue.ToString("0.00") + " %";
if (sensors_0 == SensorsX.ebcDutyX) RString = SensorValue.ToString("0.00") + " %";
if (sensors_0 == SensorsX.ebcTarget) RString = SensorValue.ToString("0.00") + " psi";
if (sensors_0 == SensorsX.ebcCurrent) RString = SensorValue.ToString("0.00") + " psi";
if (sensors_0 == SensorsX.gpo1_in) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.gpo1_out) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.gpo2_in) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.gpo2_out) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.gpo3_in) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.gpo3_out) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.fanCtrl) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.bstStage2) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.bstStage3) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.bstStage4) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.bstActive) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.bstInput) RString = SensorValue.ToString("0");
if (sensors_0 == SensorsX.leanProtection) RString = SensorValue.ToString("0");
if ((this.class10_settings_0.bool_36) && sensors_0 == SensorsX.analog1) RString = SensorValue.ToString("0.00");
if ((this.class10_settings_0.bool_38) && sensors_0 == SensorsX.analog2) RString = SensorValue.ToString("0.00");
if ((this.class10_settings_0.bool_40) && sensors_0 == SensorsX.analog3) RString = SensorValue.ToString("0.00");
if (sensors_0 == SensorsX.accelTime) RString = SensorValue.ToString("0.00");
if (sensors_0 == SensorsX.egrV) RString = SensorValue.ToString("0.00");
if (sensors_0 == SensorsX.b6V) RString = SensorValue.ToString("0.00");
if (sensors_0 == SensorsX.ectV) RString = SensorValue.ToString("0.00");
if (sensors_0 == SensorsX.iatV) RString = SensorValue.ToString("0.00");
if (sensors_0 == SensorsX.flexFuel) RString = SensorValue.ToString("0.00") + " %";
return RString;
}
}

339
Class34_Zip.cs Normal file
View File

@ -0,0 +1,339 @@
using Data;
using System;
using System.IO;
using System.Drawing;
using System.Collections.Generic;
using System.Threading;
using System.ComponentModel;
using System.Windows.Forms;
internal class Class34_Zip
{
string _baseromPath = Environment.GetEnvironmentVariable("TEMP");
string _zipPath = "";
int CurrentFileIndex = 0;
private Class10_settings Class10_0;
bool CanLoadC10 = false;
frmUnZIP frmUnZIP_0;
public Class34_Zip()
{
}
public void AddClass10(ref Class10_settings Class10_1)
{
Class10_0 = Class10_1;
CanLoadC10 = true;
}
public void ExtractZip()
{
/*while (File.Exists(_zipPath))
{
CurrentFileIndex++;
SetZipPath();
}*/
try
{
SetZipPath();
int Chechh = GetPackgeChecksum();
if (!CanLoadC10 || (CanLoadC10 && Chechh != this.Class10_0.LastPackageChecksum))
{
if (!File.Exists(_zipPath)) File.Create(_zipPath).Dispose();
File.WriteAllBytes(_zipPath, Properties.Resources.Packages);
if (CanLoadC10) this.Class10_0.LastPackageChecksum = Chechh;
}
//UnZip(_baseromPath);
}
catch
{
this.Class10_0.frmMain_0.LogThis("Unzipper - Unable to Overwrite Package.zip:");
}
}
private int GetPackgeChecksum()
{
int ReturnSum = -1;
if (File.Exists(_zipPath))
{
byte[] AllBytes = File.ReadAllBytes(_zipPath);
for (int i = 0; i < AllBytes.Length; i++)
{
ReturnSum += AllBytes[i];
if (ReturnSum > 65535) ReturnSum -= 65535;
}
}
return ReturnSum;
}
void SetZipPath()
{
_zipPath = Environment.GetEnvironmentVariable("TEMP") + @"\Packages" + CurrentFileIndex + ".zip";
}
public void RemoveZip()
{
try
{
while (File.Exists(_zipPath))
{
File.Delete(_zipPath);
if (CurrentFileIndex > 0) CurrentFileIndex--;
SetZipPath();
}
}
catch { }
}
public Shell32.Folder GetShell32NameSpaceFolder(Object folder)
{
Type shellAppType = Type.GetTypeFromProgID("Shell.Application");
Object shell = Activator.CreateInstance(shellAppType);
return (Shell32.Folder)shellAppType.InvokeMember("NameSpace",
System.Reflection.BindingFlags.InvokeMethod, null, shell, new object[] { folder });
}
public void UnZipFile(string folderPath)
{
try
{
if (!File.Exists(_zipPath))
{
throw new FileNotFoundException();
}
if (!Directory.Exists(folderPath)) Directory.CreateDirectory(folderPath);
Shell32.Folder destinationFolder = GetShell32NameSpaceFolder(folderPath);
Shell32.Folder sourceFile = GetShell32NameSpaceFolder(_zipPath);
foreach (var file in sourceFile.Items())
{
destinationFolder.CopyHere(file, 4 | 16);
}
}
catch { }
}
public void UnZipFile(string folderPath, string Filename)
{
try
{
if (!File.Exists(_zipPath))
{
throw new FileNotFoundException();
}
if (!Directory.Exists(folderPath + @"\" + Filename)) Directory.CreateDirectory(folderPath + @"\" + Filename);
if (CanLoadC10)
{
frmUnZIP_0 = new frmUnZIP();
frmUnZIP_0.Show();
frmUnZIP_0.TopMost = true;
}
Shell32.Folder destinationFolder = GetShell32NameSpaceFolder(folderPath);
Shell32.Folder sourceFile = GetShell32NameSpaceFolder(_zipPath);
bool FoundFile = false;
int MaxItems = sourceFile.Items().Count;
int CurrentIndex = 0;
foreach (Shell32.FolderItem file in sourceFile.Items())
{
int Percent = (int) (((double) CurrentIndex * 100.0) / (double) MaxItems);
if (CanLoadC10) frmUnZIP_0.SetPercent(Percent);
if (file.Name != null)
{
if (file.Name != string.Empty && Filename != string.Empty)
{
if (file.Name == Filename)
{
destinationFolder.CopyHere(file, 4 | 16);
FoundFile = true;
}
}
}
CurrentIndex++;
}
if (!FoundFile) throw new FileNotFoundException();
}
catch { }
if (CanLoadC10)
{
if (frmUnZIP_0 != null)
{
frmUnZIP_0.Dispose();
frmUnZIP_0 = null;
}
}
}
public byte[] UnZipSilent(string FilenameInZIP, string FnameExtracted)
{
byte[] ReturningByte = new byte[] { };
string BufFilePath = Application.StartupPath + @"\" + FilenameInZIP + @"\" + FnameExtracted;
//Unzip First if file do no exist
if (!File.Exists(BufFilePath)) UnZipFile(Application.StartupPath, FilenameInZIP);
//Get Datas
if (File.Exists(BufFilePath))
{
ReturningByte = File.ReadAllBytes(BufFilePath);
}
else
{
Console.WriteLine("NOT loaded:" + FnameExtracted);
throw new FileNotFoundException();
}
return ReturningByte;
}
public void ZipFile(string ThisFile, string NameInZIP)
{
try
{
if (!File.Exists(ThisFile))
{
throw new FileNotFoundException();
}
//Create Empty folder that only have the specific file in it
string Zippingfolder = Application.StartupPath + @"\ZippingFolder";
if (!Directory.Exists(Zippingfolder)) Directory.CreateDirectory(Zippingfolder);
//Copy File to Empty Zipping Folder
File.Create(Zippingfolder + @"\" + NameInZIP).Dispose();
File.WriteAllBytes(Zippingfolder + @"\" + NameInZIP, File.ReadAllBytes(ThisFile));
// Create empty archive
if (!File.Exists(_zipPath))
{
//File.Create(_zipPath).Dispose();
byte[] emptyArchiveContent = new byte[] { 80, 75, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
FileStream fs = File.Create(_zipPath);
fs.Write(emptyArchiveContent, 0, emptyArchiveContent.Length);
fs.Flush();
fs.Close();
fs = null;
}
Shell32.Folder destinationFolder = GetShell32NameSpaceFolder(Zippingfolder);
Shell32.Folder sourceFile = GetShell32NameSpaceFolder(_zipPath);
sourceFile.CopyHere(destinationFolder.Items(), 4 | 16);
int Tries = 0;
bool FileIsZipped = false;
while (!FileIsZipped && Tries < (10 * 15))
{
foreach (Shell32.FolderItem file in sourceFile.Items())
{
if (file.Name == NameInZIP) FileIsZipped = true;
}
Thread.Sleep(100);
Tries++;
}
if (Directory.Exists(Zippingfolder)) Directory.Delete(Zippingfolder, true);
}
catch (Exception mess)
{
MessageBox.Show("ERROR: Could not ZIP File: " + Environment.NewLine + mess);
}
}
public void UnZipFileFromThisZIP(string ThisFile, string ThisZIP)
{
try
{
if (!File.Exists(ThisZIP))
{
throw new FileNotFoundException();
}
Shell32.Folder destinationFolder = GetShell32NameSpaceFolder(Application.StartupPath);
Shell32.Folder sourceFile = GetShell32NameSpaceFolder(ThisZIP);
foreach (Shell32.FolderItem file in sourceFile.Items())
{
if (file.Name == ThisFile) destinationFolder.CopyHere(file, 4 | 16);
}
}
catch (Exception mess)
{
MessageBox.Show("ERROR: Could not UNZIP File: " + Environment.NewLine + mess);
}
}
public string[] GetXDFInternalList()
{
string[] AllXDFFiles = new string[] { };
try
{
if (!File.Exists(_zipPath)) throw new FileNotFoundException();
Shell32.Folder destinationFolder = GetShell32NameSpaceFolder(Application.StartupPath);
Shell32.Folder sourceFile = GetShell32NameSpaceFolder(_zipPath);
foreach (Shell32.FolderItem file in sourceFile.Items())
{
if (file.Name == "XDF_Files")
{
destinationFolder.CopyHere(file, 4 | 16);
}
}
if (Directory.Exists(Application.StartupPath + @"\XDF_Files"))
{
AllXDFFiles = Directory.GetFiles(Application.StartupPath + @"\XDF_Files", "*.*", SearchOption.AllDirectories);
Directory.Delete(Application.StartupPath + @"\XDF_Files", true);
}
}
catch (Exception mess)
{
MessageBox.Show("ERROR: Could not get XDF files list: " + Environment.NewLine + mess);
}
return AllXDFFiles;
}
public string[] GetBINInternalList()
{
string[] AllXDFFiles = new string[] { };
try
{
if (!File.Exists(_zipPath)) throw new FileNotFoundException();
Shell32.Folder destinationFolder = GetShell32NameSpaceFolder(Application.StartupPath);
Shell32.Folder sourceFile = GetShell32NameSpaceFolder(_zipPath);
foreach (Shell32.FolderItem file in sourceFile.Items())
{
if (file.Name == "VW_BIN_Files")
{
destinationFolder.CopyHere(file, 4 | 16);
}
}
if (Directory.Exists(Application.StartupPath + @"\VW_BIN_Files"))
{
AllXDFFiles = Directory.GetFiles(Application.StartupPath + @"\VW_BIN_Files", "*.*", SearchOption.AllDirectories);
Directory.Delete(Application.StartupPath + @"\VW_BIN_Files", true);
}
}
catch (Exception mess)
{
MessageBox.Show("ERROR: Could not get BIN files list: " + Environment.NewLine + mess);
}
return AllXDFFiles;
}
}

1007
Class5_burn.cs Normal file

File diff suppressed because it is too large Load Diff

103
Class7_u.cs Normal file
View File

@ -0,0 +1,103 @@
using System;
internal class Class7_u
{
public bool bool_0;
public bool bool_1;
public bool bool_2;
private float float_0;
private float float_1;
private float float_2;
private float float_3;
public float float_4;
private float float_5;
private int int_0;
private int int_1;
public Class7_u()
{
this.bool_0 = false;
}
public Class7_u(float xChart, float yChart, float xLocal, float yLocal, int col, int row)
{
this.bool_0 = false;
this.float_2 = xChart;
this.float_3 = yChart;
this.float_0 = xLocal;
this.float_1 = yLocal;
this.int_0 = col;
this.int_1 = row;
}
public int method_0()
{
return this.int_0;
}
public void method_1(int int_2)
{
this.int_0 = int_2;
}
public float method_10()
{
return this.float_3;
}
public void method_11(float float_6)
{
this.float_3 = float_6;
}
public float method_12()
{
return this.float_5;
}
public void method_13(float float_6)
{
this.float_5 = float_6;
}
public int method_2()
{
return this.int_1;
}
public void method_3(int int_2)
{
this.int_1 = int_2;
}
public float method_4()
{
return this.float_0;
}
public void method_5(float float_6)
{
this.float_0 = float_6;
}
public float method_6()
{
return this.float_1;
}
public void method_7(float float_6)
{
this.float_1 = float_6;
}
public float method_8()
{
return this.float_2;
}
public void method_9(float float_6)
{
this.float_2 = float_6;
}
}

26
Class8_u.cs Normal file
View File

@ -0,0 +1,26 @@
using System;
internal class Class8_u
{
public bool IsVTEC;
public byte[] byte_0;
public int int_0;
public int int_1 = 240;
public int int_2 = 240;
public int int_3;
//Rpm
public int RpmLowSet;
public int RpmLowReset;
public int RpmHighSet;
public int RpmHighReset;
public int VtcLow;
public int VtcHigh;
public string string_0;
public string string_1;
public string string_2;
public string string_3;
public string string_4;
}

10
Class8_v.cs Normal file
View File

@ -0,0 +1,10 @@
using System;
internal class Class8_v
{
public byte[] byte_0;
public bool IsCalibration;
public string string_2;
public string string_4;
}

1043
Class9_baserom.cs Normal file

File diff suppressed because it is too large Load Diff

1869
CtrlGrid.cs Normal file

File diff suppressed because it is too large Load Diff

129
CtrlGrid.resx Normal file
View File

@ -0,0 +1,129 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

374
CtrlInputSelector.cs Normal file
View File

@ -0,0 +1,374 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Runtime.CompilerServices;
using System.Timers;
using System.Windows.Forms;
internal class CtrlInputSelector : UserControl
{
private bool bool_0 = true;
private bool bool_1;
private bool bool_2;
private bool bool_3;
private CheckBox chkInvert;
private Class18 class18_0;
private IContainer icontainer_0;
//private int int_0;
private Label lblInfo;
private ComboBox lstInput;
private string string_0 = "Always On";
//private System.Timers.Timer timer_0 = new System.Timers.Timer(250.0);
private long CheckLocation = 0L;
private bool IsLoaded = false;
public event Delegate34 delegate34_0;
public event Delegate35 delegate35_0;
public CtrlInputSelector()
{
this.InitializeComponent();
//this.timer_0.AutoReset = true;
//this.timer_0.Elapsed += new ElapsedEventHandler(this.timer_0_Elapsed);
}
private void chkInvert_CheckedChanged(object sender, EventArgs e)
{
if (!this.bool_3)
{
byte num = 0;
if (this.chkInvert.Checked)
{
num = 0xff;
}
if (this.delegate35_0 != null)
{
this.delegate35_0(num);
}
}
}
private void CtrlInputSelector_Load(object sender, EventArgs e)
{
}
protected override void Dispose(bool disposing)
{
if (disposing && (this.icontainer_0 != null))
{
this.icontainer_0.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.lstInput = new System.Windows.Forms.ComboBox();
this.chkInvert = new System.Windows.Forms.CheckBox();
this.lblInfo = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// lstInput
//
this.lstInput.BackColor = System.Drawing.SystemColors.Window;
this.lstInput.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.lstInput.FormattingEnabled = true;
this.lstInput.Items.AddRange(new object[] {
"Power Steering Switch (B8)",
"Service Check Connector (D4)",
"Start Signal (B9)",
"Vtec Pressure Switch (D6)",
"AC request (B5)",
"Brake Switch (D2)",
"Park/Neutral Input (B7)"});
this.lstInput.Location = new System.Drawing.Point(3, 3);
this.lstInput.Name = "lstInput";
this.lstInput.Size = new System.Drawing.Size(177, 21);
this.lstInput.TabIndex = 3;
this.lstInput.SelectedIndexChanged += new System.EventHandler(this.lstInput_SelectedIndexChanged);
//
// chkInvert
//
this.chkInvert.AutoSize = true;
this.chkInvert.Location = new System.Drawing.Point(3, 29);
this.chkInvert.Name = "chkInvert";
this.chkInvert.Size = new System.Drawing.Size(80, 17);
this.chkInvert.TabIndex = 4;
this.chkInvert.Text = "Invert Input";
this.chkInvert.UseVisualStyleBackColor = true;
this.chkInvert.CheckedChanged += new System.EventHandler(this.chkInvert_CheckedChanged);
//
// lblInfo
//
this.lblInfo.AutoSize = true;
this.lblInfo.ForeColor = System.Drawing.Color.Red;
this.lblInfo.Location = new System.Drawing.Point(83, 30);
this.lblInfo.Name = "lblInfo";
this.lblInfo.Size = new System.Drawing.Size(97, 13);
this.lblInfo.TabIndex = 5;
this.lblInfo.Text = "Input Already Used";
this.lblInfo.Visible = false;
//
// CtrlInputSelector
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.lblInfo);
this.Controls.Add(this.chkInvert);
this.Controls.Add(this.lstInput);
this.Name = "CtrlInputSelector";
this.Size = new System.Drawing.Size(185, 49);
this.Load += new System.EventHandler(this.CtrlInputSelector_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
private void lstInput_SelectedIndexChanged(object sender, EventArgs e)
{
if (!this.bool_3)
{
this.class18_0.method_155("Input Selector setting");
/*if ((this.class18_0.class13_0.long_95 != 0L) && (this.lstInput.SelectedIndex <= 6))
{
this.class18_0.method_149(this.class18_0.class13_0.long_95 + this.method_0(), (byte) this.lstInput.SelectedIndex);
}
else if ((this.class18_0.class13_0.long_95 != 0L) && (this.lstInput.SelectedIndex == (this.lstInput.Items.Count - 1)))
{
this.class18_0.method_149(this.class18_0.class13_0.long_95 + this.method_0(), 0xff);
}*/
//this.method_17(this.lstInput.SelectedIndex);
this.class18_0.method_153();
if (this.delegate34_0 != null)
{
this.delegate34_0(this.method_16());
}
this.method_17();
if ((this.lstInput.SelectedIndex == 0) || (this.lstInput.SelectedIndex == 2))
{
this.chkInvert.Checked = true;
}
else
{
this.chkInvert.Checked = false;
}
}
}
/*public int method_0()
{
return this.int_0;
}
public void method_1(int int_1)
{
this.int_0 = int_1;
}*/
public void method_Input_location(long int_1)
{
this.CheckLocation = int_1;
}
public void method_11_Add_Disabled_In_Selection(bool bool_4)
{
this.bool_1 = bool_4;
}
public void method_12()
{
if (this.lstInput.Items.Count > 6)
{
for (int i = 7; i < this.lstInput.Items.Count; i++)
{
this.lstInput.Items.RemoveAt(i);
}
}
if (this.bool_0)
{
this.lstInput.Items.Add(this.string_0);
}
if (this.bool_1)
{
this.lstInput.Items.Add("Disabled");
}
if (this.bool_1 && (this.lstInput.SelectedIndex == (this.lstInput.Items.Count - 1)))
{
this.chkInvert.Enabled = false;
}
if (this.lstInput.SelectedIndex == 7)
{
this.chkInvert.Enabled = false;
}
else
{
this.chkInvert.Enabled = true;
}
IsLoaded = true;
}
public bool GetLoadedVars()
{
return IsLoaded;
}
internal void method_14(ref Class18 class18_1)
{
this.class18_0 = class18_1;
foreach (Control control in base.Controls)
{
float emSize = control.Font.Size * (class18_0.class10_settings_0.scaleRate / 100f);
control.Font = new Font(control.Font.Name, emSize, control.Font.Style, control.Font.Unit);
}
}
public void method_15(byte byte_0)
{
this.bool_3 = true;
switch (byte_0)
{
case 0x20:
this.lstInput.SelectedIndex = 5;
break;
case 0x40:
this.lstInput.SelectedIndex = 6;
break;
case 0x80:
this.lstInput.SelectedIndex = 7;
break;
case 0:
if (this.bool_1 || !this.bool_0)
{
if (this.bool_1 && this.bool_0)
{
this.lstInput.SelectedIndex = 8;
}
else if (this.bool_1 && !this.bool_0)
{
this.lstInput.SelectedIndex = 7;
}
}
break;
case 1:
this.lstInput.SelectedIndex = 0;
break;
case 2:
this.lstInput.SelectedIndex = 1;
break;
case 4:
this.lstInput.SelectedIndex = 2;
break;
case 8:
this.lstInput.SelectedIndex = 3;
break;
case 0x10:
this.lstInput.SelectedIndex = 4;
break;
}
this.bool_3 = false;
}
private byte method_16()
{
byte num = 0;
if (this.bool_1 && (this.lstInput.SelectedIndex == (this.lstInput.Items.Count - 1)))
{
this.chkInvert.Enabled = false;
return 0;
}
if (this.lstInput.SelectedIndex == 7)
{
this.chkInvert.Enabled = false;
}
else
{
this.chkInvert.Enabled = true;
}
return this.class18_0.method_261(num, this.lstInput.SelectedIndex, true);
}
//private void method_17(int int_1)
private void method_17()
{
/*if (this.class18_0.class13_0.long_95 != 0L)
{
for (int i = 0; i < 9; i++)
{
if (i != this.int_0)
{
if ((this.class18_0.method_150(this.class18_0.class13_0.long_95 + i) == ((byte) int_1)) && (this.class18_0.method_150(this.class18_0.class13_0.long_95 + i) != 0xff))
{
this.lblInfo.Visible = true;
return;
}
this.lblInfo.Visible = false;
}
}
}*/
byte CurrentPutByte = this.class18_0.GetByteAt(this.CheckLocation);
if (this.class18_0.GetInputsListLocations() != null)
{
if (this.class18_0.GetInputsListLocations().Count > 0)
{
for (int i = 0; i < this.class18_0.GetInputsListLocations().Count; i++)
{
long TestAt = this.class18_0.GetInputsListLocations()[i];
if (TestAt != this.CheckLocation)
{
//if ((this.class18_0.method_150(TestAt) == ((byte)int_1))
if ((this.class18_0.GetByteAt(TestAt) == CurrentPutByte)
&& (this.class18_0.GetByteAt(TestAt) != 0xff)
&& (this.class18_0.GetByteAt(TestAt) != 0x00) //Disabled Input
&& (this.class18_0.GetByteAt(TestAt) != 0x80)) //Always On Input
{
this.lblInfo.Visible = true;
MessageBox.Show(Form.ActiveForm, "Input already used for '" + this.class18_0.GetInputsListDesc()[i] + "'", "BMTune", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
return;
}
this.lblInfo.Visible = false;
}
}
}
}
}
public void method_3_CustomInput(string string_2)
{
this.string_0 = string_2;
}
public void method_5(bool bool_4)
{
this.bool_3 = true;
this.bool_2 = bool_4;
this.chkInvert.Checked = bool_4;
this.bool_3 = false;
}
public void method_7_Add_CustomInput_To_Selection(bool bool_4)
{
this.bool_0 = bool_4;
}
/*private void timer_0_Elapsed(object sender, ElapsedEventArgs e)
{
this.lblInfo.Visible = !this.lblInfo.Visible;
this.Invalidate();
}*/
public delegate void Delegate34(byte byte_0);
public delegate void Delegate35(byte byte_0);
}

120
CtrlInputSelector.resx Normal file
View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

212
CtrlOutputSelector.cs Normal file
View File

@ -0,0 +1,212 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Runtime.CompilerServices;
using System.Windows.Forms;
internal class CtrlOutputSelector : UserControl
{
private bool bool_0 = true;
private bool bool_1;
private bool bool_2 = true;
private bool bool_3;
private CheckBox chkInvert;
private Class18 class18_0;
private IContainer icontainer_0;
private ComboBox lstInput;
private Label lblInfo;
private long CheckLocation = 0L;
public event Delegate37 delegate37_0;
public event Delegate36 delegate36_0;
public CtrlOutputSelector()
{
this.InitializeComponent();
}
private void chkInvert_CheckedChanged(object sender, EventArgs e)
{
byte num = 0;
if (this.chkInvert.Checked)
{
num = 0xff;
}
if (this.delegate36_0 != null)
{
this.delegate36_0(num);
}
}
protected override void Dispose(bool disposing)
{
if (disposing && (this.icontainer_0 != null))
{
this.icontainer_0.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.lstInput = new System.Windows.Forms.ComboBox();
this.chkInvert = new System.Windows.Forms.CheckBox();
this.lblInfo = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// lstInput
//
this.lstInput.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.lstInput.FormattingEnabled = true;
this.lstInput.Items.AddRange(new object[] {
"ACC (AC Clutch A15)",
"PCS (Purge Valve A20)",
"PO2H (O2 Heater A6)",
"FANC (Radiator Fan Relay A12)",
"MIL (Check Engine Light A13)",
"FPR (Fuel Pump Relay A7)",
"IAB (Intake Butterflys A17)",
"ATLC (Alternator Control A16)",
"None"});
this.lstInput.Location = new System.Drawing.Point(3, 3);
this.lstInput.Name = "lstInput";
this.lstInput.Size = new System.Drawing.Size(177, 21);
this.lstInput.TabIndex = 3;
this.lstInput.SelectedIndexChanged += new System.EventHandler(this.lstInput_SelectedIndexChanged);
//
// chkInvert
//
this.chkInvert.AutoSize = true;
this.chkInvert.Location = new System.Drawing.Point(3, 29);
this.chkInvert.Name = "chkInvert";
this.chkInvert.Size = new System.Drawing.Size(88, 17);
this.chkInvert.TabIndex = 4;
this.chkInvert.Text = "Invert Output";
this.chkInvert.UseVisualStyleBackColor = true;
this.chkInvert.CheckedChanged += new System.EventHandler(this.chkInvert_CheckedChanged);
//
// lblInfo
//
this.lblInfo.AutoSize = true;
this.lblInfo.ForeColor = System.Drawing.Color.Red;
this.lblInfo.Location = new System.Drawing.Point(101, 30);
this.lblInfo.Name = "lblInfo";
this.lblInfo.Size = new System.Drawing.Size(70, 13);
this.lblInfo.TabIndex = 6;
this.lblInfo.Text = "Already Used";
this.lblInfo.Visible = false;
//
// CtrlOutputSelector
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.lblInfo);
this.Controls.Add(this.chkInvert);
this.Controls.Add(this.lstInput);
this.Name = "CtrlOutputSelector";
this.Size = new System.Drawing.Size(185, 49);
this.ResumeLayout(false);
this.PerformLayout();
}
private void lstInput_SelectedIndexChanged(object sender, EventArgs e)
{
this.class18_0.method_155("Output Selector setting");
this.class18_0.method_153();
if (this.delegate37_0 != null)
{
this.delegate37_0(this.method_11());
}
this.method_17();
}
public void method_Output_location(long int_1)
{
this.CheckLocation = int_1;
}
private void method_17()
{
byte CurrentPutByte = this.class18_0.GetByteAt(this.CheckLocation);
if (this.class18_0.GetOutputsListLocations() != null)
{
if (this.class18_0.GetOutputsListLocations().Count > 0)
{
for (int i = 0; i < this.class18_0.GetOutputsListLocations().Count; i++)
{
long TestAt = this.class18_0.GetOutputsListLocations()[i];
if (TestAt != this.CheckLocation)
{
//if ((this.class18_0.method_150(TestAt) == ((byte)int_1))
if ((this.class18_0.GetByteAt(TestAt) == CurrentPutByte)
&& (this.class18_0.GetByteAt(TestAt) != 0xff)
&& (this.class18_0.GetByteAt(TestAt) != 0x08)) //None (disable output)
{
this.lblInfo.Visible = true;
MessageBox.Show(Form.ActiveForm, "Output already used for '" + this.class18_0.GetOutputsListDesc()[i] + "'", "BMTune", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
return;
}
this.lblInfo.Visible = false;
}
}
}
}
}
public void method_1(bool bool_4)
{
this.bool_1 = bool_4;
this.chkInvert.Checked = bool_4;
}
public void method_10(byte byte_0)
{
this.bool_3 = true;
this.lstInput.SelectedIndex = byte_0;
this.bool_3 = false;
}
public byte method_11()
{
if (this.lstInput.SelectedIndex == (this.lstInput.Items.Count - 1))
{
this.chkInvert.Enabled = false;
return (byte) this.lstInput.SelectedIndex;
}
this.chkInvert.Enabled = true;
return (byte) this.lstInput.SelectedIndex;
}
public void method_3(bool bool_4)
{
this.bool_2 = bool_4;
this.chkInvert.Enabled = bool_4;
}
public void method_7(bool bool_4)
{
this.bool_0 = bool_4;
}
public void method_8()
{
this.chkInvert.Enabled = this.bool_2;
}
public void method_9(ref Class18 class18_1)
{
this.class18_0 = class18_1;
foreach (Control control in base.Controls)
{
float emSize = control.Font.Size * (class18_0.class10_settings_0.scaleRate / 100f);
control.Font = new Font(control.Font.Name, emSize, control.Font.Style, control.Font.Unit);
}
}
public delegate void Delegate36(byte byte_0);
public delegate void Delegate37(byte byte_0);
}

120
CtrlOutputSelector.resx Normal file
View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

1515
CtrlSensorGrid.cs Normal file

File diff suppressed because it is too large Load Diff

120
CtrlSensorGrid.resx Normal file
View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

10
DisplayItemsStripped.cs Normal file
View File

@ -0,0 +1,10 @@
using Data;
using System;
//[Serializable, DoNotObfuscate]
[DoNotObfuscate]
public class DisplayItemsStripped
{
public string[,] options;
}

13
Enum4.cs Normal file
View File

@ -0,0 +1,13 @@
using System;
internal enum Enum4
{
const_0,
const_1,
const_2,
const_3,
const_11,
const_12,
const_22
}

10
Enum6.cs Normal file
View File

@ -0,0 +1,10 @@
using System;
internal enum Enum6 : long
{
const_0 = 0x8000L,
const_1 = 0x80L,
const_2 = 0x40L,
const_3 = 0x2000L
}

958
FrmDataDisplay.cs Normal file
View File

@ -0,0 +1,958 @@
using Controls;
using Data;
using System;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Runtime.CompilerServices;
//using System.Runtime.Serialization;
//using System.Runtime.Serialization.Formatters.Binary;
using System.Windows.Forms;
internal class FrmDataDisplay : Form
{
private ToolStripMenuItem addLedDisplayToolStripMenuItem;
private ToolStripMenuItem addToolStripMenuItem;
private bool bool_0;
private Class10_settings class10_settings_0;
private Class17 class17_0;
private Class18 class18_0;
private ContextMenuStrip contextMenuStrip1;
private Collection<CtrlDisplayItemText> collection_0 = new Collection<CtrlDisplayItemText>();
private CtrlDisplayItemText ctrlDisplayItem_0;
private DisplayItemsStripped displayItemsStripped_0 = new DisplayItemsStripped();
private FrmMain frmMain_0;
private IContainer components;
private IContainer icontainer_0;
private ToolStripSeparator toolStripSeparator1;
private ToolStripMenuItem editWarningsToolStripMenuItem;
private ToolStripMenuItem addBarsGraphToolStripMenuItem;
private ToolStripMenuItem addGaugeToolStripMenuItem;
private ToolStripMenuItem loadPresetToolStripMenuItem;
private ToolStripMenuItem savePresetToolStripMenuItem;
private OpenFileDialog openFileDialog1;
private SaveFileDialog saveFileDialog1;
private ToolStripMenuItem addSensorToolStripMenuItem;
private ToolStripMenuItem addTextToolStripMenuItem;
private ToolStripMenuItem addButtonToolStripMenuItem;
private ToolStripMenuItem unlockPositionSizingToolStripMenuItem;
public bool loading = true;
public bool LockedPositionAndSize = true;
private DateTime LastCheck = DateTime.Now;
internal FrmDataDisplay()
{
this.InitializeComponent();
this.unlockPositionSizingToolStripMenuItem.Checked = LockedPositionAndSize;
}
private void addLedDisplayToolStripMenuItem_Click(object sender, EventArgs e)
{
CtrlDisplayItemText item = new CtrlDisplayItemText(ref this.class17_0, ref this.class18_0, ref this.collection_0, ref this.frmMain_0)
{
DataDisplayType = 1
};
AddDisplay(item, 1);
SpawnDisplays();
}
private void addToolStripMenuItem_Click(object sender, EventArgs e)
{
CtrlDisplayItemText item = new CtrlDisplayItemText(ref this.class17_0, ref this.class18_0, ref this.collection_0, ref this.frmMain_0)
{
DataDisplayType = 0
};
AddDisplay(item, 0);
SpawnDisplays();
}
private void addGraphDisplayToolStripMenuItem_Click(object sender, EventArgs e)
{
CtrlDisplayItemText item = new CtrlDisplayItemText(ref this.class17_0, ref this.class18_0, ref this.collection_0, ref this.frmMain_0)
{
DataDisplayType = 2
};
AddDisplay(item, 2);
SpawnDisplays();
}
private void AddGaugeToolStripMenuItem_Click(object sender, EventArgs e)
{
CtrlDisplayItemText item = new CtrlDisplayItemText(ref this.class17_0, ref this.class18_0, ref this.collection_0, ref this.frmMain_0)
{
DataDisplayType = 3
};
AddDisplay(item, 3);
SpawnDisplays();
}
private void AddSensorToolStripMenuItem_Click(object sender, EventArgs e)
{
CtrlDisplayItemText item = new CtrlDisplayItemText(ref this.class17_0, ref this.class18_0, ref this.collection_0, ref this.frmMain_0)
{
DataDisplayType = 4
};
AddDisplay(item, 4);
SpawnDisplays();
}
private void AddButtonToolStripMenuItem_Click(object sender, EventArgs e)
{
CtrlDisplayItemText item = new CtrlDisplayItemText(ref this.class17_0, ref this.class18_0, ref this.collection_0, ref this.frmMain_0)
{
DataDisplayType = 5
};
AddDisplay(item, 5);
SpawnDisplays();
}
private void AddTextToolStripMenuItem_Click(object sender, EventArgs e)
{
CtrlDisplayItemText item = new CtrlDisplayItemText(ref this.class17_0, ref this.class18_0, ref this.collection_0, ref this.frmMain_0)
{
DataDisplayType = 6
};
AddDisplay(item, 6);
SpawnDisplays();
}
protected override void Dispose(bool disposing)
{
if (disposing && (this.icontainer_0 != null))
{
this.icontainer_0.Dispose();
}
base.Dispose(disposing);
}
private void FrmDataDisplay_FormClosed(object sender, FormClosedEventArgs e)
{
this.method_10();
//this.class17_0.delegate54_0 -= new Class17_dtl.Delegate54(this.method_5);
this.class17_0.delegate53_0 -= new Class17.Delegate53(this.method_3);
this.class18_0.delegate58_0 -= new Class18.Delegate58(this.method_4);
this.frmMain_0.frmDataDisplay_0.Dispose();
this.frmMain_0.frmDataDisplay_0 = null;
base.Dispose();
}
private void FrmDataDisplay_HandleCreated(object sender, EventArgs e)
{
this.bool_0 = true;
}
private void FrmDataDisplay_FormClosing(object sender, FormClosingEventArgs e)
{
if (this.class10_settings_0.WindowedMode) this.class10_settings_0.Display_Location = base.Location;
}
private void FrmDataDisplay_HandleDestroyed(object sender, EventArgs e)
{
this.bool_0 = false;
}
private void FrmDataDisplay_Load(object sender, EventArgs e)
{
if (this.class10_settings_0 != null)
{
if (this.class10_settings_0.WindowedMode)
{
this.FormBorderStyle = FormBorderStyle.Sizable;
this.Dock = DockStyle.None;
base.Location = this.class10_settings_0.Display_Location;
base.Size = this.class10_settings_0.Display_Size;
}
else
{
this.FormBorderStyle = FormBorderStyle.None;
this.Dock = DockStyle.Fill;
}
}
this.method_9();
loading = false;
}
private void FrmDataDisplay_Move(object sender, EventArgs e)
{
}
private void FrmDataDisplay_Resize(object sender, EventArgs e)
{
if (this.class10_settings_0 != null)
{
if (this.class10_settings_0.WindowedMode && !loading)
{
if (base.WindowState == FormWindowState.Normal)
{
this.class10_settings_0.Display_Size = base.Size;
}
this.class10_settings_0.Display_Location = base.Location;
}
}
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmDataDisplay));
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.addToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.addLedDisplayToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.addBarsGraphToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.addGaugeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.addSensorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.addButtonToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.addTextToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.unlockPositionSizingToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.editWarningsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.loadPresetToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.savePresetToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
this.contextMenuStrip1.SuspendLayout();
this.SuspendLayout();
//
// contextMenuStrip1
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.addToolStripMenuItem,
this.addLedDisplayToolStripMenuItem,
this.addBarsGraphToolStripMenuItem,
this.addGaugeToolStripMenuItem,
this.addSensorToolStripMenuItem,
this.addButtonToolStripMenuItem,
this.addTextToolStripMenuItem,
this.toolStripSeparator1,
this.unlockPositionSizingToolStripMenuItem,
this.editWarningsToolStripMenuItem,
this.loadPresetToolStripMenuItem,
this.savePresetToolStripMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(185, 274);
//
// addToolStripMenuItem
//
this.addToolStripMenuItem.Name = "addToolStripMenuItem";
this.addToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
this.addToolStripMenuItem.Text = "Add Data";
this.addToolStripMenuItem.Click += new System.EventHandler(this.addToolStripMenuItem_Click);
//
// addLedDisplayToolStripMenuItem
//
this.addLedDisplayToolStripMenuItem.Name = "addLedDisplayToolStripMenuItem";
this.addLedDisplayToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
this.addLedDisplayToolStripMenuItem.Text = "Add Led";
this.addLedDisplayToolStripMenuItem.Click += new System.EventHandler(this.addLedDisplayToolStripMenuItem_Click);
//
// addBarsGraphToolStripMenuItem
//
this.addBarsGraphToolStripMenuItem.Name = "addBarsGraphToolStripMenuItem";
this.addBarsGraphToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
this.addBarsGraphToolStripMenuItem.Text = "Add Bars Graph";
this.addBarsGraphToolStripMenuItem.Click += new System.EventHandler(this.addGraphDisplayToolStripMenuItem_Click);
//
// addGaugeToolStripMenuItem
//
this.addGaugeToolStripMenuItem.Name = "addGaugeToolStripMenuItem";
this.addGaugeToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
this.addGaugeToolStripMenuItem.Text = "Add Gauge";
this.addGaugeToolStripMenuItem.Click += new System.EventHandler(this.AddGaugeToolStripMenuItem_Click);
//
// addSensorToolStripMenuItem
//
this.addSensorToolStripMenuItem.Name = "addSensorToolStripMenuItem";
this.addSensorToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
this.addSensorToolStripMenuItem.Text = "Add Sensor";
this.addSensorToolStripMenuItem.Click += new System.EventHandler(this.AddSensorToolStripMenuItem_Click);
//
// addButtonToolStripMenuItem
//
this.addButtonToolStripMenuItem.Name = "addButtonToolStripMenuItem";
this.addButtonToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
this.addButtonToolStripMenuItem.Text = "Add Button";
this.addButtonToolStripMenuItem.Visible = false;
this.addButtonToolStripMenuItem.Click += new System.EventHandler(this.AddButtonToolStripMenuItem_Click);
//
// addTextToolStripMenuItem
//
this.addTextToolStripMenuItem.Name = "addTextToolStripMenuItem";
this.addTextToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
this.addTextToolStripMenuItem.Text = "Add Text";
this.addTextToolStripMenuItem.Visible = false;
this.addTextToolStripMenuItem.Click += new System.EventHandler(this.AddTextToolStripMenuItem_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(181, 6);
//
// unlockPositionSizingToolStripMenuItem
//
this.unlockPositionSizingToolStripMenuItem.CheckOnClick = true;
this.unlockPositionSizingToolStripMenuItem.Name = "unlockPositionSizingToolStripMenuItem";
this.unlockPositionSizingToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
this.unlockPositionSizingToolStripMenuItem.Text = "Lock Position/Sizing";
this.unlockPositionSizingToolStripMenuItem.Click += new System.EventHandler(this.UnlockPositionSizingToolStripMenuItem_Click);
//
// editWarningsToolStripMenuItem
//
this.editWarningsToolStripMenuItem.Name = "editWarningsToolStripMenuItem";
this.editWarningsToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
this.editWarningsToolStripMenuItem.Text = "Edit Limits/Warnings";
this.editWarningsToolStripMenuItem.ToolTipText = "Edit Sensors Min/Max Limit and Warnings";
this.editWarningsToolStripMenuItem.Click += new System.EventHandler(this.editWarningsToolStripMenuItem_Click);
//
// loadPresetToolStripMenuItem
//
this.loadPresetToolStripMenuItem.Name = "loadPresetToolStripMenuItem";
this.loadPresetToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
this.loadPresetToolStripMenuItem.Text = "Load Preset";
this.loadPresetToolStripMenuItem.ToolTipText = "Load Gauges Preset";
this.loadPresetToolStripMenuItem.Click += new System.EventHandler(this.LoadPresetToolStripMenuItem_Click);
//
// savePresetToolStripMenuItem
//
this.savePresetToolStripMenuItem.Name = "savePresetToolStripMenuItem";
this.savePresetToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
this.savePresetToolStripMenuItem.Text = "Save Preset";
this.savePresetToolStripMenuItem.ToolTipText = "Save Gauges Preset";
this.savePresetToolStripMenuItem.Click += new System.EventHandler(this.SavePresetToolStripMenuItem_Click);
//
// openFileDialog1
//
this.openFileDialog1.DefaultExt = "preset";
this.openFileDialog1.Filter = "BMTune Gauges Preset|*.txt";
this.openFileDialog1.Title = "Open Gauges Preset";
//
// saveFileDialog1
//
this.saveFileDialog1.DefaultExt = "preset";
this.saveFileDialog1.Filter = "BMTune Gauges Preset|*.txt";
this.saveFileDialog1.Title = "Save Gauges Preset";
//
// FrmDataDisplay
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.AutoSize = true;
this.BackColor = System.Drawing.Color.LightBlue;
this.ClientSize = new System.Drawing.Size(882, 92);
this.ContextMenuStrip = this.contextMenuStrip1;
this.DoubleBuffered = true;
this.Font = new System.Drawing.Font("Lucida Sans", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.KeyPreview = true;
this.Name = "FrmDataDisplay";
this.ShowInTaskbar = false;
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Show;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Gauges";
this.TopMost = true;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmDataDisplay_FormClosing);
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.FrmDataDisplay_FormClosed);
this.Load += new System.EventHandler(this.FrmDataDisplay_Load);
this.Move += new System.EventHandler(this.FrmDataDisplay_Move);
this.Resize += new System.EventHandler(this.FrmDataDisplay_Resize);
this.contextMenuStrip1.ResumeLayout(false);
this.ResumeLayout(false);
}
internal void method_0(ref Class18 class18_1, ref Class10_settings class10_1, ref Class17 class17_1, ref FrmMain frmMain_1)
{
this.class10_settings_0 = class10_1;
this.class18_0 = class18_1;
this.class18_0.delegate58_0 += new Class18.Delegate58(this.method_4);
this.class17_0 = class17_1;
//this.class17_0.delegate54_0 += new Class17_dtl.Delegate54(this.method_5);
this.class17_0.delegate53_0 += new Class17.Delegate53(this.method_3);
base.HandleCreated += new EventHandler(this.FrmDataDisplay_HandleCreated);
base.HandleDestroyed += new EventHandler(this.FrmDataDisplay_HandleDestroyed);
this.frmMain_0 = frmMain_1;
this.BackColor = this.class10_settings_0.color_8;
foreach (Control control in base.Controls)
{
float emSize = control.Font.Size * (class18_0.class10_settings_0.scaleRate / 100f);
control.Font = new Font(control.Font.Name, emSize, control.Font.Style, control.Font.Unit);
}
}
internal void method_1()
{
this.collection_0[0].ShowPeak();
}
public void SaveSettings(string ThisPath)
{
FileInfo info = new FileInfo(ThisPath);
if (info.Exists) info.Delete();
this.displayItemsStripped_0.options = new string[this.collection_0.Count, 8];
for (int i = 0; i < this.collection_0.Count; i++)
{
if (this.collection_0[i].DataDisplayType == 1) this.displayItemsStripped_0.options[i, 0] = ((int)this.collection_0[i].TypeLED).ToString();
else if (this.collection_0[i].DataDisplayType == 4) this.displayItemsStripped_0.options[i, 0] = ((int)this.collection_0[i].TypeALL).ToString();
else if (this.collection_0[i].DataDisplayType == 5) this.displayItemsStripped_0.options[i, 0] = ((int)this.collection_0[i].TypeBUTTON).ToString();
else this.displayItemsStripped_0.options[i, 0] = ((int)this.collection_0[i].Type).ToString();
this.displayItemsStripped_0.options[i, 1] = this.collection_0[i].SecData.ToString();
this.displayItemsStripped_0.options[i, 2] = this.collection_0[i].DataDisplayType.ToString();
this.displayItemsStripped_0.options[i, 3] = this.collection_0[i].Size.Width.ToString();
this.displayItemsStripped_0.options[i, 4] = this.collection_0[i].Size.Height.ToString();
this.displayItemsStripped_0.options[i, 5] = this.collection_0[i].Location.X.ToString();
this.displayItemsStripped_0.options[i, 6] = this.collection_0[i].Location.Y.ToString();
this.displayItemsStripped_0.options[i, 7] = this.collection_0[i].IsTextVertical.ToString();
}
string SaveStr = "";
for (int i = 0; i < this.collection_0.Count; i++)
{
string SaveName = "Gauge";
SaveStr += SaveName + "=" + i + ",Sensor=" + this.displayItemsStripped_0.options[i, 0] + Environment.NewLine;
SaveStr += SaveName + "=" + i + ",SecData=" + this.displayItemsStripped_0.options[i, 1] + Environment.NewLine;
SaveStr += SaveName + "=" + i + ",DataDisplayType=" + this.displayItemsStripped_0.options[i, 2] + Environment.NewLine;
SaveStr += SaveName + "=" + i + ",Size.Width=" + this.displayItemsStripped_0.options[i, 3] + Environment.NewLine;
SaveStr += SaveName + "=" + i + ",Size.Height=" + this.displayItemsStripped_0.options[i, 4] + Environment.NewLine;
SaveStr += SaveName + "=" + i + ",Location.X=" + this.displayItemsStripped_0.options[i, 5] + Environment.NewLine;
SaveStr += SaveName + "=" + i + ",Location.Y=" + this.displayItemsStripped_0.options[i, 6] + Environment.NewLine;
SaveStr += SaveName + "=" + i + ",IsTextVertical=" + this.displayItemsStripped_0.options[i, 7] + Environment.NewLine;
SaveStr += Environment.NewLine;
}
StreamWriter writer = new StreamWriter(ThisPath, false);
writer.Write(SaveStr);
writer.Close();
writer.Dispose();
writer = null;
}
public void LoadSettings(string ThisPath)
{
FileInfo info = new FileInfo(ThisPath);
if (!info.Exists)
{
this.method_7();
}
else
{
try
{
string[] AllLines = File.ReadAllLines(ThisPath);
if (AllLines.Length > 0)
{
//Get Count
int CollectionCount = -1;
for (int i = 0; i < AllLines.Length; i++)
{
if (AllLines[i].Contains("Gauge"))
{
string[] SplitCMD = AllLines[i].Split(',');
string[] SplitIndexEnc = SplitCMD[0].Split('=');
CollectionCount = int.Parse(SplitIndexEnc[1]) + 1;
}
}
if (CollectionCount > -1)
{
//Set Array
this.displayItemsStripped_0.options = new string[CollectionCount, 8];
//Load
for (int i = 0; i < AllLines.Length; i++)
{
if (AllLines[i].Contains("Gauge"))
{
string[] SplitCMD = AllLines[i].Split(',');
string[] SplitIndexEnc = SplitCMD[0].Split('=');
string[] SplitCmdEnc = SplitCMD[1].Split('=');
if (SplitCmdEnc[0].Contains("Sensor")) this.displayItemsStripped_0.options[int.Parse(SplitIndexEnc[1]), 0] = SplitCmdEnc[1];
if (SplitCmdEnc[0].Contains("SecData")) this.displayItemsStripped_0.options[int.Parse(SplitIndexEnc[1]), 1] = SplitCmdEnc[1];
if (SplitCmdEnc[0].Contains("DataDisplayType")) this.displayItemsStripped_0.options[int.Parse(SplitIndexEnc[1]), 2] = SplitCmdEnc[1];
if (SplitCmdEnc[0].Contains("Size.Width")) this.displayItemsStripped_0.options[int.Parse(SplitIndexEnc[1]), 3] = SplitCmdEnc[1];
if (SplitCmdEnc[0].Contains("Size.Height")) this.displayItemsStripped_0.options[int.Parse(SplitIndexEnc[1]), 4] = SplitCmdEnc[1];
if (SplitCmdEnc[0].Contains("Location.X")) this.displayItemsStripped_0.options[int.Parse(SplitIndexEnc[1]), 5] = SplitCmdEnc[1];
if (SplitCmdEnc[0].Contains("Location.Y")) this.displayItemsStripped_0.options[int.Parse(SplitIndexEnc[1]), 6] = SplitCmdEnc[1];
if (SplitCmdEnc[0].Contains("IsTextVertical")) this.displayItemsStripped_0.options[int.Parse(SplitIndexEnc[1]), 7] = SplitCmdEnc[1];
}
}
this.collection_0.Clear();
//for (int i = 0; i < this.displayItemsStripped_0.options.GetLength(0); i++)
for (int i = 0; i < CollectionCount; i++)
{
this.ctrlDisplayItem_0 = new CtrlDisplayItemText(ref this.class17_0, ref this.class18_0, ref this.collection_0, ref this.frmMain_0);
this.ctrlDisplayItem_0.DataDisplayType = int.Parse(this.displayItemsStripped_0.options[i, 2]);
if (this.ctrlDisplayItem_0.DataDisplayType == 1) this.ctrlDisplayItem_0.TypeLED = (DatalogLedTypes)int.Parse(this.displayItemsStripped_0.options[i, 0]);
else if (this.ctrlDisplayItem_0.DataDisplayType == 4) this.ctrlDisplayItem_0.TypeALL = (SensorsX)int.Parse(this.displayItemsStripped_0.options[i, 0]);
else if (this.ctrlDisplayItem_0.DataDisplayType == 5) this.ctrlDisplayItem_0.TypeBUTTON = (DatalogButtonsTypes)int.Parse(this.displayItemsStripped_0.options[i, 0]);
else this.ctrlDisplayItem_0.Type = (DatalogDisplayTypes)int.Parse(this.displayItemsStripped_0.options[i, 0]);
this.ctrlDisplayItem_0.SecData = bool.Parse(this.displayItemsStripped_0.options[i, 1]);
this.ctrlDisplayItem_0.Size = new Size(int.Parse(this.displayItemsStripped_0.options[i, 3]), int.Parse(this.displayItemsStripped_0.options[i, 4]));
this.ctrlDisplayItem_0.Location = new Point(int.Parse(this.displayItemsStripped_0.options[i, 5]), int.Parse(this.displayItemsStripped_0.options[i, 6]));
this.ctrlDisplayItem_0.IsTextVertical = bool.Parse(this.displayItemsStripped_0.options[i, 7]);
AddDisplay(this.ctrlDisplayItem_0, this.ctrlDisplayItem_0.DataDisplayType);
}
this.ReloadDisplay();
}
else
{
this.method_7();
}
}
else
{
this.method_7();
}
}
catch (Exception mess)
{
LogThis("Error while loading Gauge Layout:\n" + mess);
this.method_7();
}
}
}
private void LogThis(string string_8)
{
this.frmMain_0.LogThis("Gauges - " + string_8);
}
private void method_10()
{
SaveSettings(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\BMTune\display.txt");
}
private int method_11(CtrlDisplayItemText ctrlDisplayItem_1)
{
for (int i = 0; i < this.collection_0.Count; i++)
{
if (ctrlDisplayItem_1 == this.collection_0[i])
{
return i;
}
}
return 0;
}
private void AddDisplay(CtrlDisplayItemText ctrlDisplayItem_1, int ThisType)
{
int index = this.method_11(ctrlDisplayItem_1);
CtrlDisplayItemText ctrlDisplayItem_BCK = ctrlDisplayItem_1;
ctrlDisplayItem_1 = new CtrlDisplayItemText(ref this.class17_0, ref this.class18_0, ref this.collection_0, ref this.frmMain_0);
ctrlDisplayItem_1.DataDisplayType = ThisType;
ctrlDisplayItem_1.Type = ctrlDisplayItem_BCK.Type;
if (ctrlDisplayItem_1.DataDisplayType == 1) ctrlDisplayItem_1.TypeLED = ctrlDisplayItem_BCK.TypeLED;
if (ctrlDisplayItem_1.DataDisplayType == 4) ctrlDisplayItem_1.TypeALL = ctrlDisplayItem_BCK.TypeALL;
if (ctrlDisplayItem_1.DataDisplayType == 5) ctrlDisplayItem_1.TypeBUTTON = ctrlDisplayItem_BCK.TypeBUTTON;
ctrlDisplayItem_1.SecData = ctrlDisplayItem_BCK.SecData;
ctrlDisplayItem_1.Size = new Size(ctrlDisplayItem_BCK.Size.Width, ctrlDisplayItem_BCK.Size.Height);
ctrlDisplayItem_1.Location = new Point(ctrlDisplayItem_BCK.Location.X, ctrlDisplayItem_BCK.Location.Y);
ctrlDisplayItem_1.IsTextVertical = ctrlDisplayItem_BCK.IsTextVertical;
ctrlDisplayItem_1.RemoveRequest += new CtrlDisplayItemText.Delegate16(this.method_15);
ctrlDisplayItem_1.AddRequest += new CtrlDisplayItemText.Delegate20(this.method_12);
ctrlDisplayItem_1.MoveLeftRequest += new CtrlDisplayItemText.Delegate17(this.method_14);
ctrlDisplayItem_1.MoveRightRequest += new CtrlDisplayItemText.Delegate21(this.method_13);
ctrlDisplayItem_1.DefaultsRequest += new CtrlDisplayItemText.Delegate19(this.method_16);
ctrlDisplayItem_1.AddLedRequest += new CtrlDisplayItemText.Delegate18(this.method_17);
ctrlDisplayItem_1.AddGraphRequest += new CtrlDisplayItemText.DelegateGraph(this.AddGraph);
ctrlDisplayItem_1.AddGaugeRequest += new CtrlDisplayItemText.DelegateGauge(this.AddGauge);
this.collection_0.Insert(index, ctrlDisplayItem_1);
//SpawnDisplays();
}
private void method_12(CtrlDisplayItemText ctrlDisplayItem_1)
{
AddDisplay(ctrlDisplayItem_1, 0);
SpawnDisplays();
}
private void method_13(CtrlDisplayItemText ctrlDisplayItem_1)
{
for (int i = 0; i < this.collection_0.Count; i++)
{
if ((ctrlDisplayItem_1 == this.collection_0[i]) && (i < (this.collection_0.Count - 2)))
{
this.collection_0.RemoveAt(i);
this.collection_0.Insert(i + 1, ctrlDisplayItem_1);
break;
}
}
this.ReloadDisplay();
}
private void method_14(CtrlDisplayItemText ctrlDisplayItem_1)
{
for (int i = 0; i < this.collection_0.Count; i++)
{
if ((ctrlDisplayItem_1 == this.collection_0[i]) && (i > 0))
{
this.collection_0.RemoveAt(i);
this.collection_0.Insert(i - 1, ctrlDisplayItem_1);
break;
}
}
this.ReloadDisplay();
}
private void method_15(CtrlDisplayItemText ctrlDisplayItem_1)
{
this.collection_0.Remove(ctrlDisplayItem_1);
this.Controls.Remove(ctrlDisplayItem_1);
}
private void method_16(CtrlDisplayItemText ctrlDisplayItem_1)
{
this.method_7();
}
private void SpawnDisplays()
{
this.Controls.Clear();
for (int i = 0; i < this.collection_0.Count; i++) this.Controls.Add(this.collection_0[i]);
}
public void LoadHints()
{
//hints
if (!loading)
{
if (!this.class10_settings_0.ShownHint_Gauges)
{
for (int i = this.collection_0.Count / 3; i < this.collection_0.Count; i++)
{
string ThisHint = "You can Customize the gauges layout" + Environment.NewLine + "the sensors, position and sizing!";
frmHints frmHints_0 = new frmHints(ThisHint, true, 10, new Point(400, 145));
//frmHints frmHints_0 = new frmHints(ThisHint, true, 10, new Point(this.collection_0[i].Location.X + 15, this.collection_0[i].Location.Y + 15));
DialogResult result = frmHints_0.ShowDialog();
if (result == DialogResult.OK)
{
this.class10_settings_0.ShownHint_Gauges = true;
}
i = this.collection_0.Count + 1;
}
}
if (!this.class10_settings_0.ShownHint_Colors)
{
for (int i = 0; i < this.collection_0.Count; i++)
{
string ThisHint = "You can Customize the colors layout" + Environment.NewLine + "go in the 'Settings' to do so!";
//int LocX = this.collection_0[i].PointToScreen(new Point(int.Parse(this.displayItemsStripped_0.options[i, 5]), 0)).X + 440;
//int LocY = this.collection_0[i].PointToScreen(new Point(0, int.Parse(this.displayItemsStripped_0.options[i, 6]))).Y;
frmHints frmHints_0 = new frmHints(ThisHint, true, 10, new Point(400, 145));
//frmHints frmHints_0 = new frmHints(ThisHint, true, 10, new Point(LocX, LocY));
DialogResult result = frmHints_0.ShowDialog();
if (result == DialogResult.OK)
{
this.class10_settings_0.ShownHint_Colors = true;
}
i = this.collection_0.Count + 1;
}
}
}
}
private void method_17(CtrlDisplayItemText ctrlDisplayItem_1)
{
AddDisplay(ctrlDisplayItem_1, 1);
SpawnDisplays();
}
private void AddGraph(CtrlDisplayItemText ctrlDisplayItem_1)
{
AddDisplay(ctrlDisplayItem_1, 2);
SpawnDisplays();
}
private void AddGauge(CtrlDisplayItemText ctrlDisplayItem_1)
{
AddDisplay(ctrlDisplayItem_1, 3);
SpawnDisplays();
}
internal void method_2()
{
this.collection_0[0].ClearPeak();
}
private void method_3(long long_0, string string_0)
{
if (!this.class17_0.method_63_HasLogsFileOpen())
{
this.method_4();
}
}
private void method_4()
{
base.Invalidate();
}
/*private void method_5(Struct12 struct12_0)
{
if (this.class10_0.bool_ActiveDatalog[3])
{
if (this.bool_0)
{
try
{
base.Invoke(new Delegate0(this.method_6), new object[] { struct12_0 });
}
catch { }
}
}
}
private void method_6(Struct12 struct12_0)
{
if ((DateTime.Now - LastCheck).TotalMilliseconds >= this.class10_0.int_ActiveDatalog[3])
//if ((DateTime.Now - LastCheck).TotalMilliseconds >= 0)
{
//LastCheck = DateTime.Now;
if (this.class10_0.bool_ActiveDatalog[3])
{
if (this.class18_0.method_30_HasFileLoadedInBMTune())
{
foreach (CtrlDisplayItemText item in this.collection_0)
{
item.myDataloggerUpdateInvoke(struct12_0);
}
}
}
LastCheck = DateTime.Now;
}
}*/
private void method_7()
{
this.collection_0.Clear();
this.ctrlDisplayItem_0 = new CtrlDisplayItemText(ref this.class17_0, ref this.class18_0, ref this.collection_0, ref this.frmMain_0);
this.ctrlDisplayItem_0.TypeLED = DatalogLedTypes.Mil;
this.ctrlDisplayItem_0.DataDisplayType = 1;
this.ctrlDisplayItem_0.Size = new Size(61, 21);
this.ctrlDisplayItem_0.Location = new Point(0, 0);
AddDisplay(ctrlDisplayItem_0, this.ctrlDisplayItem_0.DataDisplayType);
this.ctrlDisplayItem_0.TypeLED = DatalogLedTypes.VtsMaps;
this.ctrlDisplayItem_0.DataDisplayType = 1;
this.ctrlDisplayItem_0.Size = new Size(61, 21);
this.ctrlDisplayItem_0.Location = new Point(0, 20);
AddDisplay(ctrlDisplayItem_0, this.ctrlDisplayItem_0.DataDisplayType);
this.ctrlDisplayItem_0.TypeLED = DatalogLedTypes.Fuelcut;
this.ctrlDisplayItem_0.DataDisplayType = 1;
this.ctrlDisplayItem_0.Size = new Size(61, 21);
this.ctrlDisplayItem_0.Location = new Point(0, 40);
AddDisplay(ctrlDisplayItem_0, this.ctrlDisplayItem_0.DataDisplayType);
this.ctrlDisplayItem_0.TypeLED = DatalogLedTypes.IgnCut;
this.ctrlDisplayItem_0.DataDisplayType = 1;
this.ctrlDisplayItem_0.Size = new Size(61, 21);
this.ctrlDisplayItem_0.Location = new Point(0, 60);
AddDisplay(ctrlDisplayItem_0, this.ctrlDisplayItem_0.DataDisplayType);
this.ctrlDisplayItem_0.TypeLED = DatalogLedTypes.FuelPump;
this.ctrlDisplayItem_0.DataDisplayType = 1;
this.ctrlDisplayItem_0.Size = new Size(61, 20);
this.ctrlDisplayItem_0.Location = new Point(0, 80);
AddDisplay(ctrlDisplayItem_0, this.ctrlDisplayItem_0.DataDisplayType);
//#####
this.ctrlDisplayItem_0.TypeLED = DatalogLedTypes.FtlActive;
this.ctrlDisplayItem_0.DataDisplayType = 1;
this.ctrlDisplayItem_0.Size = new Size(61, 21);
this.ctrlDisplayItem_0.Location = new Point(60, 0);
AddDisplay(ctrlDisplayItem_0, this.ctrlDisplayItem_0.DataDisplayType);
this.ctrlDisplayItem_0.TypeLED = DatalogLedTypes.FtsActive;
this.ctrlDisplayItem_0.DataDisplayType = 1;
this.ctrlDisplayItem_0.Size = new Size(61, 21);
this.ctrlDisplayItem_0.Location = new Point(60, 20);
AddDisplay(ctrlDisplayItem_0, this.ctrlDisplayItem_0.DataDisplayType);
this.ctrlDisplayItem_0.TypeLED = DatalogLedTypes.AntiLag;
this.ctrlDisplayItem_0.DataDisplayType = 1;
this.ctrlDisplayItem_0.Size = new Size(61, 21);
this.ctrlDisplayItem_0.Location = new Point(60, 40);
AddDisplay(ctrlDisplayItem_0, this.ctrlDisplayItem_0.DataDisplayType);
this.ctrlDisplayItem_0.TypeLED = DatalogLedTypes.FanControl;
this.ctrlDisplayItem_0.DataDisplayType = 1;
this.ctrlDisplayItem_0.Size = new Size(61, 21);
this.ctrlDisplayItem_0.Location = new Point(60, 60);
AddDisplay(ctrlDisplayItem_0, this.ctrlDisplayItem_0.DataDisplayType);
this.ctrlDisplayItem_0.TypeLED = DatalogLedTypes.secMaps;
this.ctrlDisplayItem_0.DataDisplayType = 1;
this.ctrlDisplayItem_0.Size = new Size(61, 20);
this.ctrlDisplayItem_0.Location = new Point(60, 80);
AddDisplay(ctrlDisplayItem_0, this.ctrlDisplayItem_0.DataDisplayType);
//#####
this.ctrlDisplayItem_0.Type = DatalogDisplayTypes.map;
this.ctrlDisplayItem_0.DataDisplayType = 0;
this.ctrlDisplayItem_0.Size = new Size(101, 100);
this.ctrlDisplayItem_0.Location = new Point(120, 0);
AddDisplay(ctrlDisplayItem_0, this.ctrlDisplayItem_0.DataDisplayType);
this.ctrlDisplayItem_0.Type = DatalogDisplayTypes.rpm;
this.ctrlDisplayItem_0.DataDisplayType = 3;
this.ctrlDisplayItem_0.Size = new Size(101, 100);
this.ctrlDisplayItem_0.Location = new Point(220, 0);
AddDisplay(ctrlDisplayItem_0, this.ctrlDisplayItem_0.DataDisplayType);
this.ctrlDisplayItem_0.Type = DatalogDisplayTypes.tps;
this.ctrlDisplayItem_0.DataDisplayType = 2;
this.ctrlDisplayItem_0.Size = new Size(101, 100);
this.ctrlDisplayItem_0.Location = new Point(320, 0);
AddDisplay(ctrlDisplayItem_0, this.ctrlDisplayItem_0.DataDisplayType);
this.ctrlDisplayItem_0.Type = DatalogDisplayTypes.O2;
this.ctrlDisplayItem_0.DataDisplayType = 3;
this.ctrlDisplayItem_0.Size = new Size(101, 100);
this.ctrlDisplayItem_0.Location = new Point(420, 0);
AddDisplay(ctrlDisplayItem_0, this.ctrlDisplayItem_0.DataDisplayType);
this.ctrlDisplayItem_0.Type = DatalogDisplayTypes.iat;
this.ctrlDisplayItem_0.DataDisplayType = 2;
this.ctrlDisplayItem_0.Size = new Size(101, 100);
this.ctrlDisplayItem_0.Location = new Point(520, 0);
AddDisplay(ctrlDisplayItem_0, this.ctrlDisplayItem_0.DataDisplayType);
this.ctrlDisplayItem_0.Type = DatalogDisplayTypes.ect;
this.ctrlDisplayItem_0.DataDisplayType = 2;
this.ctrlDisplayItem_0.Size = new Size(101, 100);
this.ctrlDisplayItem_0.Location = new Point(620, 0);
AddDisplay(ctrlDisplayItem_0, this.ctrlDisplayItem_0.DataDisplayType);
this.ctrlDisplayItem_0.Type = DatalogDisplayTypes.ign;
this.ctrlDisplayItem_0.DataDisplayType = 3;
this.ctrlDisplayItem_0.Size = new Size(101, 100);
this.ctrlDisplayItem_0.Location = new Point(720, 0);
AddDisplay(ctrlDisplayItem_0, this.ctrlDisplayItem_0.DataDisplayType);
this.ctrlDisplayItem_0.Type = DatalogDisplayTypes.inj;
this.ctrlDisplayItem_0.DataDisplayType = 0;
this.ctrlDisplayItem_0.Size = new Size(101, 100);
this.ctrlDisplayItem_0.Location = new Point(820, 0);
AddDisplay(ctrlDisplayItem_0, this.ctrlDisplayItem_0.DataDisplayType);
this.ctrlDisplayItem_0.Type = DatalogDisplayTypes.vss;
this.ctrlDisplayItem_0.DataDisplayType = 3;
this.ctrlDisplayItem_0.Size = new Size(101, 100);
this.ctrlDisplayItem_0.Location = new Point(920, 0);
AddDisplay(ctrlDisplayItem_0, this.ctrlDisplayItem_0.DataDisplayType);
this.ctrlDisplayItem_0.Type = DatalogDisplayTypes.flexFuel;
this.ctrlDisplayItem_0.DataDisplayType = 0;
this.ctrlDisplayItem_0.Size = new Size(101, 100);
this.ctrlDisplayItem_0.Location = new Point(1020, 0);
AddDisplay(ctrlDisplayItem_0, this.ctrlDisplayItem_0.DataDisplayType);
this.ctrlDisplayItem_0.Type = DatalogDisplayTypes.accelTime;
this.ctrlDisplayItem_0.DataDisplayType = 0;
this.ctrlDisplayItem_0.Size = new Size(101, 100);
this.ctrlDisplayItem_0.Location = new Point(1120, 0);
AddDisplay(ctrlDisplayItem_0, this.ctrlDisplayItem_0.DataDisplayType);
this.ctrlDisplayItem_0.Type = DatalogDisplayTypes.fuelUsage;
this.ctrlDisplayItem_0.DataDisplayType = 0;
this.ctrlDisplayItem_0.Size = new Size(101, 100);
this.ctrlDisplayItem_0.Location = new Point(1220, 0);
AddDisplay(ctrlDisplayItem_0, this.ctrlDisplayItem_0.DataDisplayType);
this.method_10(); //Save Settings
this.ReloadDisplay();
}
private void ReloadDisplay()
{
SpawnDisplays();
}
private void method_9()
{
LoadSettings(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\BMTune\display.txt");
}
private delegate void Delegate0(Struct12 struct12_0);
private void editWarningsToolStripMenuItem_Click(object sender, EventArgs e)
{
this.frmMain_0.SensorWarning_Click(sender, e);
}
public void LoadSettingsBox()
{
DialogResult result = openFileDialog1.ShowDialog();
if (result == DialogResult.OK)
{
LoadSettings(openFileDialog1.FileName);
}
}
public void SaveSettingsBox()
{
DialogResult result = saveFileDialog1.ShowDialog();
if (result == DialogResult.OK)
{
SaveSettings(saveFileDialog1.FileName);
}
}
private void LoadPresetToolStripMenuItem_Click(object sender, EventArgs e)
{
LoadSettingsBox();
}
private void SavePresetToolStripMenuItem_Click(object sender, EventArgs e)
{
SaveSettingsBox();
}
private void UnlockPositionSizingToolStripMenuItem_Click(object sender, EventArgs e)
{
LockedPositionAndSize = !LockedPositionAndSize;
this.unlockPositionSizingToolStripMenuItem.Checked = LockedPositionAndSize;
foreach (CtrlDisplayItemText item in this.collection_0)
{
item.lockPositionSizingToolStripMenuItem.Checked = LockedPositionAndSize;
}
}
/*public void SetButtonsEnabled(int ThisTag, bool Enabled)
{
foreach (CtrlDisplayItemText item in this.collection_0)
{
if (item.DataDisplayType == 5 && (int)item.TypeBUTTON == ThisTag)
{
item.IsLEDActivated = Enabled;
item.Invalidate();
}
}
}*/
}

1796
FrmDataDisplay.resx Normal file

File diff suppressed because it is too large Load Diff

348
ctrlAdvGraph.cs Normal file
View File

@ -0,0 +1,348 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
internal class ctrlAdvGraph : UserControl
{
private Brush brush_0;
private Class10 class10_0;
private Class16_u class16_0;
private Class18_file class18_0;
private Class7_u[,] class7_0;
private Class7_u class7_1;
private ctrlAdvTable[] ctrlAdvTable_0;
public float float_0;
public float float_1;
private float float_2;
private float float_3;
private float float_4;
private float float_5;
private Graphics graphics_0;
private IContainer icontainer_0;
private int int_0;
private int int_1;
private int int_2 = 20;
private int int_3 = 20;
private int int_4;
private int int_5;
private string string_0;
public ctrlAdvGraph()
{
this.InitializeComponent();
this.class16_0 = new Class16_u();
this.float_1 = 5f;
}
private void ctrlAdvGraph_Load(object sender, EventArgs e)
{
this.method_9();
}
private void ctrlAdvGraph_Resize(object sender, EventArgs e)
{
if (this.class7_0 == null)
{
this.method_9();
}
this.class16_0.method_1(base.CreateGraphics(), base.ClientRectangle.Width, base.ClientRectangle.Height);
base.Invalidate();
}
protected override void Dispose(bool disposing)
{
if (disposing && (this.icontainer_0 != null))
{
this.icontainer_0.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
base.SuspendLayout();
base.AutoScaleDimensions = new SizeF(6f, 13f);
base.AutoScaleMode = AutoScaleMode.Font;
base.Name = "ctrlAdvGraph";
base.Load += new EventHandler(this.ctrlAdvGraph_Load);
base.Resize += new EventHandler(this.ctrlAdvGraph_Resize);
base.ResumeLayout(false);
}
internal void method_0(ref Class18_file class18_1, ref Class10 class10_1)
{
this.class18_0 = class18_1;
this.class18_0.delegate58_0 += new Class18_file.Delegate58(this.method_9);
this.class18_0.delegate55_0 += new Class18_file.Delegate55(this.method_9);
this.class10_0 = class10_1;
this.ctrlAdvGraph_Load(null, null);
}
public ctrlAdvTable[] method_1()
{
return this.ctrlAdvTable_0;
}
private void method_10()
{
float num;
string str;
Pen pen = new Pen(this.class18_0.class10_0.color_14, 1f);
Font font = new Font("Lucida Sans", 9f, FontStyle.Bold);
Font font2 = new Font("Lucida Sans", 9f, FontStyle.Bold);
SolidBrush brush = new SolidBrush(this.class18_0.class10_0.color_14);
SolidBrush brush2 = new SolidBrush(this.class18_0.class10_0.color_11);
float num2 = 0f;
StringFormat format = new StringFormat {
FormatFlags = StringFormatFlags.DirectionVertical
};
float num3 = 0f;
float num4 = 0f;
if (this.float_0 == 0f)
{
this.float_0 = 5f;
}
for (float i = 0f; i <= this.float_0; i++)
{
num = (this.int_0 + this.int_0) + ((i * this.int_5) / this.float_0);
str = Math.Round((double) ((((this.float_2 - this.float_3) / this.float_0) * i) + this.float_3), 0).ToString();
this.graphics_0.DrawString(str, font, brush2, num - (this.graphics_0.MeasureString(str, font).Width / 2f), (float) (base.ClientRectangle.Bottom - (this.int_1 - (font.Height / 8))));
this.graphics_0.DrawLine(pen, base.ClientRectangle.Left + num, (float) (base.ClientRectangle.Bottom - this.int_1), base.ClientRectangle.Left + num, (float) (base.ClientRectangle.Top + this.int_1));
}
num2 = 0f;
for (float j = 0f; j <= this.float_1; j++)
{
num = this.int_1 + ((j * this.int_4) / this.float_1);
string s = Math.Round((double) ((((this.float_5 - this.float_4) / this.float_1) * j) + this.float_4), 1).ToString();
if ((Math.Round((double) ((((this.float_5 - this.float_4) / this.float_1) * j) + this.float_4), 0) != 0.0) || ((Math.Round((double) ((((this.float_5 - this.float_4) / this.float_1) * j) + this.float_4), 0) == 0.0) && (this.float_3 != 0f)))
{
this.graphics_0.DrawString(s, font2, brush2, (float) (base.ClientRectangle.Left + (this.int_0 * 0.8f)), (float) ((base.ClientRectangle.Bottom - 8) - num));
}
this.graphics_0.DrawLine(pen, (float) ((base.ClientRectangle.Left + this.int_0) + this.int_0), base.ClientRectangle.Bottom - num, base.ClientRectangle.Right - this.int_0, base.ClientRectangle.Bottom - num);
num2 += this.float_1;
}
str = this.ctrlAdvTable_0[0].string_1[0];
this.graphics_0.DrawString(str, font, brush2, (float) ((base.ClientRectangle.Width - this.graphics_0.MeasureString(str, font).Width) / 2f), (float) ((base.ClientRectangle.Bottom - (((float) this.int_1) / 2f)) - (((float) font.Height) / 20f)));
this.graphics_0.DrawString(this.string_0, font, brush2, base.ClientRectangle.Left + 1f, (base.ClientRectangle.Height - this.graphics_0.MeasureString(this.method_7(), font, 100, format).Height) / 2f, format);
if (pen != null)
{
pen.Dispose();
}
pen = new Pen(this.class18_0.class10_0.color_11, 1f) {
DashStyle = DashStyle.Custom,
DashPattern = new float[] { 6f, 3f }
};
if (this.float_4 < 0f)
{
num4 = (this.int_4 - (this.int_4 * ((0f - this.float_4) / (this.float_5 - this.float_4)))) + this.int_1;
this.graphics_0.DrawLine(pen, (float) ((base.ClientRectangle.Left + this.int_0) + this.int_0), num4, base.ClientRectangle.Right - this.int_0, num4);
}
if (this.float_3 < 0f)
{
num3 = (this.int_0 * 2) + (((0f - this.float_3) / (this.float_2 - this.float_3)) * this.int_5);
this.graphics_0.DrawLine(pen, num3, (float) (base.ClientRectangle.Bottom - this.int_1), num3, (float) (base.ClientRectangle.Top + this.int_1));
}
if ((this.float_4 < 0f) && ((this.float_3 > 0f) || (this.float_3 < 0f)))
{
this.graphics_0.DrawString(0.ToString("N0"), font2, brush2, (float) (num3 - 2f), (float) (num4 - 2f));
}
pen.Dispose();
font.Dispose();
brush.Dispose();
brush2.Dispose();
format.Dispose();
format = null;
pen = null;
font = null;
brush = null;
brush2 = null;
}
private void method_11()
{
SolidBrush brush = new SolidBrush(Color.Red);
Pen pen = new Pen(Color.Red, 2f);
Pen pen2 = new Pen(Color.Blue, 1f);
Pen pen3 = new Pen(this.class18_0.class10_0.color_Trace, 1f);
Pen pen4 = new Pen(this.class18_0.class10_0.color_11);
SolidBrush brush2 = new SolidBrush(this.class18_0.class10_0.color_Trace);
Font font = new Font("Lucida Sans", 6.5f, FontStyle.Bold);
SolidBrush brush3 = new SolidBrush(this.class18_0.class10_0.color_11);
Class7_u class2 = null;
Class7_u class3 = null;
int green = 0;
int col = 0;
int num3 = 0;
float num4 = 0f;
ctrlAdvTable table = null;
for (int i = 0; i < this.ctrlAdvTable_0.Length; i++)
{
num3 += this.ctrlAdvTable_0[i].method_5() - 1;
}
for (int j = 0; j < this.ctrlAdvTable_0.Length; j++)
{
table = this.ctrlAdvTable_0[j];
for (int k = 1; k < table.method_5(); k++)
{
class2 = null;
class3 = null;
green = (0xff - ((((0xff * k) * (j + 1)) / num3) + 1)) % 0xff;
if (green < 0)
{
green *= -1;
}
for (col = 0; col < table.method_3(); col++)
{
pen.Color = Color.FromArgb(0xff, green, 0);
brush.Color = Color.FromArgb(0xff, green, 0);
num4 = (float) table.method_14((byte) col, (byte) k);
if (num4 > this.float_5)
{
num4 = this.float_5;
}
float yChart = (this.int_4 - (this.int_4 * ((num4 - this.float_4) / (this.float_5 - this.float_4)))) + this.int_1;
float xChart = (2 * this.int_0) + (((((float) table.method_14((byte) col, 0)) - this.float_3) / (this.float_2 - this.float_3)) * this.int_5);
if ((this.float_5 - this.float_4) != 0f)
{
if (this.class7_0[col, k] == null)
{
this.class7_0[col, k] = new Class7_u(xChart, yChart, (float) table.method_14((byte) col, 0), (float) table.method_14((byte) col, (byte) k), col, k);
this.class7_0[col, k].bool_1 = table.method_15(col, k);
}
else
{
this.class7_0[col, k].method_9(xChart);
this.class7_0[col, k].method_11(yChart);
this.class7_0[col, k].method_7((float) table.method_14((byte) col, (byte) k));
this.class7_0[col, k].bool_0 = table.method_15(col, k);
}
class3 = this.class7_0[col, k];
this.graphics_0.FillRectangle(brush, (float) (class3.method_8() - 2f), (float) (class3.method_10() - 2f), (float) 5f, (float) 5f);
if (class2 != null)
{
this.graphics_0.DrawLine(pen, class2.method_8(), class2.method_10(), class3.method_8(), class3.method_10());
}
if (this.class7_0[col, k].bool_0)
{
this.graphics_0.DrawRectangle(pen4, (float) (this.class7_0[col, k].method_8() - 4f), (float) (this.class7_0[col, k].method_10() - 3.5f), (float) 8f, (float) 8f);
}
}
class2 = class3;
}
}
}
pen.Dispose();
pen = null;
pen4.Dispose();
pen4 = null;
pen3.Dispose();
pen3 = null;
pen2.Dispose();
pen2 = null;
font.Dispose();
font = null;
brush3.Dispose();
brush3 = null;
brush.Dispose();
brush = null;
brush2.Dispose();
brush2 = null;
}
public void method_2(ctrlAdvTable[] ctrlAdvTable_1)
{
this.ctrlAdvTable_0 = ctrlAdvTable_1;
if (this.ctrlAdvTable_0 != null)
{
this.float_0 = this.ctrlAdvTable_0[0].method_3() - 1;
}
}
public float method_3()
{
return this.float_4;
}
public void method_4(float float_6)
{
this.float_4 = float_6;
}
public float method_5()
{
return this.float_5;
}
public void method_6(float float_6)
{
this.float_5 = float_6;
}
public string method_7()
{
return this.string_0;
}
public void method_8(string string_1)
{
this.string_0 = string_1;
}
private void method_9()
{
if (this.class18_0 != null)
{
if (this.class18_0.method_30_HasFileLoadedInBMTune())
{
int num = 0;
for (int i = 0; i < this.ctrlAdvTable_0.Length; i++)
{
num = this.ctrlAdvTable_0[i].method_5();
}
this.class7_0 = new Class7_u[this.ctrlAdvTable_0[0].method_3(), num];
}
this.Refresh();
}
}
protected override void OnPaint(PaintEventArgs pe)
{
this.int_0 = 30;
this.int_1 = 0x19;
this.int_5 = base.ClientRectangle.Width - (3 * this.int_0);
this.int_4 = base.ClientRectangle.Height - (2 * this.int_1);
this.brush_0 = new SolidBrush(this.class10_0.color_3);
if (this.class18_0 == null)
{
this.graphics_0 = pe.Graphics;
this.graphics_0.FillRectangle(this.brush_0, pe.ClipRectangle.X, pe.ClipRectangle.Y, pe.ClipRectangle.Width, pe.ClipRectangle.Height);
//this.graphics_0.FillRectangle(new SolidBrush(SystemColors.Control), pe.ClipRectangle.X, pe.ClipRectangle.Y, pe.ClipRectangle.Width, pe.ClipRectangle.Height);
}
else if (!this.class18_0.method_30_HasFileLoadedInBMTune() || !this.class16_0.method_0())
{
this.graphics_0 = pe.Graphics;
this.graphics_0.SmoothingMode = SmoothingMode.None;
this.graphics_0.FillRectangle(this.brush_0, pe.ClipRectangle.X, pe.ClipRectangle.Y, pe.ClipRectangle.Width, pe.ClipRectangle.Height);
}
else if (this.class16_0.method_0())
{
this.graphics_0 = this.class16_0.method_3();
this.graphics_0.SmoothingMode = SmoothingMode.AntiAlias;
this.graphics_0.FillRectangle(this.brush_0, pe.ClipRectangle.X, pe.ClipRectangle.Y, pe.ClipRectangle.Width, pe.ClipRectangle.Height);
this.int_2 = 20;
this.int_3 = 20;
this.float_2 = (float) this.ctrlAdvTable_0[0].method_7();
this.float_3 = (float) this.ctrlAdvTable_0[0].method_8();
this.method_10();
this.method_11();
this.class16_0.method_2(pe.Graphics);
}
}
protected override void OnPaintBackground(PaintEventArgs pe)
{
}
}

1028
ctrlAdvTable.cs Normal file

File diff suppressed because it is too large Load Diff

126
ctrlAdvTable.resx Normal file
View File

@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="errorProvider_0.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>172, 17</value>
</metadata>
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

136
ctrlBatteryOffset.cs Normal file
View File

@ -0,0 +1,136 @@
using System;
using System.IO;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Drawing;
using System.Runtime.CompilerServices;
using System.Windows.Forms;
internal class ctrlBatteryOffset : UserControl
{
private bool bool_0;
private Class18 class18_0;
private IContainer icontainer_0;
private ComboBox lst;
public event Delegate64 delegate64_0;
internal ctrlBatteryOffset()
{
this.InitializeComponent();
}
private void ctrlBatteryOffset_Load(object sender, EventArgs e)
{
//this.method_2();
//foreach (Class24_u class2 in this.class18_0.Inj_collection) this.lst.Items.Add(class2.string_0);
}
protected override void Dispose(bool disposing)
{
if (disposing && (this.icontainer_0 != null))
{
this.icontainer_0.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.lst = new System.Windows.Forms.ComboBox();
this.SuspendLayout();
//
// lst
//
this.lst.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.lst.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.lst.Dock = System.Windows.Forms.DockStyle.Fill;
this.lst.DropDownHeight = 325;
this.lst.DropDownWidth = 340;
this.lst.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lst.FormattingEnabled = true;
this.lst.IntegralHeight = false;
this.lst.Location = new System.Drawing.Point(0, 0);
this.lst.Name = "lst";
this.lst.Size = new System.Drawing.Size(282, 21);
this.lst.TabIndex = 0;
this.lst.SelectedIndexChanged += new System.EventHandler(this.lst_SelectedIndexChanged);
//
// ctrlBatteryOffset
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.lst);
this.Name = "ctrlBatteryOffset";
this.Size = new System.Drawing.Size(282, 21);
this.Load += new System.EventHandler(this.ctrlBatteryOffset_Load);
this.ResumeLayout(false);
}
private void lst_SelectedIndexChanged(object sender, EventArgs e)
{
if (!this.bool_0 && (this.delegate64_0 != null))
{
this.delegate64_0(null, this.class18_0.class24_u_0[this.lst.SelectedIndex].double_0, this.class18_0.class24_u_0[this.lst.SelectedIndex].double_1, this.lst.SelectedIndex, this.class18_0.class24_u_0[this.lst.SelectedIndex].string_0);
}
}
public void method_0(ref Class18 class18_1)
{
this.class18_0 = class18_1;
foreach (Class24_u class24_u_1 in this.class18_0.class24_u_0) this.lst.Items.Add(class24_u_1.string_0);
foreach (Control control in base.Controls)
{
float emSize = control.Font.Size * (class18_0.class10_settings_0.scaleRate / 100f);
control.Font = new Font(control.Font.Name, emSize, control.Font.Style, control.Font.Unit);
}
}
public void method_1(byte byte_0)
{
this.bool_0 = true;
this.lst.SelectedIndex = byte_0;
this.bool_0 = false;
}
/*private void method_2()
{
Class24_u item = null;
item = new Class24_u {
string_0 = "Acura Integra (92-96 VTEC) 240cc (23lb) 12ohm",
double_0 = new double[] { 24.56, 16.08, 14.16, 12.13, 10.11, 8.09, 0.0 },
double_1 = new double[] { 0.29, 0.29, 0.4, 0.56, 0.79, 1.22, 1.22 }
};
this.class18_0.Inj_collection.Add(item);
item = new Class24_u {
string_0 = "Honda Civic (92-00 EX/SI) 240cc (23lb) 12ohm",
double_0 = new double[] { 24.56, 16.08, 14.16, 12.13, 10.11, 8.09, 0.0 },
double_1 = new double[] { 0.32, 0.33, 0.47, 0.62, 1.09, 2.05, 2.05 }
};
this.class18_0.Inj_collection.Add(item);
item = new Class24_u
{
string_0 = "Honda Civic (92-00 LX/DX/HX) 190cc (18lb) 12ohm",
double_0 = new double[] { 16.0, 15.0, 14.0, 13.0, 12.0, 10.0, 8.0 },
double_1 = new double[] { 0.31, 0.34, 0.46, 0.60, 0.80, 1.17, 1.82 }
};
this.class18_0.Inj_collection.Add(item);
//################################################################################################
}*/
public double[] method_3()
{
return this.class18_0.class24_u_0[this.lst.SelectedIndex].double_0;
}
public double[] method_4()
{
return this.class18_0.class24_u_0[this.lst.SelectedIndex].double_1;
}
public delegate void Delegate64(byte[] byte_0, double[] double_0, double[] double_1, int int_0, string string_0);
}

120
ctrlBatteryOffset.resx Normal file
View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

3286
ctrlMapGraph.cs Normal file

File diff suppressed because it is too large Load Diff

120
ctrlMapGraph.resx Normal file
View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

250
frmAboutBox.cs Normal file
View File

@ -0,0 +1,250 @@
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Reflection;
using System.Windows.Forms;
internal class frmAboutBox : Form
{
private FrmMain frmMain_0;
private IContainer icontainer_0;
private Label labelProductName;
private LinkLabel linkBMTune;
private LinkLabel linkForum;
private Button okButton;
private PictureBox pictureBox1;
private LinkLabel linkLabel1;
private LinkLabel linkLabel2;
private TextBox textBoxDescription;
public frmAboutBox(ref FrmMain frm)
{
this.InitializeComponent();
this.frmMain_0 = frm;
this.Text = string.Format("About {0}", this.method_0());
this.labelProductName.Text = this.method_3() + " - " + this.frmMain_0.class15_0.CurrentBMTuneVersion;
/*foreach (Control control in base.Controls)
{
float emSize = control.Font.Size * (class18_0.class10_settings_0.scaleRate / 100f);
control.Font = new Font(control.Font.Name, emSize, control.Font.Style, control.Font.Unit);
}*/
}
protected override void Dispose(bool disposing)
{
if (disposing && (this.icontainer_0 != null))
{
this.icontainer_0.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmAboutBox));
this.labelProductName = new System.Windows.Forms.Label();
this.linkBMTune = new System.Windows.Forms.LinkLabel();
this.okButton = new System.Windows.Forms.Button();
this.textBoxDescription = new System.Windows.Forms.TextBox();
this.linkForum = new System.Windows.Forms.LinkLabel();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
this.linkLabel2 = new System.Windows.Forms.LinkLabel();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// labelProductName
//
this.labelProductName.AutoSize = true;
this.labelProductName.Location = new System.Drawing.Point(13, 196);
this.labelProductName.Margin = new System.Windows.Forms.Padding(7, 0, 3, 0);
this.labelProductName.MaximumSize = new System.Drawing.Size(0, 18);
this.labelProductName.Name = "labelProductName";
this.labelProductName.Size = new System.Drawing.Size(82, 14);
this.labelProductName.TabIndex = 19;
this.labelProductName.Text = "Product Name";
this.labelProductName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// linkBMTune
//
this.linkBMTune.AutoSize = true;
this.linkBMTune.Location = new System.Drawing.Point(11, 422);
this.linkBMTune.Name = "linkBMTune";
this.linkBMTune.Size = new System.Drawing.Size(50, 14);
this.linkBMTune.TabIndex = 29;
this.linkBMTune.TabStop = true;
this.linkBMTune.Text = "Website";
this.linkBMTune.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkBMTune_LinkClicked);
//
// okButton
//
this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.okButton.AutoSize = true;
this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
this.okButton.Location = new System.Drawing.Point(269, 417);
this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(62, 25);
this.okButton.TabIndex = 24;
this.okButton.Text = "&OK";
//
// textBoxDescription
//
this.textBoxDescription.Location = new System.Drawing.Point(9, 217);
this.textBoxDescription.Margin = new System.Windows.Forms.Padding(7, 3, 3, 3);
this.textBoxDescription.Multiline = true;
this.textBoxDescription.Name = "textBoxDescription";
this.textBoxDescription.ReadOnly = true;
this.textBoxDescription.Size = new System.Drawing.Size(322, 194);
this.textBoxDescription.TabIndex = 23;
this.textBoxDescription.TabStop = false;
this.textBoxDescription.Text = resources.GetString("textBoxDescription.Text");
this.textBoxDescription.TextChanged += new System.EventHandler(this.textBoxDescription_TextChanged);
//
// linkForum
//
this.linkForum.AutoSize = true;
this.linkForum.Location = new System.Drawing.Point(67, 422);
this.linkForum.Name = "linkForum";
this.linkForum.Size = new System.Drawing.Size(89, 14);
this.linkForum.TabIndex = 30;
this.linkForum.TabStop = true;
this.linkForum.Text = "Facebook Page";
this.linkForum.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkForum_LinkClicked);
//
// pictureBox1
//
this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Top;
this.pictureBox1.Image = global::Properties.Resources.BMTune_Logo_150x901;
this.pictureBox1.Location = new System.Drawing.Point(10, 10);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(321, 154);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 27;
this.pictureBox1.TabStop = false;
//
// linkLabel1
//
this.linkLabel1.AutoSize = true;
this.linkLabel1.Font = new System.Drawing.Font("Lucida Sans", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.linkLabel1.Location = new System.Drawing.Point(62, 172);
this.linkLabel1.Name = "linkLabel1";
this.linkLabel1.Size = new System.Drawing.Size(217, 15);
this.linkLabel1.TabIndex = 31;
this.linkLabel1.TabStop = true;
this.linkLabel1.Text = "END-USER LICENSE AGREEMENT";
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
//
// linkLabel2
//
this.linkLabel2.AutoSize = true;
this.linkLabel2.Location = new System.Drawing.Point(162, 422);
this.linkLabel2.Name = "linkLabel2";
this.linkLabel2.Size = new System.Drawing.Size(96, 14);
this.linkLabel2.TabIndex = 32;
this.linkLabel2.TabStop = true;
this.linkLabel2.Text = "Facebook Group";
this.linkLabel2.Visible = false;
this.linkLabel2.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel2_LinkClicked);
//
// frmAboutBox
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(341, 448);
this.Controls.Add(this.linkLabel2);
this.Controls.Add(this.linkLabel1);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.textBoxDescription);
this.Controls.Add(this.labelProductName);
this.Controls.Add(this.linkBMTune);
this.Controls.Add(this.okButton);
this.Controls.Add(this.linkForum);
this.Font = new System.Drawing.Font("Lucida Sans", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "frmAboutBox";
this.Padding = new System.Windows.Forms.Padding(10);
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "About BMTune";
this.Load += new System.EventHandler(this.frmAboutBox_Load);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
private void linkBMTune_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
Process.Start("http://www.bmtune.com/");
}
private void linkForum_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
Process.Start("https://www.facebook.com/BMTuneSoftware/");
}
public string method_0()
{
object[] customAttributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false);
if (customAttributes.Length > 0)
{
AssemblyTitleAttribute attribute = (AssemblyTitleAttribute) customAttributes[0];
if (attribute.Title != "")
{
return attribute.Title;
}
}
return Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase);
}
public string method_3()
{
object[] customAttributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false);
if (customAttributes.Length == 0)
{
return "";
}
return ((AssemblyProductAttribute) customAttributes[0]).Product;
}
private void frmAboutBox_Load(object sender, EventArgs e)
{
}
private void textBoxDescription_TextChanged(object sender, EventArgs e)
{
}
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
frmCopyright frmCopyright_0 = new frmCopyright(ref frmMain_0);
frmCopyright_0.ShowDialog();
frmCopyright_0.Dispose();
frmCopyright_0 = null;
}
private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
Process.Start("https://www.facebook.com/groups/BMTune/");
}
/*public string method_5()
{
object[] customAttributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false);
if (customAttributes.Length == 0)
{
return "";
}
return ((AssemblyCompanyAttribute) customAttributes[0]).Company;
}*/
}

1797
frmAboutBox.resx Normal file

File diff suppressed because it is too large Load Diff

179
frmAccelTimeSetting.cs Normal file
View File

@ -0,0 +1,179 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Globalization;
using System.Windows.Forms;
internal class frmAccelTimeSetting : Form
{
private Button btnOk;
private ErrorProvider errorProvider_0;
private IContainer icontainer_0;
private IContainer components;
private Label label1;
private TextBox txt_MinSpeed;
private Label label4;
private TextBox txt_MaxSpeed;
private Label label2;
private Label label5;
private Class18 class18_0;
internal frmAccelTimeSetting()
{
this.InitializeComponent();
}
internal void method_0(ref Class18 rm)
{
this.class18_0 = rm;
foreach (Control control in base.Controls)
{
float emSize = control.Font.Size * (class18_0.class10_settings_0.scaleRate / 100f);
control.Font = new Font(control.Font.Name, emSize, control.Font.Style, control.Font.Unit);
}
this.txt_MinSpeed.Text = this.class18_0.class10_settings_0.AccelTimerSpeedStart.ToString();
this.txt_MaxSpeed.Text = this.class18_0.class10_settings_0.AccelTimerSpeedEnd.ToString();
}
private void btnOk_Click(object sender, EventArgs e)
{
this.class18_0.method_155("Live Plots Settings");
try
{
this.class18_0.class10_settings_0.AccelTimerSpeedStart = int.Parse(this.txt_MinSpeed.Text);
this.class18_0.class10_settings_0.AccelTimerSpeedEnd = int.Parse(this.txt_MaxSpeed.Text);
this.Close();
}
catch (Exception exception)
{
MessageBox.Show(Form.ActiveForm, exception.Message, "BMTune", MessageBoxButtons.OK, MessageBoxIcon.Hand);
}
}
protected override void Dispose(bool disposing)
{
if (disposing && (this.icontainer_0 != null))
{
this.icontainer_0.Dispose();
}
base.Dispose(disposing);
}
private void frmAdvTableAdd_Load(object sender, EventArgs e)
{
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmAccelTimeSetting));
this.btnOk = new System.Windows.Forms.Button();
this.errorProvider_0 = new System.Windows.Forms.ErrorProvider(this.components);
this.label1 = new System.Windows.Forms.Label();
this.txt_MinSpeed = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.txt_MaxSpeed = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.errorProvider_0)).BeginInit();
this.SuspendLayout();
//
// btnOk
//
this.btnOk.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btnOk.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOk.Location = new System.Drawing.Point(94, 79);
this.btnOk.Name = "btnOk";
this.btnOk.Size = new System.Drawing.Size(87, 25);
this.btnOk.TabIndex = 2;
this.btnOk.Text = "Apply";
this.btnOk.UseVisualStyleBackColor = true;
this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
//
// errorProvider_0
//
this.errorProvider_0.ContainerControl = this;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 18);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(139, 14);
this.label1.TabIndex = 3;
this.label1.Text = "Min Speed to Start timer:";
//
// txt_MinSpeed
//
this.txt_MinSpeed.Location = new System.Drawing.Point(168, 15);
this.txt_MinSpeed.Name = "txt_MinSpeed";
this.txt_MinSpeed.Size = new System.Drawing.Size(43, 20);
this.txt_MinSpeed.TabIndex = 4;
this.txt_MinSpeed.Text = "0";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(12, 46);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(137, 14);
this.label2.TabIndex = 5;
this.label2.Text = "Max Speed to End timer:";
//
// txt_MaxSpeed
//
this.txt_MaxSpeed.Location = new System.Drawing.Point(168, 43);
this.txt_MaxSpeed.Name = "txt_MaxSpeed";
this.txt_MaxSpeed.Size = new System.Drawing.Size(43, 20);
this.txt_MaxSpeed.TabIndex = 6;
this.txt_MaxSpeed.Text = "50";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(217, 18);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(35, 14);
this.label4.TabIndex = 8;
this.label4.Text = "km/h";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(217, 46);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(35, 14);
this.label5.TabIndex = 9;
this.label5.Text = "km/h";
//
// frmAccelTimeSetting
//
this.AcceptButton = this.btnOk;
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(263, 116);
this.Controls.Add(this.label5);
this.Controls.Add(this.label1);
this.Controls.Add(this.txt_MinSpeed);
this.Controls.Add(this.btnOk);
this.Controls.Add(this.label4);
this.Controls.Add(this.label2);
this.Controls.Add(this.txt_MaxSpeed);
this.Font = new System.Drawing.Font("Lucida Sans", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "frmAccelTimeSetting";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Accel Time Settings";
this.Load += new System.EventHandler(this.frmAdvTableAdd_Load);
((System.ComponentModel.ISupportInitialize)(this.errorProvider_0)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
}

1790
frmAccelTimeSetting.resx Normal file

File diff suppressed because it is too large Load Diff

542
frmActiveDatalog.cs Normal file
View File

@ -0,0 +1,542 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
internal class frmActiveDatalog : Form
{
private Class18 class18_0;
private FrmMain frmMain_0;
private IContainer icontainer_0;
private IContainer components;
private Panel panel1;
public Button btnPreset2;
public Button btnPreset1;
public bool loading = true;
private ListView listView1;
private ColumnHeader columnHeader1;
private ColumnHeader columnHeader2;
public Button button3;
private TextBox textBox1;
private Label label1;
private Label label2;
public Button button5;
public Button button4;
public Button btnPreset4;
private Label label3;
public Button btnPreset3;
private CheckBox checkBox1;
private ColumnHeader columnHeader3;
internal frmActiveDatalog()
{
this.InitializeComponent();
}
internal void method_0(ref Class18 class18_1, ref FrmMain frmMain_1)
{
this.class18_0 = class18_1;
this.frmMain_0 = frmMain_1;
foreach (Control control in base.Controls)
{
float emSize = control.Font.Size * (class18_0.class10_settings_0.scaleRate / 100f);
control.Font = new Font(control.Font.Name, emSize, control.Font.Style, control.Font.Unit);
}
//LoopTimer.Interval = 1000;
//LoopTimer.Tick += DoThisAllTheTime;
//LoopTimer.Start();
}
void SpawnThreadList()
{
loading = true;
this.textBox1.Text = "";
this.panel1.Size = new Size(342, 54);
this.checkBox1.Checked = this.frmMain_0.class10_settings_0.DatalogThreadEnabled;
this.btnPreset1.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnPreset2.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnPreset3.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnPreset4.ForeColor = System.Drawing.SystemColors.ControlText;
if (this.frmMain_0.class10_settings_0.DatalogCurrentPreset == 1) this.btnPreset1.ForeColor = System.Drawing.Color.Red;
if (this.frmMain_0.class10_settings_0.DatalogCurrentPreset == 2) this.btnPreset2.ForeColor = System.Drawing.Color.Red;
if (this.frmMain_0.class10_settings_0.DatalogCurrentPreset == 3) this.btnPreset3.ForeColor = System.Drawing.Color.Red;
if (this.frmMain_0.class10_settings_0.DatalogCurrentPreset == 4) this.btnPreset4.ForeColor = System.Drawing.Color.Red;
this.listView1.Items.Clear();
this.listView1.Items.Add("");
this.listView1.Items[this.listView1.Items.Count - 1].SubItems.Add("AFR Target");
this.listView1.Items[this.listView1.Items.Count - 1].SubItems.Add(this.frmMain_0.class10_settings_0.int_ActiveDatalog[0].ToString());
this.listView1.Items.Add("");
this.listView1.Items[this.listView1.Items.Count - 1].SubItems.Add("Sensors Graph");
this.listView1.Items[this.listView1.Items.Count - 1].SubItems.Add(this.frmMain_0.class10_settings_0.int_ActiveDatalog[1].ToString());
this.listView1.Items.Add("");
this.listView1.Items[this.listView1.Items.Count - 1].SubItems.Add("Sensors Data");
this.listView1.Items[this.listView1.Items.Count - 1].SubItems.Add(this.frmMain_0.class10_settings_0.int_ActiveDatalog[2].ToString());
this.listView1.Items.Add("");
this.listView1.Items[this.listView1.Items.Count - 1].SubItems.Add("Sensors Gauges");
this.listView1.Items[this.listView1.Items.Count - 1].SubItems.Add(this.frmMain_0.class10_settings_0.int_ActiveDatalog[3].ToString());
this.listView1.Items.Add("");
this.listView1.Items[this.listView1.Items.Count - 1].SubItems.Add("Tables Grid");
this.listView1.Items[this.listView1.Items.Count - 1].SubItems.Add(this.frmMain_0.class10_settings_0.int_ActiveDatalog[4].ToString());
this.listView1.Items.Add("");
this.listView1.Items[this.listView1.Items.Count - 1].SubItems.Add("Live Plots");
this.listView1.Items[this.listView1.Items.Count - 1].SubItems.Add(this.frmMain_0.class10_settings_0.int_ActiveDatalog[5].ToString());
this.listView1.Items.Add("");
this.listView1.Items[this.listView1.Items.Count - 1].SubItems.Add("Tracing");
this.listView1.Items[this.listView1.Items.Count - 1].SubItems.Add(this.frmMain_0.class10_settings_0.int_ActiveDatalog[6].ToString());
for (int i = 0; i < listView1.Items.Count; i++) this.listView1.Items[i].Checked = this.frmMain_0.class10_settings_0.bool_ActiveDatalog[i];
this.Invalidate();
loading = false;
}
private void ListView1_ItemChecked(object sender, ItemCheckedEventArgs e)
{
if (!loading)
{
for (int i = 0; i < listView1.Items.Count; i++)
{
if (listView1.Items[i].SubItems.Count >= 3)
{
if (listView1.Items[i].SubItems[1].Text == "AFR Target") this.frmMain_0.class10_settings_0.bool_ActiveDatalog[0] = listView1.Items[i].Checked;
if (listView1.Items[i].SubItems[1].Text == "Sensors Graph") this.frmMain_0.class10_settings_0.bool_ActiveDatalog[1] = listView1.Items[i].Checked;
if (listView1.Items[i].SubItems[1].Text == "Sensors Data") this.frmMain_0.class10_settings_0.bool_ActiveDatalog[2] = listView1.Items[i].Checked;
if (listView1.Items[i].SubItems[1].Text == "Sensors Gauges") this.frmMain_0.class10_settings_0.bool_ActiveDatalog[3] = listView1.Items[i].Checked;
if (listView1.Items[i].SubItems[1].Text == "Tables Grid") this.frmMain_0.class10_settings_0.bool_ActiveDatalog[4] = listView1.Items[i].Checked;
if (listView1.Items[i].SubItems[1].Text == "Live Plots") this.frmMain_0.class10_settings_0.bool_ActiveDatalog[5] = listView1.Items[i].Checked;
if (listView1.Items[i].SubItems[1].Text == "Tracing") this.frmMain_0.class10_settings_0.bool_ActiveDatalog[6] = listView1.Items[i].Checked;
}
}
}
}
private void BtnPreset1_Click(object sender, EventArgs e)
{
int NewPreset = int.Parse(((Button)sender).Tag.ToString());
int OldPreset = this.frmMain_0.class10_settings_0.DatalogCurrentPreset;
if (NewPreset != OldPreset)
{
//Save The Preset to the buffer before loading the current preset from the buffer
for (int i = 0; i < this.frmMain_0.class10_settings_0.int_ActiveDatalog.Length; i++)
{
if (OldPreset == 1)
{
this.frmMain_0.class10_settings_0.bool_ActiveDatalog_Preset1[i] = this.frmMain_0.class10_settings_0.bool_ActiveDatalog[i];
this.frmMain_0.class10_settings_0.int_ActiveDatalog_Preset1[i] = this.frmMain_0.class10_settings_0.int_ActiveDatalog[i];
}
else if (OldPreset == 2)
{
this.frmMain_0.class10_settings_0.bool_ActiveDatalog_Preset2[i] = this.frmMain_0.class10_settings_0.bool_ActiveDatalog[i];
this.frmMain_0.class10_settings_0.int_ActiveDatalog_Preset2[i] = this.frmMain_0.class10_settings_0.int_ActiveDatalog[i];
}
else if (OldPreset == 3)
{
this.frmMain_0.class10_settings_0.bool_ActiveDatalog_Preset3[i] = this.frmMain_0.class10_settings_0.bool_ActiveDatalog[i];
this.frmMain_0.class10_settings_0.int_ActiveDatalog_Preset3[i] = this.frmMain_0.class10_settings_0.int_ActiveDatalog[i];
}
else if (OldPreset == 4)
{
this.frmMain_0.class10_settings_0.bool_ActiveDatalog_Preset4[i] = this.frmMain_0.class10_settings_0.bool_ActiveDatalog[i];
this.frmMain_0.class10_settings_0.int_ActiveDatalog_Preset4[i] = this.frmMain_0.class10_settings_0.int_ActiveDatalog[i];
}
}
//loading the current preset from the buffer
this.frmMain_0.class10_settings_0.DatalogCurrentPreset = NewPreset;
for (int i = 0; i < this.frmMain_0.class10_settings_0.int_ActiveDatalog.Length; i++)
{
if (NewPreset == 1)
{
this.frmMain_0.class10_settings_0.bool_ActiveDatalog[i] = this.frmMain_0.class10_settings_0.bool_ActiveDatalog_Preset1[i];
this.frmMain_0.class10_settings_0.int_ActiveDatalog[i] = this.frmMain_0.class10_settings_0.int_ActiveDatalog_Preset1[i];
}
else if (NewPreset == 2)
{
this.frmMain_0.class10_settings_0.bool_ActiveDatalog[i] = this.frmMain_0.class10_settings_0.bool_ActiveDatalog_Preset2[i];
this.frmMain_0.class10_settings_0.int_ActiveDatalog[i] = this.frmMain_0.class10_settings_0.int_ActiveDatalog_Preset2[i];
}
else if (NewPreset == 3)
{
this.frmMain_0.class10_settings_0.bool_ActiveDatalog[i] = this.frmMain_0.class10_settings_0.bool_ActiveDatalog_Preset3[i];
this.frmMain_0.class10_settings_0.int_ActiveDatalog[i] = this.frmMain_0.class10_settings_0.int_ActiveDatalog_Preset3[i];
}
else if (NewPreset == 4)
{
this.frmMain_0.class10_settings_0.bool_ActiveDatalog[i] = this.frmMain_0.class10_settings_0.bool_ActiveDatalog_Preset4[i];
this.frmMain_0.class10_settings_0.int_ActiveDatalog[i] = this.frmMain_0.class10_settings_0.int_ActiveDatalog_Preset4[i];
}
}
SpawnThreadList();
}
}
private void ListView1_SelectedIndexChanged(object sender, EventArgs e)
{
if (this.listView1.SelectedItems.Count > 0)
{
this.textBox1.Text = this.listView1.SelectedItems[0].SubItems[2].Text;
this.panel1.Size = new Size(342, 82);
}
}
private void Button3_Click(object sender, EventArgs e)
{
//Apply/Set new refresh delay
if (this.listView1.SelectedItems.Count > 0)
{
this.listView1.SelectedItems[0].SubItems[2].Text = this.textBox1.Text;
for (int i = 0; i < listView1.Items.Count; i++)
{
if (listView1.Items[i].SubItems.Count >= 3)
{
if (listView1.Items[i].SubItems[1].Text == "AFR Target") this.frmMain_0.class10_settings_0.int_ActiveDatalog[0] = int.Parse(listView1.Items[i].SubItems[2].Text);
if (listView1.Items[i].SubItems[1].Text == "Sensors Graph") this.frmMain_0.class10_settings_0.int_ActiveDatalog[1] = int.Parse(listView1.Items[i].SubItems[2].Text);
if (listView1.Items[i].SubItems[1].Text == "Sensors Data") this.frmMain_0.class10_settings_0.int_ActiveDatalog[2] = int.Parse(listView1.Items[i].SubItems[2].Text);
if (listView1.Items[i].SubItems[1].Text == "Sensors Gauges") this.frmMain_0.class10_settings_0.int_ActiveDatalog[3] = int.Parse(listView1.Items[i].SubItems[2].Text);
if (listView1.Items[i].SubItems[1].Text == "Tables Grid") this.frmMain_0.class10_settings_0.int_ActiveDatalog[4] = int.Parse(listView1.Items[i].SubItems[2].Text);
if (listView1.Items[i].SubItems[1].Text == "Live Plots") this.frmMain_0.class10_settings_0.int_ActiveDatalog[5] = int.Parse(listView1.Items[i].SubItems[2].Text);
if (listView1.Items[i].SubItems[1].Text == "Tracing") this.frmMain_0.class10_settings_0.int_ActiveDatalog[6] = int.Parse(listView1.Items[i].SubItems[2].Text);
}
}
SpawnThreadList();
}
}
private void Button5_Click(object sender, EventArgs e)
{
for (int i = 0; i < this.frmMain_0.class10_settings_0.int_ActiveDatalog.Length; i++)
{
this.frmMain_0.class10_settings_0.int_ActiveDatalog[i] = this.frmMain_0.class10_settings_0.int_ActiveDatalog[i] + 5;
}
SpawnThreadList();
}
private void Button4_Click(object sender, EventArgs e)
{
for (int i = 0; i < this.frmMain_0.class10_settings_0.int_ActiveDatalog.Length; i++)
{
this.frmMain_0.class10_settings_0.int_ActiveDatalog[i] = this.frmMain_0.class10_settings_0.int_ActiveDatalog[i] - 5;
}
SpawnThreadList();
}
protected override void Dispose(bool disposing)
{
if (disposing && (this.icontainer_0 != null))
{
this.icontainer_0.Dispose();
}
base.Dispose(disposing);
}
private void frmActiveDatalog_FormClosed(object sender, FormClosedEventArgs e)
{
if (this.class18_0.class10_settings_0.WindowedMode) this.class18_0.class10_settings_0.ActiveDatalog_Location = base.Location;
this.frmMain_0.frmActiveDatalog_0.Dispose();
this.frmMain_0.frmActiveDatalog_0 = null;
}
private void frmActiveDatalog_Load(object sender, EventArgs e)
{
if (this.class18_0 != null)
{
if (this.class18_0.class10_settings_0 != null)
{
if (this.class18_0.class10_settings_0.WindowedMode)
{
this.FormBorderStyle = FormBorderStyle.Sizable;
this.Dock = DockStyle.None;
base.Location = this.class18_0.class10_settings_0.ActiveDatalog_Location;
base.Size = this.class18_0.class10_settings_0.ActiveDatalog_Size;
}
else
{
this.FormBorderStyle = FormBorderStyle.None;
this.Dock = DockStyle.Fill;
}
}
}
SpawnThreadList();
}
private void frmActiveDatalog_Resize(object sender, EventArgs e)
{
if (this.class18_0 != null)
{
if (this.class18_0.class10_settings_0 != null)
{
if (this.class18_0.class10_settings_0.WindowedMode && !loading)
{
if (base.WindowState == FormWindowState.Normal)
{
this.class18_0.class10_settings_0.ActiveDatalog_Size = base.Size;
}
this.class18_0.class10_settings_0.ActiveDatalog_Location = base.Location;
}
}
}
}
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmActiveDatalog));
this.panel1 = new System.Windows.Forms.Panel();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.btnPreset4 = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label();
this.btnPreset3 = new System.Windows.Forms.Button();
this.label2 = new System.Windows.Forms.Label();
this.button5 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.btnPreset1 = new System.Windows.Forms.Button();
this.btnPreset2 = new System.Windows.Forms.Button();
this.listView1 = new System.Windows.Forms.ListView();
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.Controls.Add(this.checkBox1);
this.panel1.Controls.Add(this.btnPreset4);
this.panel1.Controls.Add(this.label3);
this.panel1.Controls.Add(this.btnPreset3);
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.button5);
this.panel1.Controls.Add(this.button4);
this.panel1.Controls.Add(this.button3);
this.panel1.Controls.Add(this.textBox1);
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.btnPreset1);
this.panel1.Controls.Add(this.btnPreset2);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(342, 82);
this.panel1.TabIndex = 1;
//
// checkBox1
//
this.checkBox1.AutoSize = true;
this.checkBox1.Location = new System.Drawing.Point(12, 5);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(125, 17);
this.checkBox1.TabIndex = 11;
this.checkBox1.Text = "Enable DTL Threads";
this.checkBox1.UseVisualStyleBackColor = true;
this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
//
// btnPreset4
//
this.btnPreset4.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnPreset4.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnPreset4.Location = new System.Drawing.Point(113, 26);
this.btnPreset4.Name = "btnPreset4";
this.btnPreset4.Size = new System.Drawing.Size(16, 23);
this.btnPreset4.TabIndex = 10;
this.btnPreset4.Tag = "4";
this.btnPreset4.Text = "4";
this.btnPreset4.UseVisualStyleBackColor = true;
this.btnPreset4.Click += new System.EventHandler(this.BtnPreset1_Click);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(3, 31);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(45, 13);
this.label3.TabIndex = 9;
this.label3.Text = "Presets:";
//
// btnPreset3
//
this.btnPreset3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnPreset3.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnPreset3.Location = new System.Drawing.Point(94, 26);
this.btnPreset3.Name = "btnPreset3";
this.btnPreset3.Size = new System.Drawing.Size(16, 23);
this.btnPreset3.TabIndex = 8;
this.btnPreset3.Tag = "3";
this.btnPreset3.Text = "3";
this.btnPreset3.UseVisualStyleBackColor = true;
this.btnPreset3.Click += new System.EventHandler(this.BtnPreset1_Click);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(143, 31);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(20, 13);
this.label2.TabIndex = 7;
this.label2.Text = "ms";
//
// button5
//
this.button5.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button5.Location = new System.Drawing.Point(188, 26);
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(16, 23);
this.button5.TabIndex = 6;
this.button5.Text = "+";
this.button5.UseVisualStyleBackColor = true;
this.button5.Click += new System.EventHandler(this.Button5_Click);
//
// button4
//
this.button4.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button4.Location = new System.Drawing.Point(169, 26);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(16, 23);
this.button4.TabIndex = 5;
this.button4.Text = "-";
this.button4.UseVisualStyleBackColor = true;
this.button4.Click += new System.EventHandler(this.Button4_Click);
//
// button3
//
this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button3.Location = new System.Drawing.Point(89, 55);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(52, 23);
this.button3.TabIndex = 4;
this.button3.Text = "Save";
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.Button3_Click);
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(46, 57);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(38, 20);
this.textBox1.TabIndex = 3;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(3, 60);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(37, 13);
this.label1.TabIndex = 2;
this.label1.Text = "Delay:";
//
// btnPreset1
//
this.btnPreset1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnPreset1.Location = new System.Drawing.Point(56, 26);
this.btnPreset1.Name = "btnPreset1";
this.btnPreset1.Size = new System.Drawing.Size(16, 23);
this.btnPreset1.TabIndex = 1;
this.btnPreset1.Tag = "1";
this.btnPreset1.Text = "1";
this.btnPreset1.UseVisualStyleBackColor = true;
this.btnPreset1.Click += new System.EventHandler(this.BtnPreset1_Click);
//
// btnPreset2
//
this.btnPreset2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnPreset2.ForeColor = System.Drawing.Color.Red;
this.btnPreset2.Location = new System.Drawing.Point(75, 26);
this.btnPreset2.Name = "btnPreset2";
this.btnPreset2.Size = new System.Drawing.Size(16, 23);
this.btnPreset2.TabIndex = 0;
this.btnPreset2.Tag = "2";
this.btnPreset2.Text = "2";
this.btnPreset2.UseVisualStyleBackColor = true;
this.btnPreset2.Click += new System.EventHandler(this.BtnPreset1_Click);
//
// listView1
//
this.listView1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.listView1.CheckBoxes = true;
this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.columnHeader1,
this.columnHeader2,
this.columnHeader3});
this.listView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.listView1.FullRowSelect = true;
this.listView1.GridLines = true;
this.listView1.HideSelection = false;
this.listView1.Location = new System.Drawing.Point(0, 82);
this.listView1.MultiSelect = false;
this.listView1.Name = "listView1";
this.listView1.Size = new System.Drawing.Size(342, 218);
this.listView1.TabIndex = 3;
this.listView1.UseCompatibleStateImageBehavior = false;
this.listView1.View = System.Windows.Forms.View.Details;
this.listView1.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.ListView1_ItemChecked);
this.listView1.SelectedIndexChanged += new System.EventHandler(this.ListView1_SelectedIndexChanged);
//
// columnHeader1
//
this.columnHeader1.Text = "";
this.columnHeader1.Width = 23;
//
// columnHeader2
//
this.columnHeader2.Text = "Thread Name";
this.columnHeader2.Width = 110;
//
// columnHeader3
//
this.columnHeader3.Text = "Refresh(ms)";
this.columnHeader3.Width = 80;
//
// frmActiveDatalog
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(342, 300);
this.Controls.Add(this.listView1);
this.Controls.Add(this.panel1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.Name = "frmActiveDatalog";
this.Text = "Active Datalog Threads";
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.frmActiveDatalog_FormClosed);
this.Load += new System.EventHandler(this.frmActiveDatalog_Load);
this.Resize += new System.EventHandler(this.frmActiveDatalog_Resize);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.ResumeLayout(false);
}
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
if (!loading)
{
this.frmMain_0.class10_settings_0.DatalogThreadEnabled = this.checkBox1.Checked;
SpawnThreadList();
}
}
}

1787
frmActiveDatalog.resx Normal file

File diff suppressed because it is too large Load Diff

181
frmAdvTableAdd.cs Normal file
View File

@ -0,0 +1,181 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Globalization;
using System.Windows.Forms;
internal class frmAdvTableAdd : Form
{
private Button btnOk;
private Class18 class18_0;
private DataGridViewSelectedCellCollection dataGridViewSelectedCellCollection_0;
private ErrorProvider errorProvider_0;
private IContainer icontainer_0;
private int int_0;
private Label lblAdj;
private IContainer components;
private TextBox textBox1;
internal frmAdvTableAdd(DataGridViewSelectedCellCollection sel, ref Class18 rm)
{
this.dataGridViewSelectedCellCollection_0 = sel;
this.class18_0 = rm;
this.InitializeComponent();
foreach (Control control in base.Controls)
{
float emSize = control.Font.Size * (class18_0.class10_settings_0.scaleRate / 100f);
control.Font = new Font(control.Font.Name, emSize, control.Font.Style, control.Font.Unit);
}
}
private void btnOk_Click(object sender, EventArgs e)
{
switch (this.int_0)
{
case 1:
foreach (DataGridViewCell cell in this.dataGridViewSelectedCellCollection_0)
{
cell.Value = double.Parse(cell.Value.ToString()) + double.Parse(this.textBox1.Text);
}
break;
case 2:
foreach (DataGridViewCell cell2 in this.dataGridViewSelectedCellCollection_0)
{
cell2.Value = double.Parse(cell2.Value.ToString()) + ((double.Parse(cell2.Value.ToString()) / 100.0) * double.Parse(this.textBox1.Text));
}
break;
case 3:
foreach (DataGridViewCell cell3 in this.dataGridViewSelectedCellCollection_0)
{
cell3.Value = double.Parse(this.textBox1.Text);
}
break;
default:
return;
}
}
protected override void Dispose(bool disposing)
{
if (disposing && (this.icontainer_0 != null))
{
this.icontainer_0.Dispose();
}
base.Dispose(disposing);
}
private void frmAdvTableAdd_Load(object sender, EventArgs e)
{
if (base.Tag != null)
{
this.int_0 = int.Parse(base.Tag.ToString());
}
switch (this.int_0)
{
case 1:
this.lblAdj.Text = "Add to selection:";
return;
case 2:
this.lblAdj.Text = "Percentage change:";
return;
case 3:
this.lblAdj.Text = "Set selection to";
return;
}
this.lblAdj.Text = "error";
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmAdvTableAdd));
this.btnOk = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.lblAdj = new System.Windows.Forms.Label();
this.errorProvider_0 = new System.Windows.Forms.ErrorProvider(this.components);
((System.ComponentModel.ISupportInitialize)(this.errorProvider_0)).BeginInit();
this.SuspendLayout();
//
// btnOk
//
this.btnOk.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btnOk.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOk.Location = new System.Drawing.Point(217, 8);
this.btnOk.Name = "btnOk";
this.btnOk.Size = new System.Drawing.Size(87, 25);
this.btnOk.TabIndex = 2;
this.btnOk.Text = "Apply";
this.btnOk.UseVisualStyleBackColor = true;
this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(145, 11);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(61, 20);
this.textBox1.TabIndex = 1;
this.textBox1.Text = "0";
this.textBox1.Validating += new System.ComponentModel.CancelEventHandler(this.textBox1_Validating);
//
// lblAdj
//
this.lblAdj.AutoSize = true;
this.lblAdj.Location = new System.Drawing.Point(8, 14);
this.lblAdj.Name = "lblAdj";
this.lblAdj.Size = new System.Drawing.Size(116, 14);
this.lblAdj.TabIndex = 0;
this.lblAdj.Text = "Percentage change:";
//
// errorProvider_0
//
this.errorProvider_0.ContainerControl = this;
//
// frmAdvTableAdd
//
this.AcceptButton = this.btnOk;
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(317, 42);
this.Controls.Add(this.btnOk);
this.Controls.Add(this.lblAdj);
this.Controls.Add(this.textBox1);
this.Font = new System.Drawing.Font("Lucida Sans", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "frmAdvTableAdd";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Adjust Value";
this.Load += new System.EventHandler(this.frmAdvTableAdd_Load);
((System.ComponentModel.ISupportInitialize)(this.errorProvider_0)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
private bool method_0(string string_0)
{
double num;
return double.TryParse(Convert.ToString(string_0), NumberStyles.Any, (IFormatProvider) NumberFormatInfo.CurrentInfo, out num);
}
private void textBox1_Validating(object sender, CancelEventArgs e)
{
TextBox control = (TextBox) sender;
if (!this.method_0(control.Text.ToString()))
{
this.errorProvider_0.SetError(control, "Invalid input, double required");
e.Cancel = true;
}
else
{
this.errorProvider_0.SetError(control, "");
}
}
}

1790
frmAdvTableAdd.resx Normal file

File diff suppressed because it is too large Load Diff

685
frmAdvancedGraph.cs Normal file
View File

@ -0,0 +1,685 @@
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Collections.Generic;
using System.ComponentModel;
using System.Reflection;
using System.Windows.Forms;
using System.Drawing;
using System.Drawing.Drawing2D;
internal class frmAdvancedGraph : Form
{
//private BackgroundWorker backgroundWorker_0 = new BackgroundWorker();
private FrmMain frmMain_0;
private IContainer icontainer_0;
public Graphics graphics_0;
private Brush brush_0;
public ctrlAdvTable ctrlAdvTable_0;
private Class18 class18_0;
private Class10_settings class10_settings_0;
private double double_0;
private double double_1;
private int TopOffset = 30;
private int BottomOffset = 50;
private int LeftOffset = 40;
private int RightOffset = 20;
private int TWidht = 0;
private int THeight = 0;
private int MaxColumns = 0;
private int MaxRows = 0;
private double MaxValueY = 0;
private double MaxValueX = 0;
private double MinValueY = 0;
private double MinValueX = 0;
//private bool bool_1 = false;
//private bool bool_4 = false;
//private bool bool_2 = false;
//private bool SingleChange = false;
private bool IsSelected = false;
//private bool Dragging = false;
private int RowSelected = 0;
private int ColumnSelected = 0;
private Point point_0;
private Point point_1;
private Point point_2;
private Rectangle rectangle_0;
private List<double> TitleList = new List<double>();
private List<double[]> ValuesList = new List<double[]>();
private List<int[]> Xposs = new List<int[]>();
private List<int[]> Yposs = new List<int[]>();
private List<bool[]> EditingList = new List<bool[]>();
private bool EditMain = false;
private List<int> Xposs2 = new List<int>();
private List<int> Yposs2 = new List<int>();
private List<bool> EditingList2 = new List<bool>();
public frmAdvancedGraph(ref Class18 class18_1, ref ctrlAdvTable ctrlAdvTable_1)
{
this.InitializeComponent();
class18_0 = class18_1;
class10_settings_0 = this.class18_0.class10_settings_0;
ctrlAdvTable_0 = ctrlAdvTable_1;
foreach (Control control in base.Controls)
{
float emSize = control.Font.Size * (class18_0.class10_settings_0.scaleRate / 100f);
control.Font = new Font(control.Font.Name, emSize, control.Font.Style, control.Font.Unit);
}
//this.backgroundWorker_0.DoWork += new DoWorkEventHandler(this.backgroundWorker_0_DoWork);
}
/*private void backgroundWorker_0_DoWork(object sender, DoWorkEventArgs e)
{
while (this.bool_2)
{
int x;
int num2;
int y;
int num4;
int num5;
int num6;
MouseEventArgs argument = (MouseEventArgs)e.Argument;
if (argument.X > this.point_0.X)
{
x = argument.X;
num2 = this.point_0.X;
num5 = this.point_0.X;
}
else
{
x = this.point_0.X;
num2 = argument.X;
num5 = argument.X;
}
if (argument.Y > this.point_0.Y)
{
y = argument.Y;
num4 = this.point_0.Y;
num6 = this.point_0.Y;
}
else
{
y = this.point_0.Y;
num4 = argument.Y;
num6 = argument.Y;
}
this.rectangle_0 = new Rectangle(num5, num6, x - num2, y - num4);
this.bool_2 = true;
for (int i = 0; i < MaxRows; i++)
{
for (int j = 0; j < MaxColumns; j++)
{
try
{
if (this.rectangle_0.Contains(this.Xposs[i][j], this.Yposs[i][j]))
{
this.EditingList[i][j] = true;
this.ctrlAdvTable_0.grid.ClearSelection();
this.ctrlAdvTable_0.grid[i, j].Selected = true;
base.Invalidate(false);
base.Update();
return;
}
}
catch { }
}
}
this.Invalidate();
}
}*/
protected override void Dispose(bool disposing)
{
if (disposing && (this.icontainer_0 != null))
{
this.icontainer_0.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmAdvancedGraph));
this.SuspendLayout();
//
// frmAdvancedGraph
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(528, 430);
this.Font = new System.Drawing.Font("Lucida Sans", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.Name = "frmAdvancedGraph";
this.Padding = new System.Windows.Forms.Padding(10);
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Advanced Table Graph";
this.TopMost = true;
this.Load += new System.EventHandler(this.frmAboutBox_Load);
this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.frmAdvancedGraph_MouseDown);
this.MouseEnter += new System.EventHandler(this.frmAdvancedGraph_MouseEnter);
this.MouseLeave += new System.EventHandler(this.frmAdvancedGraph_MouseLeave);
this.MouseHover += new System.EventHandler(this.frmAdvancedGraph_MouseHover);
this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.frmAdvancedGraph_MouseMove);
this.MouseUp += new System.Windows.Forms.MouseEventHandler(this.frmAdvancedGraph_MouseUp);
this.Resize += new System.EventHandler(this.frmAdvancedGraph_Resize);
this.ResumeLayout(false);
}
private void frmAboutBox_Load(object sender, EventArgs e)
{
}
protected override void OnPaint(PaintEventArgs pe)
{
this.graphics_0 = pe.Graphics;
this.graphics_0.SmoothingMode = SmoothingMode.None;
//Rectangle ThisRec = new Rectangle(pe.ClipRectangle.X, pe.ClipRectangle.Y, pe.ClipRectangle.Width, pe.ClipRectangle.Height);
//this.graphics_0.DrawImage(ThisI, ThisRec);
Pen pen = new Pen(this.class10_settings_0.color_11);
Pen pen2 = new Pen(this.class10_settings_0.color_14, 1f);
this.brush_0 = new SolidBrush(this.class10_settings_0.color_3);
TWidht = base.ClientRectangle.Width - LeftOffset - RightOffset;
THeight = base.ClientRectangle.Height - TopOffset - BottomOffset;
this.graphics_0.FillRectangle(this.brush_0, 0, 0, base.ClientRectangle.Width, base.ClientRectangle.Height);
this.graphics_0.DrawLine(pen, LeftOffset, base.ClientRectangle.Top + TopOffset, LeftOffset, base.ClientRectangle.Bottom - BottomOffset); //left
this.graphics_0.DrawLine(pen, LeftOffset, base.ClientRectangle.Bottom - BottomOffset, base.ClientRectangle.Width - RightOffset, base.ClientRectangle.Bottom - BottomOffset); //down
this.graphics_0.DrawLine(pen, base.ClientRectangle.Width - RightOffset, base.ClientRectangle.Top + TopOffset, base.ClientRectangle.Width - RightOffset, base.ClientRectangle.Bottom - BottomOffset); //right
this.graphics_0.DrawLine(pen, LeftOffset, base.ClientRectangle.Top + TopOffset, base.ClientRectangle.Width - RightOffset, base.ClientRectangle.Top + TopOffset); //top
string str = "";
SolidBrush brush2 = new SolidBrush(this.class10_settings_0.color_12);
MaxColumns = ctrlAdvTable_0.method_3();
MaxRows = ctrlAdvTable_0.method_5();
//if (!this.Dragging && !this.SingleChange && !this.IsSelected)
if (!this.IsSelected)
{
TitleList.Clear();
ValuesList.Clear();
this.Xposs.Clear();
this.Yposs.Clear();
this.EditingList.Clear();
this.Xposs2.Clear();
this.Yposs2.Clear();
this.EditingList2.Clear();
//Get values and max/min values
for (int i = 0; i < MaxRows; i++)
{
//add to list
double[] NewD = new double[MaxColumns];
for (int i2 = 0; i2 < MaxColumns; i2++)
{
//Calculate max Y (first rows only)
if (i == 0)
{
double ThisV = double.Parse(ctrlAdvTable_0.grid.Rows[i].Cells[i2].Value.ToString());
if (i2 == 0)
{
MaxValueY = ThisV;
MinValueY = ThisV;
}
if (ThisV > MaxValueY) MaxValueY = ThisV;
if (ThisV < MinValueY) MinValueY = ThisV;
TitleList.Add(double.Parse(ctrlAdvTable_0.grid.Rows[i].Cells[i2].Value.ToString()));
}
else
{
double ThisV = double.Parse(ctrlAdvTable_0.grid.Rows[i].Cells[i2].Value.ToString());
if (i == 1 && i2 == 0)
{
MaxValueX = ThisV;
MinValueX = ThisV;
}
if (ThisV > MaxValueX) MaxValueX = ThisV;
if (ThisV < MinValueX) MinValueX = ThisV;
NewD[i2] = double.Parse(ctrlAdvTable_0.grid.Rows[i].Cells[i2].Value.ToString());
}
}
//add to list
if (i != 0) ValuesList.Add(NewD);
}
}
//Console.WriteLine(MaxValueX);
//Console.WriteLine(MinValueX);
//Spawn Graph
Font font = new Font("Lucida Sans", 12f, FontStyle.Bold);
str = this.ctrlAdvTable_0.method_24().ToString();
this.graphics_0.DrawString(str, font, brush2, LeftOffset + (TWidht / 2) - (this.graphics_0.MeasureString(str, font).Width / 2f), base.ClientRectangle.Bottom - 20);
font = new Font("Lucida Sans", 8f, FontStyle.Regular);
for (int i = 0; i < MaxColumns; i++)
{
double ThisVal = TitleList[i];
double Ypercent = (((ThisVal - MinValueY) * 100) / (MaxValueY - MinValueY)) / 100;
str = ThisVal.ToString();
int YPos = (int)(LeftOffset + (Ypercent * TWidht));
this.graphics_0.DrawString(str, font, brush2, YPos - (this.graphics_0.MeasureString(str, font).Width / 2f), base.ClientRectangle.Bottom - BottomOffset + 4);
if (this.IsSelected && this.EditingList2[i] == true) pen = new Pen(Color.FromArgb(0, 0, 200));
else pen = new Pen(this.class10_settings_0.color_11);
this.graphics_0.DrawLine(pen, YPos, base.ClientRectangle.Bottom - BottomOffset + 20, YPos, base.ClientRectangle.Bottom - BottomOffset + 30);
if (this.IsSelected && EditMain && ColumnSelected == i)
{
pen = new Pen(this.class10_settings_0.color_11, 2f);
this.graphics_0.DrawLine(pen, this.point_1.X, base.ClientRectangle.Bottom - BottomOffset + 20, this.point_1.X, base.ClientRectangle.Bottom - BottomOffset + 32);
}
//if (!this.Dragging && !this.SingleChange && !this.IsSelected)
if (!this.IsSelected)
{
Xposs2.Add(YPos);
Yposs2.Add(base.ClientRectangle.Bottom - BottomOffset + 20);
EditingList2.Add(false);
}
//pen = new Pen(this.class10_0.color_11);
if (i != 0 && i != MaxColumns - 1) this.graphics_0.DrawLine(pen2, YPos, base.ClientRectangle.Bottom - BottomOffset, YPos, base.ClientRectangle.Top + TopOffset); //down
}
for (int i = 0; i < MaxRows - 1; i++)
{
int XLast = 0;
int YLast = 0;
int XLastEdit = 0;
int YLastEdit = 0;
//pen = new Pen(Color.FromArgb(200 - (i * 50), 255, 200 - (i * 50)));
//this.brush_0 = new SolidBrush(Color.FromArgb(200 - (i * 50), 255, 200 - (i * 50)));
//if (!this.Dragging && !this.SingleChange && !this.IsSelected)
if (!this.IsSelected)
{
this.Xposs.Add(new int[MaxColumns]);
this.Yposs.Add(new int[MaxColumns]);
this.EditingList.Add(new bool[MaxColumns]);
}
for (int i2 = 0; i2 < MaxColumns; i2++)
{
double Thistitle = TitleList[i2];
double ThisVal = ValuesList[i][i2];
str = ThisVal.ToString();
double Ypercent = 0;
double Xpercent = 0;
if (MinValueY != MaxValueY) Ypercent = (((Thistitle - MinValueY) * 100) / (MaxValueY - MinValueY)) / 100;
if (MinValueX != MaxValueX) Xpercent = (((ThisVal - MinValueX) * 100) / (MaxValueX - MinValueX)) / 100;
if (Ypercent < 0) Ypercent = 0;
if (Ypercent > 1) Ypercent = 1;
if (Xpercent < 0) Xpercent = 0;
if (Xpercent > 1) Xpercent = 1;
int YPos = (int)(LeftOffset + 2 + (Ypercent * (TWidht - 2)));
int Xpos = (int)(BottomOffset + (Xpercent * (THeight)));
pen = new Pen(Color.FromArgb(200 - (i * 50), 255, 200 - (i * 50)));
//if ((this.Dragging || this.SingleChange || this.IsSelected) && this.EditingList[i][i2] == true) this.brush_0 = new SolidBrush(Color.FromArgb(0, 0, 200));
if (this.IsSelected && this.EditingList[i][i2] == true) this.brush_0 = new SolidBrush(Color.FromArgb(0, 0, 200));
else this.brush_0 = new SolidBrush(Color.FromArgb(200 - (i * 50), 255, 200 - (i * 50)));
//line from last spot to current
if (i2 != 0) this.graphics_0.DrawLine(pen, YLast, base.ClientRectangle.Bottom - XLast, YPos, base.ClientRectangle.Bottom - Xpos);
if (i2 != 0 && !EditMain)
{
if (IsSelected && ((RowSelected == i && ColumnSelected == i2) || (RowSelected == i && ColumnSelected == i2-1)))
{
pen = new Pen(this.class10_settings_0.color_11, 2f);
pen.DashStyle = DashStyle.Dash;
if (RowSelected == i && ColumnSelected == i2)
{
this.graphics_0.DrawLine(pen, YLast, base.ClientRectangle.Bottom - XLast, YPos, this.point_1.Y);
XLastEdit = YPos;
YLastEdit = this.point_1.Y;
}
if (RowSelected == i && ColumnSelected == i2 - 1)
{
this.graphics_0.DrawLine(pen, XLastEdit, YLastEdit, YPos, base.ClientRectangle.Bottom - Xpos);
}
}
}
//draw square at current position
this.graphics_0.FillRectangle(this.brush_0, YPos - 3, base.ClientRectangle.Bottom - Xpos - 3, 6, 6);
//if (!this.Dragging && !this.SingleChange && !this.IsSelected)
if (!this.IsSelected)
{
this.Xposs[i][i2] = YPos;
this.Yposs[i][i2] = base.ClientRectangle.Bottom - Xpos;
this.EditingList[i][i2] = false;
}
brush2 = new SolidBrush(this.class10_settings_0.color_13);
this.graphics_0.DrawString(str, font, brush2, 5, base.ClientRectangle.Bottom - Xpos - 8);
XLast = Xpos;
YLast = YPos;
}
}
if (this.IsSelected)
{
this.method_12(Math.Round(this.double_1, 2).ToString() + "(" + Math.Round(this.double_0, 0).ToString() + "%)", (float)this.point_1.X, (float)this.point_1.Y, this.double_0 > 0.0);
}
}
private void method_12(string string_0, float float_28, float float_29, bool bool_5)
{
if (bool_5) this.graphics_0.FillRectangle(new SolidBrush(Color.FromArgb(20, 190, 20)), (float)(float_28 - 5f), (float)(float_29 - 20f), (float)55f, (float)15f);
else this.graphics_0.FillRectangle(new SolidBrush(Color.FromArgb(215, 120, 120)), (float)(float_28 - 5f), (float)(float_29 - 20f), (float)55f, (float)15f);
this.graphics_0.DrawString(string_0, new Font("Lucida Sans", 7f, FontStyle.Regular), new SolidBrush(this.class10_settings_0.color_11), (float)(float_28 - 5f), (float)(float_29 - 20f));
}
private void frmAdvancedGraph_Resize(object sender, EventArgs e)
{
if (base.WindowState == FormWindowState.Normal)
{
//this.Invalidate();
this.Refresh();
}
}
private void frmAdvancedGraph_MouseEnter(object sender, EventArgs e)
{
this.Cursor = Cursors.Cross;
}
private void frmAdvancedGraph_MouseHover(object sender, EventArgs e)
{
base.Focus();
}
private void frmAdvancedGraph_MouseLeave(object sender, EventArgs e)
{
this.Cursor = Cursors.Default;
}
private void frmAdvancedGraph_MouseMove(object sender, MouseEventArgs e)
{
if (IsSelected)
{
this.point_1.X = e.X;
this.point_1.Y = e.Y;
if (!EditMain)
{
this.double_0 = ((float)(base.ClientRectangle.Bottom - BottomOffset - e.Y) / (float)(this.THeight)) * 100.0;
this.double_1 = MinValueX + ((this.double_0 * (MaxValueX - MinValueX)) / 100);
}
else
{
this.double_0 = ((float)(base.ClientRectangle.Width - RightOffset - e.X) / (float)(this.TWidht)) * 100.0;
this.double_1 = MaxValueY + ((this.double_0 * (MinValueY - MaxValueY)) / 100);
}
base.Invalidate();
}
//try
//{
/*this.point_1.X = e.X;
this.point_1.Y = e.Y;
if (this.SingleChange)
{
this.double_0 = -((float)(e.Y - this.point_0.Y) / (float)(this.THeight - this.point_0.Y)) * 100.0;
base.Invalidate();
}
else if (this.Dragging && !this.SingleChange)
{
int x;
int num5;
int y;
int num7;
int num8;
int num9;
MouseEventArgs args = e;
if (args.X > this.point_0.X)
{
x = args.X;
num5 = this.point_0.X;
num8 = this.point_0.X;
}
else
{
x = this.point_0.X;
num5 = args.X;
num8 = args.X;
}
if (args.Y > this.point_0.Y)
{
y = args.Y;
num7 = this.point_0.Y;
num9 = this.point_0.Y;
}
else
{
y = this.point_0.Y;
num7 = args.Y;
num9 = args.Y;
}
this.rectangle_0 = new Rectangle(num8, num9, x - num5, y - num7);
this.bool_2 = true;
for (int i = 0; i < MaxRows-1; i++)
{
for (int j = 0; j < MaxColumns; j++)
{
//Refresh
if (this.rectangle_0.Contains(this.Xposs[i][j], this.Yposs[i][j]))
{
if (!this.EditingList[i][j])
{
this.EditingList[i][j] = true;
//method15 replacement
this.ctrlAdvTable_0.grid.ClearSelection();
this.ctrlAdvTable_0.grid[j, i+1].Selected = true;
}
}
else
{
this.EditingList[i][j] = false;
this.ctrlAdvTable_0.grid[j, i+1].Selected = false;
}
}
}
this.Refresh();
}
else
{
for (int k = 0; k < MaxRows - 1; k++)
{
for (int m = 0; m < MaxColumns; m++)
{
Rectangle rectangle = new Rectangle((this.Xposs[k][m]) - 4, (this.Yposs[k][m]) - 4, 8, 8);
Point p = new Point(Control.MousePosition.X, Control.MousePosition.Y);
p = base.PointToClient(p);
if (rectangle.Contains(p.X, p.Y) && this.EditingList[k][m])
{
if (!this.bool_1)
{
this.bool_1 = true;
base.Invalidate();
}
break;
}
this.bool_1 = false;
}
//base.Invalidate();
}
}
this.point_2.X = e.X;
this.point_2.Y = e.Y;*/
//}
//catch { }
}
private void frmAdvancedGraph_MouseDown(object sender, MouseEventArgs e)
{
this.point_0.X = e.X;
this.point_0.Y = e.Y;
this.point_1.Y = e.Y;
this.point_1.X = e.X;
IsSelected = false;
if (e.Button == MouseButtons.Left)
{
for (int i = 0; i < MaxRows - 1; i++)
{
for (int j = 0; j < MaxColumns; j++)
{
Rectangle rectangle = new Rectangle(this.Xposs[i][j] - 4, this.Yposs[i][j] - 4, 8, 8);
Point p = new Point(Control.MousePosition.X, Control.MousePosition.Y);
p = base.PointToClient(p);
if (rectangle.Contains(p.X, p.Y) && !this.EditingList[i][j])
{
RowSelected = i;
ColumnSelected = j;
EditMain = false;
this.ctrlAdvTable_0.grid.ClearSelection();
IsSelected = true;
this.EditingList[i][j] = true;
this.ctrlAdvTable_0.grid[j, i + 1].Selected = true;
this.Refresh();
return;
}
//if (!rectangle.Contains(p.X, p.Y) && this.EditingList[i][j]) this.EditingList[i][j] = false;
//if (rectangle.Contains(p.X, p.Y) && this.EditingList[i][j]) this.SingleChange = true;
//else this.Dragging = true;
}
}
for (int j = 0; j < MaxColumns; j++)
{
Rectangle rectangle = new Rectangle(this.Xposs2[j] - 1, this.Yposs2[j] - 1, 3, 12);
Point p = new Point(Control.MousePosition.X, Control.MousePosition.Y);
p = base.PointToClient(p);
if (rectangle.Contains(p.X, p.Y) && !this.EditingList2[j])
{
ColumnSelected = j;
EditMain = true;
this.ctrlAdvTable_0.grid.ClearSelection();
IsSelected = true;
this.EditingList2[j] = true;
this.ctrlAdvTable_0.grid[j, 0].Selected = true;
this.Refresh();
return;
}
}
}
}
private void frmAdvancedGraph_MouseUp(object sender, MouseEventArgs e)
{
//this.Dragging = false;
this.Refresh();
if (this.IsSelected)
{
this.class18_0.method_155("ADV Table : " + this.class18_0.method_4().ToString() + " graph adjustments");
try
{
if (!EditMain) this.ctrlAdvTable_0.grid[ColumnSelected, RowSelected + 1].Value = this.double_1;
else this.ctrlAdvTable_0.grid[ColumnSelected, 0].Value = this.double_1;
}
catch { }
//foreach (Class7_u class2 in this.list_0)
//{
// try
// {
//float num = this.class18_0.method_174((byte)class2.method_0(), (byte)class2.method_2());
//this.class18_0.method_176((byte)class2.method_0(), (byte)class2.method_2(), num + (num * ((float)(Math.Round(this.double_0, 0) / 100.0))));
//this.ctrlGrid_0.method_34(class2.method_0(), class2.method_2());
// }
// catch (Exception exception)
// {
// throw exception;
// }
//}
this.class18_0.method_153();
this.IsSelected = false;
this.Refresh();
}
}
/*private void frmAdvancedGraph_KeyUp(object sender, KeyEventArgs e)
{
this.bool_4 = e.Control;
}
private void frmAdvancedGraph_KeyDown(object sender, KeyEventArgs e)
{
this.bool_4 = e.Control;
if (((e.KeyCode == Keys.Up) && e.Control))
{
//this.frmGridChart_0.toolIncrease_Click(null, null);
e.SuppressKeyPress = true;
e.Handled = true;
}
else if (((e.KeyCode == Keys.Down) && e.Control))
{
//this.frmGridChart_0.toolDecrease_Click(null, null);
e.SuppressKeyPress = true;
e.Handled = true;
}
else if (e.KeyCode == Keys.Escape)
{
this.SingleChange = false;
}
else
{
e.Handled = false;
}
}
private void frmAdvancedGraph_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
{
if (e.KeyCode == Keys.Escape)
{
this.Dragging = false;
this.SingleChange = false;
base.Invalidate();
}
}*/
}

1787
frmAdvancedGraph.resx Normal file

File diff suppressed because it is too large Load Diff

2461
frmBaseMap.cs Normal file

File diff suppressed because it is too large Load Diff

1796
frmBaseMap.resx Normal file

File diff suppressed because it is too large Load Diff

355
frmBaseromConvert.cs Normal file
View File

@ -0,0 +1,355 @@
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Reflection;
using System.Windows.Forms;
internal class frmBaseromConvert : Form
{
private Class18 class18_0;
private IContainer icontainer_0;
private Label labelProductName;
private Label label_Baserom;
private DataGridView dataGridView1;
private Label label6;
private Button okButton;
private Button button1;
private Label label4;
private DataGridViewTextBoxColumn Column2;
private DataGridViewTextBoxColumn Column1;
private DataGridViewTextBoxColumn Column3;
private Label label1;
private Label label3;
private Panel panel1;
public frmBaseromConvert(ref Class18 class18_1)
{
this.InitializeComponent();
this.class18_0 = class18_1;
this.class18_0.Binary_Files_0.ReloadVersion();
for (int i = this.class18_0.Binary_Files_0.class1_Version_0.Count - 1; i >= 0; i--)
{
Class1_Version class1_Version_1 = this.class18_0.Binary_Files_0.class1_Version_0[i];
this.dataGridView1.Rows.Add();
this.dataGridView1.Rows[this.dataGridView1.RowCount - 1].Cells[0].Value = "V" + class1_Version_1.Version.ToString().Substring(0, 1) + "." + class1_Version_1.Version.ToString().Substring(1, 1) + class1_Version_1.Version.ToString().Substring(2, 1);
this.dataGridView1.Rows[this.dataGridView1.RowCount - 1].Cells[1].Value = class1_Version_1.Stable.ToString();
this.dataGridView1.Rows[this.dataGridView1.RowCount - 1].Cells[2].Value = class1_Version_1.Infos;
}
//Select last stable version
if (this.dataGridView1.Rows.Count > 0)
{
for (int i = 0; i < this.dataGridView1.Rows.Count; i++)
{
if (this.dataGridView1.Rows[i].Cells.Count >= 2)
{
if (this.dataGridView1.Rows[i].Cells[1].Value.ToString() == "True")
{
this.dataGridView1.CurrentCell = this.dataGridView1.Rows[i].Cells[0];
this.dataGridView1.Rows[i].Selected = true;
string TVers = this.dataGridView1.Rows[i].Cells[0].Value.ToString();
TVers = TVers.Replace("V", "");
label4.Text = TVers;
i = this.dataGridView1.Rows.Count;
}
}
}
}
label_Baserom.Text = this.class18_0.RomVersion.ToString().Substring(0, 1) + "." + this.class18_0.RomVersion.ToString().Substring(1, 1) + this.class18_0.RomVersion.ToString().Substring(2, 1);
SetRestoreText();
foreach (Control control in base.Controls)
{
float emSize = control.Font.Size * (class18_0.class10_settings_0.scaleRate / 100f);
control.Font = new Font(control.Font.Name, emSize, control.Font.Style, control.Font.Unit);
}
}
protected override void Dispose(bool disposing)
{
if (disposing && (this.icontainer_0 != null))
{
this.icontainer_0.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmBaseromConvert));
this.labelProductName = new System.Windows.Forms.Label();
this.okButton = new System.Windows.Forms.Button();
this.label_Baserom = new System.Windows.Forms.Label();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.label6 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.label4 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.panel1 = new System.Windows.Forms.Panel();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// labelProductName
//
this.labelProductName.AutoSize = true;
this.labelProductName.Font = new System.Drawing.Font("Lucida Sans", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelProductName.Location = new System.Drawing.Point(119, 10);
this.labelProductName.Margin = new System.Windows.Forms.Padding(7, 0, 3, 0);
this.labelProductName.MaximumSize = new System.Drawing.Size(0, 18);
this.labelProductName.Name = "labelProductName";
this.labelProductName.Size = new System.Drawing.Size(165, 18);
this.labelProductName.TabIndex = 19;
this.labelProductName.Text = "Baserom Converter";
this.labelProductName.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// okButton
//
this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.okButton.AutoSize = true;
this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
this.okButton.Location = new System.Drawing.Point(262, 525);
this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(141, 25);
this.okButton.TabIndex = 24;
this.okButton.Text = "&Convert Baserom";
this.okButton.Click += new System.EventHandler(this.okButton_Click);
//
// label_Baserom
//
this.label_Baserom.AutoSize = true;
this.label_Baserom.Font = new System.Drawing.Font("Lucida Sans", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label_Baserom.Location = new System.Drawing.Point(118, 6);
this.label_Baserom.Name = "label_Baserom";
this.label_Baserom.Size = new System.Drawing.Size(34, 15);
this.label_Baserom.TabIndex = 27;
this.label_Baserom.Text = "1.00";
//
// dataGridView1
//
this.dataGridView1.AllowUserToAddRows = false;
this.dataGridView1.AllowUserToDeleteRows = false;
this.dataGridView1.AllowUserToResizeRows = false;
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Column2,
this.Column1,
this.Column3});
this.dataGridView1.Location = new System.Drawing.Point(5, 109);
this.dataGridView1.MultiSelect = false;
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.ReadOnly = true;
this.dataGridView1.RowHeadersVisible = false;
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridView1.Size = new System.Drawing.Size(398, 410);
this.dataGridView1.TabIndex = 29;
this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellClick);
this.dataGridView1.CellContentDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentDoubleClick);
//
// Column2
//
this.Column2.HeaderText = "Version";
this.Column2.Name = "Column2";
this.Column2.ReadOnly = true;
this.Column2.Width = 60;
//
// Column1
//
this.Column1.HeaderText = "Stable";
this.Column1.Name = "Column1";
this.Column1.ReadOnly = true;
this.Column1.Width = 50;
//
// Column3
//
this.Column3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.Column3.HeaderText = "Infos";
this.Column3.Name = "Column3";
this.Column3.ReadOnly = true;
//
// label6
//
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("Lucida Sans", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label6.Location = new System.Drawing.Point(82, 38);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(226, 14);
this.label6.TabIndex = 32;
this.label6.Text = "Convert the Baserom Version of BMTune";
//
// button1
//
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.button1.AutoSize = true;
this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.button1.Location = new System.Drawing.Point(5, 525);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(87, 25);
this.button1.TabIndex = 34;
this.button1.Text = "Cancel";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("Lucida Sans", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label4.ForeColor = System.Drawing.Color.Blue;
this.label4.Location = new System.Drawing.Point(118, 25);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(35, 13);
this.label4.TabIndex = 37;
this.label4.Text = "1.00";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Lucida Sans", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(15, 5);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(95, 14);
this.label1.TabIndex = 38;
this.label1.Text = "Current Version:";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("Lucida Sans", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label3.Location = new System.Drawing.Point(32, 25);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(78, 14);
this.label3.TabIndex = 39;
this.label3.Text = "New Version:";
//
// panel1
//
this.panel1.BackColor = System.Drawing.SystemColors.ControlLight;
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.label3);
this.panel1.Controls.Add(this.label_Baserom);
this.panel1.Controls.Add(this.label4);
this.panel1.Location = new System.Drawing.Point(111, 59);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(173, 44);
this.panel1.TabIndex = 40;
//
// frmBaseromConvert
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(409, 557);
this.Controls.Add(this.panel1);
this.Controls.Add(this.button1);
this.Controls.Add(this.label6);
this.Controls.Add(this.dataGridView1);
this.Controls.Add(this.labelProductName);
this.Controls.Add(this.okButton);
this.Font = new System.Drawing.Font("Lucida Sans", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "frmBaseromConvert";
this.Padding = new System.Windows.Forms.Padding(10);
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Baserom Converter";
this.Load += new System.EventHandler(this.frmAboutBox_Load);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
private void frmAboutBox_Load(object sender, EventArgs e)
{
}
private void SetRestoreText()
{
string TVers = label4.Text;
TVers = TVers.Replace(".", "");
int VersionI = int.Parse(TVers);
if (VersionI == this.class18_0.RomVersion) okButton.Text = "&Restore Baserom";
else okButton.Text = "&Convert Baserom";
}
public void StartConvert()
{
bool DoingNormalConvert = true;
string TVers = label4.Text;
TVers = TVers.Replace(".", "");
int VersionI = int.Parse(TVers);
if (VersionI == this.class18_0.RomVersion)
{
if (MessageBox.Show(Form.ActiveForm, "Do you want to restore using the Calibration Export/Import method?", "BMTune", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) == DialogResult.Yes)
{
string ExportingPath = Environment.GetEnvironmentVariable("TEMP") + @"\ToImportCal.bmc";
DoingNormalConvert = false;
//################################################
this.class18_0.method_73(ExportingPath); //Export
//
this.class18_0.OpenSilentBRom = true;
this.class18_0.method_63(false, 100, Path.GetFileName(this.class18_0.method_25_GetFilename())); //load V1.00 baserom
this.class18_0.OpenSilentBRom = false;
this.class18_0.ConvertBaseromVersionToVersion(VersionI);
this.class18_0.RomVersion = VersionI;
this.class18_0.ResetBaseromParameters();
//
this.class18_0.method_75(ExportingPath, false, 1); //Import
if (File.Exists(ExportingPath)) File.Delete(ExportingPath);
//#######################################################
}
}
if (DoingNormalConvert) this.class18_0.ConvertBaseromVersionToVersion(VersionI);
//Add warning for emulator connected
if (this.class18_0.class25_0.GetConnected()) MessageBox.Show(Form.ActiveForm, "You need to upload again 'baserom+calibration' to the emulator for it to refresh!", "BMTune", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
this.Close();
}
private void okButton_Click(object sender, EventArgs e)
{
StartConvert();
}
private void button1_Click(object sender, EventArgs e)
{
this.Close();
}
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
{
string TVers = this.dataGridView1.Rows[this.dataGridView1.SelectedCells[0].RowIndex].Cells[0].Value.ToString();
TVers = TVers.Replace("V", "");
label4.Text = TVers;
SetRestoreText();
}
private void dataGridView1_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
{
StartConvert();
}
}

1796
frmBaseromConvert.resx Normal file

File diff suppressed because it is too large Load Diff

338
frmBinTool.cs Normal file
View File

@ -0,0 +1,338 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
public class frmBinTool : Form
{
public FileStream fs;
private Class10_settings class10_settings_0;
private Class18 class18_0;
private IContainer components;
private Label label2;
private Label label3;
private TextBox textBox2;
private TextBox textBox3;
private Button button2;
private Button button3;
private Button button5;
private OpenFileDialog openFileDialog1;
private Button button1;
private Label label1;
internal frmBinTool(ref Class10_settings cfg, ref Class18 class18_1)
{
this.class10_settings_0 = cfg;
this.class18_0 = class18_1;
this.InitializeComponent();
/*foreach (Control control in base.Controls)
{
float emSize = control.Font.Size * (class18_0.class10_settings_0.scaleRate / 100f);
control.Font = new Font(control.Font.Name, emSize, control.Font.Style, control.Font.Unit);
}*/
}
private void Button1_Click(object sender, EventArgs e)
{
this.textBox2.Text = "BLANK";
}
private void Button2_Click(object sender, EventArgs e)
{
try
{
if ((this.openFileDialog1.ShowDialog() == DialogResult.OK) && ((this.openFileDialog1.FileName != "openFileDialog1") || (this.openFileDialog1.FileName != "")))
{
this.textBox3.Text = this.openFileDialog1.FileName;
this.fs = new FileStream(this.textBox3.Text, FileMode.Open, FileAccess.Read);
if (((int) this.fs.Length) == 0x8000)
{
string fileName = Path.GetFileName(this.textBox3.Text);
}
else
{
MessageBox.Show(Form.ActiveForm, "invalid file size");
this.textBox3.Text = "";
}
}
}
catch (Exception exception)
{
MessageBox.Show(Form.ActiveForm, "EXCEPTION:" + exception);
}
}
private void Button3_Click(object sender, EventArgs e)
{
try
{
if ((this.openFileDialog1.ShowDialog() == DialogResult.OK) && ((this.openFileDialog1.FileName != "openFileDialog1") || (this.openFileDialog1.FileName != "")))
{
this.textBox2.Text = this.openFileDialog1.FileName;
this.fs = new FileStream(this.textBox2.Text, FileMode.Open, FileAccess.Read);
if (((int) this.fs.Length) == 0x8000)
{
string fileName = Path.GetFileName(this.textBox2.Text);
}
else
{
MessageBox.Show(Form.ActiveForm, "invalid file size");
this.textBox2.Text = "";
}
}
}
catch (Exception exception)
{
MessageBox.Show(Form.ActiveForm, "EXCEPTION:" + exception);
}
}
private void Button5_Click(object sender, EventArgs e)
{
if ((this.textBox2.Text == "") || (this.textBox3.Text == ""))
{
MessageBox.Show(Form.ActiveForm, "Select MAP 1 and MAP 2 to fill the bin file.", "Error");
}
else
{
string[] tmpfiles = new string[] { this.textBox2.Text, this.textBox3.Text };
if (this.MergeFile(tmpfiles))
{
MessageBox.Show(Form.ActiveForm, "File Saved!", "Warning");
}
else
{
MessageBox.Show(Form.ActiveForm, "Error Saving File!", "Error");
}
}
}
public static byte[] Combine(byte[] first, byte[] second)
{
byte[] dst = new byte[first.Length + second.Length];
Buffer.BlockCopy(first, 0, dst, 0, first.Length);
Buffer.BlockCopy(second, 0, dst, first.Length, second.Length);
return dst;
}
protected override void Dispose(bool disposing)
{
if (disposing && (this.components != null))
{
this.components.Dispose();
}
base.Dispose(disposing);
}
private void FrmBinTool_Load(object sender, EventArgs e)
{
if (this.class18_0.method_25_GetFilename() != null)
{
this.textBox3.Text = this.class10_settings_0.romFilePath + @"\" + Path.GetFileName(this.class18_0.method_25_GetFilename());
}
}
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmBinTool));
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.button2 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.button5 = new System.Windows.Forms.Button();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.button1 = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(33, 9);
this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(105, 13);
this.label2.TabIndex = 2;
this.label2.Text = "MAP 1: 0000-7FFFF:";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(182, 9);
this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(111, 13);
this.label3.TabIndex = 3;
this.label3.Text = "MAP 2: 80000-FFFFF:";
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(33, 29);
this.textBox2.Margin = new System.Windows.Forms.Padding(2);
this.textBox2.Name = "textBox2";
this.textBox2.ReadOnly = true;
this.textBox2.Size = new System.Drawing.Size(146, 20);
this.textBox2.TabIndex = 4;
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(184, 29);
this.textBox3.Margin = new System.Windows.Forms.Padding(2);
this.textBox3.Name = "textBox3";
this.textBox3.ReadOnly = true;
this.textBox3.Size = new System.Drawing.Size(146, 20);
this.textBox3.TabIndex = 5;
//
// button2
//
this.button2.Location = new System.Drawing.Point(184, 53);
this.button2.Margin = new System.Windows.Forms.Padding(2);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(146, 22);
this.button2.TabIndex = 7;
this.button2.Text = "Select File";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.Button2_Click);
//
// button3
//
this.button3.Location = new System.Drawing.Point(33, 53);
this.button3.Margin = new System.Windows.Forms.Padding(2);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(146, 22);
this.button3.TabIndex = 8;
this.button3.Text = "Select File";
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.Button3_Click);
//
// button5
//
this.button5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button5.Location = new System.Drawing.Point(33, 105);
this.button5.Margin = new System.Windows.Forms.Padding(2);
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(296, 47);
this.button5.TabIndex = 10;
this.button5.Text = "Save/Create Bin File";
this.button5.UseVisualStyleBackColor = true;
this.button5.Click += new System.EventHandler(this.Button5_Click);
//
// openFileDialog1
//
this.openFileDialog1.FileName = "openFileDialog1";
//
// button1
//
this.button1.ForeColor = System.Drawing.Color.Red;
this.button1.Location = new System.Drawing.Point(106, 79);
this.button1.Margin = new System.Windows.Forms.Padding(2);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(149, 22);
this.button1.TabIndex = 11;
this.button1.Text = "Unload Files";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.Button1_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(11, 161);
this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(313, 39);
this.label1.TabIndex = 12;
this.label1.Text = "Note:\nBy default the ecu will read a 512k bin from the 8000-FFFF Zone.\nUsing a ma" +
"p switcher device you can read 0000-7FFFF Zone.";
//
// frmBinTool
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(350, 211);
this.Controls.Add(this.label1);
this.Controls.Add(this.button1);
this.Controls.Add(this.button5);
this.Controls.Add(this.button3);
this.Controls.Add(this.button2);
this.Controls.Add(this.textBox3);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(2);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "frmBinTool";
this.Text = "Create 2Timer Bin (512kb file)";
this.Load += new System.EventHandler(this.FrmBinTool_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
public bool MergeFile(string[] tmpfiles)
{
bool flag = false;
try
{
if (tmpfiles[0] == "BLANK")
{
tmpfiles[0] = "tempblank.bin";
File.WriteAllBytes(tmpfiles[0], new byte[0x8000]);
}
FileStream stream = new FileStream(tmpfiles[0], FileMode.Open, FileAccess.Read);
if (!stream.CanRead)
{
MessageBox.Show(Form.ActiveForm, "Couldnt open Section 0000-7fff.");
flag = false;
}
else
{
int length = (int) stream.Length;
byte[] buffer = new byte[length];
stream.Read(buffer, 0, length);
FileStream stream2 = new FileStream(tmpfiles[1], FileMode.Open, FileAccess.Read);
if (!stream2.CanRead)
{
MessageBox.Show(Form.ActiveForm, "Couldnt open Section 8000-ffff.");
flag = false;
}
else
{
int count = (int) stream2.Length;
byte[] buffer2 = new byte[count];
stream2.Read(buffer2, 0, count);
SaveFileDialog dialog = new SaveFileDialog {
Filter = "Bin|*.bin",
Title = "Save an 512K Bin File"
};
dialog.ShowDialog();
if ((dialog.FileName != "") && ((length + count) == 0x10000))
{
using (FileStream stream3 = new FileStream(dialog.FileName, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None))
{
using (BinaryWriter writer = new BinaryWriter(stream3))
{
writer.Write(Combine(buffer, buffer2));
return true;
}
}
}
MessageBox.Show(Form.ActiveForm, "Something went wrong, Resulting file wouldn't of been 65536 bytes!", "Error");
flag = false;
}
}
}
catch
{
flag = false;
}
return flag;
}
}

1790
frmBinTool.resx Normal file

File diff suppressed because it is too large Load Diff

1175
frmBluetooth.cs Normal file

File diff suppressed because it is too large Load Diff

649
frmBluetooth.designer.cs generated Normal file
View File

@ -0,0 +1,649 @@

partial class frmBluetooth
{
/// <summary>
/// Variable nécessaire au concepteur.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Nettoyage des ressources utilisées.
/// </summary>
/// <param name="disposing">true si les ressources managées doivent être supprimées ; sinon, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Code généré par le Concepteur Windows Form
/// <summary>
/// Méthode requise pour la prise en charge du concepteur - ne modifiez pas
/// le contenu de cette méthode avec l'éditeur de code.
/// </summary>
private void InitializeComponent()
{
this.textBox1 = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.comboBox2 = new System.Windows.Forms.ComboBox();
this.button2 = new System.Windows.Forms.Button();
this.label9 = new System.Windows.Forms.Label();
this.button4 = new System.Windows.Forms.Button();
this.button5 = new System.Windows.Forms.Button();
this.label11 = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
this.txt_Name = new System.Windows.Forms.TextBox();
this.txt_Uart = new System.Windows.Forms.TextBox();
this.txt_ID = new System.Windows.Forms.TextBox();
this.txt_Bind = new System.Windows.Forms.TextBox();
this.button6 = new System.Windows.Forms.Button();
this.comboBox4 = new System.Windows.Forms.ComboBox();
this.label16 = new System.Windows.Forms.Label();
this.txt_Pass = new System.Windows.Forms.TextBox();
this.label17 = new System.Windows.Forms.Label();
this.cmb_Role = new System.Windows.Forms.ComboBox();
this.txt_Version = new System.Windows.Forms.TextBox();
this.label18 = new System.Windows.Forms.Label();
this.txt_BuffVersion = new System.Windows.Forms.TextBox();
this.txt_BuffPass = new System.Windows.Forms.TextBox();
this.txt_BuffBind = new System.Windows.Forms.TextBox();
this.txt_BuffID = new System.Windows.Forms.TextBox();
this.txt_BuffUart = new System.Windows.Forms.TextBox();
this.txt_BuffName = new System.Windows.Forms.TextBox();
this.txt_BuffRole = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.button3 = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.button14 = new System.Windows.Forms.Button();
this.button13 = new System.Windows.Forms.Button();
this.button11 = new System.Windows.Forms.Button();
this.button10 = new System.Windows.Forms.Button();
this.button8 = new System.Windows.Forms.Button();
this.button7 = new System.Windows.Forms.Button();
this.textBox2 = new System.Windows.Forms.TextBox();
this.button9 = new System.Windows.Forms.Button();
this.checkBoxAutoProgram = new System.Windows.Forms.CheckBox();
this.label2 = new System.Windows.Forms.Label();
this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
this.SuspendLayout();
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(350, 109);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(52, 20);
this.textBox1.TabIndex = 0;
this.textBox1.Visible = false;
//
// button1
//
this.button1.Location = new System.Drawing.Point(408, 107);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(56, 23);
this.button1.TabIndex = 1;
this.button1.Text = "Send";
this.button1.UseVisualStyleBackColor = true;
this.button1.Visible = false;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// comboBox1
//
this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Location = new System.Drawing.Point(96, 55);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(131, 21);
this.comboBox1.TabIndex = 6;
this.comboBox1.DropDown += new System.EventHandler(this.ComboBox1_DropDown);
//
// comboBox2
//
this.comboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox2.FormattingEnabled = true;
this.comboBox2.Items.AddRange(new object[] {
"4800",
"9600",
"38400",
"57600",
"115200",
"230400",
"460800",
"921600"});
this.comboBox2.Location = new System.Drawing.Point(231, 55);
this.comboBox2.Name = "comboBox2";
this.comboBox2.Size = new System.Drawing.Size(118, 21);
this.comboBox2.TabIndex = 7;
//
// button2
//
this.button2.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button2.Location = new System.Drawing.Point(142, 116);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(176, 36);
this.button2.TabIndex = 8;
this.button2.Text = "Connect";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(56, 59);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(32, 13);
this.label9.TabIndex = 20;
this.label9.Text = "Port :";
//
// button4
//
this.button4.Location = new System.Drawing.Point(142, 153);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(176, 24);
this.button4.TabIndex = 23;
this.button4.Text = "Set as Slave (ECU/CN2)";
this.button4.UseVisualStyleBackColor = true;
this.button4.Click += new System.EventHandler(this.Button4_Click);
//
// button5
//
this.button5.Location = new System.Drawing.Point(142, 178);
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(176, 24);
this.button5.TabIndex = 24;
this.button5.Text = "Set as Master (BMDatalogger)";
this.button5.UseVisualStyleBackColor = true;
this.button5.Click += new System.EventHandler(this.Button5_Click);
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(7, 26);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(38, 13);
this.label11.TabIndex = 25;
this.label11.Text = "Name:";
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(7, 70);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(60, 13);
this.label12.TabIndex = 26;
this.label12.Text = "Baud/Uart:";
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(7, 92);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(32, 13);
this.label13.TabIndex = 27;
this.label13.Text = "Role:";
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(7, 114);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(68, 13);
this.label14.TabIndex = 28;
this.label14.Text = "ID Addresse:";
//
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(7, 136);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(78, 13);
this.label15.TabIndex = 29;
this.label15.Text = "Bind Addresse:";
//
// txt_Name
//
this.txt_Name.Location = new System.Drawing.Point(90, 23);
this.txt_Name.Name = "txt_Name";
this.txt_Name.Size = new System.Drawing.Size(137, 20);
this.txt_Name.TabIndex = 30;
//
// txt_Uart
//
this.txt_Uart.Location = new System.Drawing.Point(90, 67);
this.txt_Uart.Name = "txt_Uart";
this.txt_Uart.Size = new System.Drawing.Size(137, 20);
this.txt_Uart.TabIndex = 31;
//
// txt_ID
//
this.txt_ID.Location = new System.Drawing.Point(90, 111);
this.txt_ID.Name = "txt_ID";
this.txt_ID.ReadOnly = true;
this.txt_ID.Size = new System.Drawing.Size(137, 20);
this.txt_ID.TabIndex = 33;
//
// txt_Bind
//
this.txt_Bind.Location = new System.Drawing.Point(90, 133);
this.txt_Bind.Name = "txt_Bind";
this.txt_Bind.Size = new System.Drawing.Size(137, 20);
this.txt_Bind.TabIndex = 34;
//
// button6
//
this.button6.ForeColor = System.Drawing.Color.Blue;
this.button6.Location = new System.Drawing.Point(17, 153);
this.button6.Name = "button6";
this.button6.Size = new System.Drawing.Size(124, 24);
this.button6.TabIndex = 35;
this.button6.Text = "Get Adapter Infos";
this.button6.UseVisualStyleBackColor = true;
this.button6.Click += new System.EventHandler(this.Button6_Click);
//
// comboBox4
//
this.comboBox4.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox4.FormattingEnabled = true;
this.comboBox4.Items.AddRange(new object[] {
"HC05",
"JDY-31",
"ZS-040/HC06",
"HC06 Old"});
this.comboBox4.Location = new System.Drawing.Point(96, 80);
this.comboBox4.Name = "comboBox4";
this.comboBox4.Size = new System.Drawing.Size(131, 21);
this.comboBox4.TabIndex = 36;
//
// label16
//
this.label16.AutoSize = true;
this.label16.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label16.ForeColor = System.Drawing.Color.Blue;
this.label16.Location = new System.Drawing.Point(124, 9);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(219, 24);
this.label16.TabIndex = 37;
this.label16.Text = "Bluetooth Programmer";
//
// txt_Pass
//
this.txt_Pass.Location = new System.Drawing.Point(90, 155);
this.txt_Pass.Name = "txt_Pass";
this.txt_Pass.Size = new System.Drawing.Size(137, 20);
this.txt_Pass.TabIndex = 39;
//
// label17
//
this.label17.AutoSize = true;
this.label17.Location = new System.Drawing.Point(7, 158);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(56, 13);
this.label17.TabIndex = 38;
this.label17.Text = "Password:";
//
// cmb_Role
//
this.cmb_Role.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.cmb_Role.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmb_Role.FormattingEnabled = true;
this.cmb_Role.Items.AddRange(new object[] {
"Slave",
"Master",
"Slave Loop"});
this.cmb_Role.Location = new System.Drawing.Point(90, 89);
this.cmb_Role.Margin = new System.Windows.Forms.Padding(2);
this.cmb_Role.Name = "cmb_Role";
this.cmb_Role.Size = new System.Drawing.Size(137, 21);
this.cmb_Role.TabIndex = 40;
//
// txt_Version
//
this.txt_Version.Location = new System.Drawing.Point(90, 45);
this.txt_Version.Name = "txt_Version";
this.txt_Version.Size = new System.Drawing.Size(137, 20);
this.txt_Version.TabIndex = 42;
//
// label18
//
this.label18.AutoSize = true;
this.label18.Location = new System.Drawing.Point(7, 48);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(45, 13);
this.label18.TabIndex = 41;
this.label18.Text = "Version:";
//
// txt_BuffVersion
//
this.txt_BuffVersion.Location = new System.Drawing.Point(18, 45);
this.txt_BuffVersion.Name = "txt_BuffVersion";
this.txt_BuffVersion.ReadOnly = true;
this.txt_BuffVersion.Size = new System.Drawing.Size(137, 20);
this.txt_BuffVersion.TabIndex = 56;
//
// txt_BuffPass
//
this.txt_BuffPass.Location = new System.Drawing.Point(18, 155);
this.txt_BuffPass.Name = "txt_BuffPass";
this.txt_BuffPass.ReadOnly = true;
this.txt_BuffPass.Size = new System.Drawing.Size(137, 20);
this.txt_BuffPass.TabIndex = 53;
//
// txt_BuffBind
//
this.txt_BuffBind.Location = new System.Drawing.Point(18, 133);
this.txt_BuffBind.Name = "txt_BuffBind";
this.txt_BuffBind.ReadOnly = true;
this.txt_BuffBind.Size = new System.Drawing.Size(137, 20);
this.txt_BuffBind.TabIndex = 51;
//
// txt_BuffID
//
this.txt_BuffID.Location = new System.Drawing.Point(18, 111);
this.txt_BuffID.Name = "txt_BuffID";
this.txt_BuffID.Size = new System.Drawing.Size(137, 20);
this.txt_BuffID.TabIndex = 50;
//
// txt_BuffUart
//
this.txt_BuffUart.Location = new System.Drawing.Point(18, 67);
this.txt_BuffUart.Name = "txt_BuffUart";
this.txt_BuffUart.ReadOnly = true;
this.txt_BuffUart.Size = new System.Drawing.Size(137, 20);
this.txt_BuffUart.TabIndex = 49;
//
// txt_BuffName
//
this.txt_BuffName.Location = new System.Drawing.Point(18, 23);
this.txt_BuffName.Name = "txt_BuffName";
this.txt_BuffName.ReadOnly = true;
this.txt_BuffName.Size = new System.Drawing.Size(137, 20);
this.txt_BuffName.TabIndex = 48;
//
// txt_BuffRole
//
this.txt_BuffRole.Location = new System.Drawing.Point(18, 89);
this.txt_BuffRole.Name = "txt_BuffRole";
this.txt_BuffRole.ReadOnly = true;
this.txt_BuffRole.Size = new System.Drawing.Size(137, 20);
this.txt_BuffRole.TabIndex = 57;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(38, 83);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(50, 13);
this.label1.TabIndex = 60;
this.label1.Text = "Adapter :";
//
// button3
//
this.button3.ForeColor = System.Drawing.Color.Red;
this.button3.Location = new System.Drawing.Point(17, 178);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(124, 24);
this.button3.TabIndex = 61;
this.button3.Text = "Reset to Defaults";
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.Button3_Click);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.txt_BuffName);
this.groupBox1.Controls.Add(this.txt_BuffUart);
this.groupBox1.Controls.Add(this.txt_BuffID);
this.groupBox1.Controls.Add(this.txt_BuffBind);
this.groupBox1.Controls.Add(this.txt_BuffRole);
this.groupBox1.Controls.Add(this.txt_BuffPass);
this.groupBox1.Controls.Add(this.txt_BuffVersion);
this.groupBox1.Location = new System.Drawing.Point(291, 217);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(173, 184);
this.groupBox1.TabIndex = 62;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Last Adapter Infos";
//
// groupBox2
//
this.groupBox2.Controls.Add(this.button14);
this.groupBox2.Controls.Add(this.button13);
this.groupBox2.Controls.Add(this.button11);
this.groupBox2.Controls.Add(this.button10);
this.groupBox2.Controls.Add(this.button8);
this.groupBox2.Controls.Add(this.txt_Name);
this.groupBox2.Controls.Add(this.label11);
this.groupBox2.Controls.Add(this.label12);
this.groupBox2.Controls.Add(this.label13);
this.groupBox2.Controls.Add(this.label14);
this.groupBox2.Controls.Add(this.txt_Version);
this.groupBox2.Controls.Add(this.label15);
this.groupBox2.Controls.Add(this.label18);
this.groupBox2.Controls.Add(this.txt_Uart);
this.groupBox2.Controls.Add(this.cmb_Role);
this.groupBox2.Controls.Add(this.txt_ID);
this.groupBox2.Controls.Add(this.txt_Pass);
this.groupBox2.Controls.Add(this.txt_Bind);
this.groupBox2.Controls.Add(this.label17);
this.groupBox2.Location = new System.Drawing.Point(10, 217);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(275, 184);
this.groupBox2.TabIndex = 63;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Current Adapter Infos";
//
// button14
//
this.button14.Location = new System.Drawing.Point(228, 154);
this.button14.Name = "button14";
this.button14.Size = new System.Drawing.Size(37, 21);
this.button14.TabIndex = 71;
this.button14.Text = "Set";
this.button14.UseVisualStyleBackColor = true;
this.button14.Click += new System.EventHandler(this.button14_Click);
//
// button13
//
this.button13.Location = new System.Drawing.Point(228, 132);
this.button13.Name = "button13";
this.button13.Size = new System.Drawing.Size(37, 21);
this.button13.TabIndex = 70;
this.button13.Text = "Set";
this.button13.UseVisualStyleBackColor = true;
this.button13.Click += new System.EventHandler(this.button13_Click);
//
// button11
//
this.button11.Location = new System.Drawing.Point(228, 88);
this.button11.Name = "button11";
this.button11.Size = new System.Drawing.Size(37, 21);
this.button11.TabIndex = 68;
this.button11.Text = "Set";
this.button11.UseVisualStyleBackColor = true;
this.button11.Click += new System.EventHandler(this.button11_Click);
//
// button10
//
this.button10.Location = new System.Drawing.Point(228, 66);
this.button10.Name = "button10";
this.button10.Size = new System.Drawing.Size(37, 21);
this.button10.TabIndex = 67;
this.button10.Text = "Set";
this.button10.UseVisualStyleBackColor = true;
this.button10.Click += new System.EventHandler(this.button10_Click);
//
// button8
//
this.button8.Location = new System.Drawing.Point(228, 22);
this.button8.Name = "button8";
this.button8.Size = new System.Drawing.Size(37, 21);
this.button8.TabIndex = 65;
this.button8.Text = "Set";
this.button8.UseVisualStyleBackColor = true;
this.button8.Click += new System.EventHandler(this.button8_Click);
//
// button7
//
this.button7.Location = new System.Drawing.Point(319, 178);
this.button7.Name = "button7";
this.button7.Size = new System.Drawing.Size(128, 24);
this.button7.TabIndex = 64;
this.button7.Text = "Set as Last Adapter";
this.button7.UseVisualStyleBackColor = true;
this.button7.Click += new System.EventHandler(this.Button7_Click);
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(470, 9);
this.textBox2.Multiline = true;
this.textBox2.Name = "textBox2";
this.textBox2.ReadOnly = true;
this.textBox2.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.textBox2.Size = new System.Drawing.Size(269, 392);
this.textBox2.TabIndex = 43;
//
// button9
//
this.button9.Location = new System.Drawing.Point(319, 153);
this.button9.Name = "button9";
this.button9.Size = new System.Drawing.Size(128, 24);
this.button9.TabIndex = 65;
this.button9.Text = "Clear Logs";
this.button9.UseVisualStyleBackColor = true;
this.button9.Click += new System.EventHandler(this.button9_Click);
//
// checkBoxAutoProgram
//
this.checkBoxAutoProgram.AutoSize = true;
this.checkBoxAutoProgram.Location = new System.Drawing.Point(233, 82);
this.checkBoxAutoProgram.Name = "checkBoxAutoProgram";
this.checkBoxAutoProgram.Size = new System.Drawing.Size(116, 17);
this.checkBoxAutoProgram.TabIndex = 66;
this.checkBoxAutoProgram.Text = "Autoprogram each:";
this.checkBoxAutoProgram.UseVisualStyleBackColor = true;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(402, 83);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(24, 13);
this.label2.TabIndex = 67;
this.label2.Text = "sec";
//
// numericUpDown1
//
this.numericUpDown1.Location = new System.Drawing.Point(354, 81);
this.numericUpDown1.Name = "numericUpDown1";
this.numericUpDown1.Size = new System.Drawing.Size(46, 20);
this.numericUpDown1.TabIndex = 68;
this.numericUpDown1.Value = new decimal(new int[] {
13,
0,
0,
0});
//
// frmBluetooth
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.DeepSkyBlue;
this.ClientSize = new System.Drawing.Size(744, 408);
this.Controls.Add(this.numericUpDown1);
this.Controls.Add(this.label2);
this.Controls.Add(this.checkBoxAutoProgram);
this.Controls.Add(this.button9);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.button7);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.button3);
this.Controls.Add(this.label1);
this.Controls.Add(this.label16);
this.Controls.Add(this.comboBox4);
this.Controls.Add(this.button6);
this.Controls.Add(this.button5);
this.Controls.Add(this.button4);
this.Controls.Add(this.label9);
this.Controls.Add(this.button2);
this.Controls.Add(this.comboBox2);
this.Controls.Add(this.comboBox1);
this.Controls.Add(this.button1);
this.Controls.Add(this.textBox1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.Name = "frmBluetooth";
this.ShowIcon = false;
this.Text = "Bluetooth Programmer";
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.ComboBox comboBox2;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Button button4;
private System.Windows.Forms.Button button5;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.TextBox txt_Name;
private System.Windows.Forms.TextBox txt_Uart;
private System.Windows.Forms.TextBox txt_ID;
private System.Windows.Forms.TextBox txt_Bind;
private System.Windows.Forms.Button button6;
private System.Windows.Forms.ComboBox comboBox4;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.TextBox txt_Pass;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.ComboBox cmb_Role;
private System.Windows.Forms.TextBox txt_Version;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.TextBox txt_BuffVersion;
private System.Windows.Forms.TextBox txt_BuffPass;
private System.Windows.Forms.TextBox txt_BuffBind;
private System.Windows.Forms.TextBox txt_BuffID;
private System.Windows.Forms.TextBox txt_BuffUart;
private System.Windows.Forms.TextBox txt_BuffName;
private System.Windows.Forms.TextBox txt_BuffRole;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Button button7;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Button button14;
private System.Windows.Forms.Button button13;
private System.Windows.Forms.Button button11;
private System.Windows.Forms.Button button10;
private System.Windows.Forms.Button button8;
private System.Windows.Forms.Button button9;
private System.Windows.Forms.CheckBox checkBoxAutoProgram;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.NumericUpDown numericUpDown1;
}

120
frmBluetooth.resx Normal file
View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

1401
frmBoostTableSetup.cs Normal file

File diff suppressed because it is too large Load Diff

1787
frmBoostTableSetup.resx Normal file

File diff suppressed because it is too large Load Diff

814
frmBurner.cs Normal file
View File

@ -0,0 +1,814 @@
//using PropertiesRes;
using System;
using System.IO;
using System.Globalization;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
internal class frmBurner : Form
{
public Button button1;
private Button button2;
private Class18 class18_0;
private Class5_burn class5_burn_0;
private IContainer icontainer_0;
private int int_0;
public ListBox ChipSelectBox;
private ListBox listBox2;
private Label label2;
private Label label3;
private GroupBox groupBox1;
private Label label6;
private CheckBox checkBox1;
private Button button3;
private Label label5;
private Label label4;
private Label label1;
private ProgressBar progressBar1;
public byte[] SecondBytes = new byte[] { };
public bool Is2Timer = false;
public bool Inverted = false;
private OpenFileDialog openFileDialog1;
private Button btnAlternative;
private Label label7;
private Label lblBinFilename;
private bool IsLoading = true;
private bool CustomFile = false;
public TextBox txtAccess;
public Label label10;
private byte[] CustomBytes = new byte[] { };
public Label label8;
private Label label9;
private Label label11;
public int LastAccessTime = 20;
public frmBurner()
{
this.InitializeComponent();
lblBinFilename.Text = "";
}
private void button1_Click(object sender, EventArgs e)
{
//if (this.class18_0.class15_0.method_5(Enum4.const_4))
//{
if (this.int_0 == 1)
{
//Reset First Byte
//this.class18_0.byte_0[0] = this.class18_0.StartByte;
Is2Timer = false;
bool CanGo = true;
Inverted = checkBox1.Checked;
if (this.listBox2.SelectedIndex == 2)
{
if (label5.Text == "NO FILE SELECTED")
{
CanGo = false;
MessageBox.Show(Form.ActiveForm, "Error!\n2Timer don't have 2nd file selected!");
}
/*if (SecondBytes.Length < 0x8000)
{
CanGo = false;
MessageBox.Show(Form.ActiveForm, "Error!\n2Timer 2nd file are too short!");
}*/
Is2Timer = true;
}
if (CanGo)
{
SetIndex();
this.button1.Enabled = false;
SetBytess();
this.class5_burn_0.method_16(this);
}
}
else if (this.int_0 == 2)
{
this.button1.Enabled = false;
SetBytess();
this.class5_burn_0.method_17(this);
}
else if (this.int_0 == 3)
{
this.button1.Enabled = false;
SetBytess();
this.class5_burn_0.method_18(this, true);
}
//}
}
private void SetBytess()
{
int FSize = 32768;
if (ChipSelectBox.SelectedIndex == 0 && this.listBox2.SelectedIndex == 2) FSize = FSize * 2;
this.class5_burn_0.byte_ALL = new byte[FSize];
//Set bytes at location #1
for (int i = 0; i < 32768; i++)
{
if (ChipSelectBox.SelectedIndex == 0 && this.listBox2.SelectedIndex == 2)
{
if (!Inverted) this.class5_burn_0.byte_ALL[i] = this.SecondBytes[i];
if (Inverted) this.class5_burn_0.byte_ALL[i] = GetBinFileByteAt(i);
//if (Inverted) this.class5_burn_0.byte_ALL[i] = this.class18_0.GetByteAt(i);
}
else
{
this.class5_burn_0.byte_ALL[i] = this.class18_0.GetByteAt(i);
}
}
//Set bytes at location #2
if (ChipSelectBox.SelectedIndex == 0 && this.listBox2.SelectedIndex == 2)
{
for (int i = 0; i < 32768; i++)
{
if (Inverted) this.class5_burn_0.byte_ALL[i + 32768] = this.SecondBytes[i];
if (!Inverted) this.class5_burn_0.byte_ALL[i + 32768] = GetBinFileByteAt(i);
//if (!Inverted) this.class5_burn_0.byte_ALL[i + 32768] = this.class18_0.GetByteAt(i);
}
}
}
private byte GetBinFileByteAt(int Index)
{
if (!CustomFile) return this.class18_0.GetByteAt(Index);
else return CustomBytes[Index];
}
protected override void Dispose(bool disposing)
{
if (disposing && (this.icontainer_0 != null))
{
this.icontainer_0.Dispose();
}
base.Dispose(disposing);
}
private void frmBurner_Load(object sender, EventArgs e)
{
label5.Text = "NO FILE SELECTED";
label1.Visible = (label5.Text == "NO FILE SELECTED");
//if (this.class18_0.class15_0.method_5(Enum4.const_4))
//{
this.int_0 = int.Parse(base.Tag.ToString());
if (this.int_0 == 1) this.button1.Text = "Write";
else if (this.int_0 == 2) this.button1.Text = "Read";
else if (this.int_0 == 3) this.button1.Text = "Verify";
if (this.int_0 != 1)
{
label10.Visible = false;
txtAccess.Visible = false;
label8.Visible = false;
}
try
{
//int ChipIndex = Settings.Default.burnChipIndex;
int ChipIndex = this.class18_0.class10_settings_0.burnChipIndex;
int ChipBrand = 0;
int ChipRegion = 1;
bool Locked = false;
if (ChipIndex == 0 || ChipIndex == 1 || ChipIndex == 6) ChipBrand = 0;
if (ChipIndex == 1) ChipRegion = 0;
if (ChipIndex == 6) ChipRegion = 2;
if (ChipIndex == 2) { ChipBrand = 1; ChipRegion = 0; Locked = true; }
if (ChipIndex == 3) { ChipBrand = 2; ChipRegion = 0; Locked = true; }
if (ChipIndex == 4 | ChipIndex == 5) ChipBrand = 3;
if (ChipIndex == 5) ChipRegion = 0;
this.ChipSelectBox.SelectedIndex = ChipBrand;
this.listBox2.SelectedIndex = ChipRegion;
this.listBox2.Enabled = !Locked;
Load2TimerBox();
}
catch
{
this.ChipSelectBox.SelectedIndex = 0;
//Settings.Default.burnChipIndex = 0;
this.class18_0.class10_settings_0.burnChipIndex = 0;
this.listBox2.SelectedIndex = 1;
this.listBox2.Enabled = true;
}
/*}
else
{
base.Enabled = false;
this.button1.Enabled = false;
base.Close();
}*/
label6.Visible = checkBox1.Checked;
IsLoading = false;
}
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmBurner));
this.progressBar1 = new System.Windows.Forms.ProgressBar();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.ChipSelectBox = new System.Windows.Forms.ListBox();
this.listBox2 = new System.Windows.Forms.ListBox();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.label6 = new System.Windows.Forms.Label();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.button3 = new System.Windows.Forms.Button();
this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.btnAlternative = new System.Windows.Forms.Button();
this.label7 = new System.Windows.Forms.Label();
this.lblBinFilename = new System.Windows.Forms.Label();
this.txtAccess = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// progressBar1
//
this.progressBar1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.progressBar1.ForeColor = System.Drawing.Color.Lime;
this.progressBar1.Location = new System.Drawing.Point(0, 325);
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(517, 19);
this.progressBar1.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
this.progressBar1.TabIndex = 0;
//
// button1
//
this.button1.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button1.Location = new System.Drawing.Point(395, 279);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(87, 25);
this.button1.TabIndex = 2;
this.button1.Text = "Do";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// button2
//
this.button2.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.button2.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button2.Location = new System.Drawing.Point(289, 279);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(87, 25);
this.button2.TabIndex = 4;
this.button2.Text = "Close";
this.button2.UseVisualStyleBackColor = true;
//
// ChipSelectBox
//
this.ChipSelectBox.FormattingEnabled = true;
this.ChipSelectBox.ItemHeight = 14;
this.ChipSelectBox.Items.AddRange(new object[] {
"SST27SF512",
"SST27SF512 (Fake 70ns)",
"SST27SF256",
"W27C512 (Fake Winbond SST)",
"W27E512",
"AT29C256",
"27C256(read only)",
"27C512(read only)",
"61256/61C256",
"62256/62C256",
"DS1230"});
this.ChipSelectBox.Location = new System.Drawing.Point(14, 58);
this.ChipSelectBox.Name = "ChipSelectBox";
this.ChipSelectBox.Size = new System.Drawing.Size(243, 158);
this.ChipSelectBox.TabIndex = 5;
this.ChipSelectBox.SelectedIndexChanged += new System.EventHandler(this.lstChip_SelectedIndexChanged);
//
// listBox2
//
this.listBox2.FormattingEnabled = true;
this.listBox2.ItemHeight = 14;
this.listBox2.Items.AddRange(new object[] {
"0000-7FFF (32kb chip)",
"8000-FFFF (64kb chip)",
"0000-FFFF (2Timer on 64kb chip)"});
this.listBox2.Location = new System.Drawing.Point(263, 58);
this.listBox2.Name = "listBox2";
this.listBox2.Size = new System.Drawing.Size(243, 46);
this.listBox2.TabIndex = 6;
this.listBox2.SelectedIndexChanged += new System.EventHandler(this.lstRegion_SelectedIndexChanged);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(263, 39);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(114, 14);
this.label2.TabIndex = 7;
this.label2.Text = "Select Chip Region:";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(14, 39);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(73, 14);
this.label3.TabIndex = 9;
this.label3.Text = "Select Chip:";
//
// groupBox1
//
this.groupBox1.Controls.Add(this.label6);
this.groupBox1.Controls.Add(this.checkBox1);
this.groupBox1.Controls.Add(this.button3);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Location = new System.Drawing.Point(263, 110);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(243, 150);
this.groupBox1.TabIndex = 10;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "2Timer";
//
// label6
//
this.label6.AutoSize = true;
this.label6.ForeColor = System.Drawing.Color.Red;
this.label6.Location = new System.Drawing.Point(28, 114);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(192, 28);
this.label6.TabIndex = 5;
this.label6.Text = "when using invert, this 2nd file\r\nare used when the 2Timer are OFF\r\n";
this.label6.Click += new System.EventHandler(this.label6_Click);
//
// checkBox1
//
this.checkBox1.AutoSize = true;
this.checkBox1.Location = new System.Drawing.Point(32, 89);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(136, 18);
this.checkBox1.TabIndex = 4;
this.checkBox1.Text = "Invert Files Location";
this.checkBox1.UseVisualStyleBackColor = true;
this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
//
// button3
//
this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button3.Location = new System.Drawing.Point(73, 41);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(87, 22);
this.button3.TabIndex = 3;
this.button3.Text = "Select File";
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(45, 69);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(40, 14);
this.label5.TabIndex = 2;
this.label5.Text = "label5";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(10, 68);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(29, 14);
this.label4.TabIndex = 1;
this.label4.Text = "File:";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Lucida Sans", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.ForeColor = System.Drawing.Color.Red;
this.label1.Location = new System.Drawing.Point(29, 21);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(186, 14);
this.label1.TabIndex = 0;
this.label1.Text = "Select the 2nd file for the 2Timer";
//
// openFileDialog1
//
this.openFileDialog1.DefaultExt = "bin";
this.openFileDialog1.Filter = "Binary File|*.bin";
this.openFileDialog1.Title = "Open 2nd file for 2Timer";
//
// btnAlternative
//
this.btnAlternative.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnAlternative.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAlternative.Location = new System.Drawing.Point(6, 5);
this.btnAlternative.Name = "btnAlternative";
this.btnAlternative.Size = new System.Drawing.Size(163, 25);
this.btnAlternative.TabIndex = 11;
this.btnAlternative.Text = "Load Alternative .bin File";
this.btnAlternative.UseVisualStyleBackColor = true;
this.btnAlternative.Click += new System.EventHandler(this.BtnAlternative_Click);
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(175, 10);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(29, 14);
this.label7.TabIndex = 12;
this.label7.Text = "File:";
//
// lblBinFilename
//
this.lblBinFilename.AutoSize = true;
this.lblBinFilename.Location = new System.Drawing.Point(212, 10);
this.lblBinFilename.Name = "lblBinFilename";
this.lblBinFilename.Size = new System.Drawing.Size(73, 14);
this.lblBinFilename.TabIndex = 13;
this.lblBinFilename.Text = "filename.bin";
//
// txtAccess
//
this.txtAccess.Location = new System.Drawing.Point(101, 220);
this.txtAccess.Name = "txtAccess";
this.txtAccess.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal;
this.txtAccess.Size = new System.Drawing.Size(31, 20);
this.txtAccess.TabIndex = 15;
this.txtAccess.Text = "20";
this.txtAccess.Validated += new System.EventHandler(this.txtAccess_Validated);
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(16, 223);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(79, 14);
this.label10.TabIndex = 14;
this.label10.Text = "Access Time:";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(138, 223);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(20, 14);
this.label8.TabIndex = 16;
this.label8.Text = "ns";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Font = new System.Drawing.Font("Lucida Sans", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label9.ForeColor = System.Drawing.Color.Red;
this.label9.Location = new System.Drawing.Point(16, 247);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(178, 14);
this.label9.TabIndex = 6;
this.label9.Text = "**ONLY with BMBurner V2++ : **";
//
// label11
//
this.label11.AutoSize = true;
this.label11.Font = new System.Drawing.Font("Lucida Sans", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label11.ForeColor = System.Drawing.SystemColors.ControlText;
this.label11.Location = new System.Drawing.Point(21, 264);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(170, 56);
this.label11.TabIndex = 17;
this.label11.Text = "-W27C512 (Fake Winbond SST)\r\n-W27E512\r\n-SST27SF256\r\n-SST27SF512 (Fake 70ns)";
//
// frmBurner
//
this.AcceptButton = this.button1;
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.button2;
this.ClientSize = new System.Drawing.Size(517, 344);
this.Controls.Add(this.label11);
this.Controls.Add(this.label9);
this.Controls.Add(this.label8);
this.Controls.Add(this.txtAccess);
this.Controls.Add(this.label10);
this.Controls.Add(this.lblBinFilename);
this.Controls.Add(this.label7);
this.Controls.Add(this.btnAlternative);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.listBox2);
this.Controls.Add(this.ChipSelectBox);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.progressBar1);
this.Font = new System.Drawing.Font("Lucida Sans", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "frmBurner";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Burner";
this.Load += new System.EventHandler(this.frmBurner_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
private void lstChip_SelectedIndexChanged(object sender, EventArgs e)
{
RefreshSelectedChip();
}
void RefreshSelectedChip()
{
txtAccess.Text = "70";
if (this.ChipSelectBox.Text == "SST27SF512") txtAccess.Text = "20";
if (this.ChipSelectBox.Text == "W27E512") txtAccess.Text = "150";
if (this.ChipSelectBox.Text == "DS1230") txtAccess.Text = "120";
if (this.ChipSelectBox.Text == "61256/61C256") txtAccess.Text = "45";
if (this.ChipSelectBox.Text == "62256/62C256") txtAccess.Text = "45";
ChangeAccessTime();
bool Locked = false;
if (!Is512k())
{
this.class5_burn_0.method_1(true); //chip index = 2
if (this.ChipSelectBox.Text == "SST27SF256") this.class5_burn_0.method_1_SST256(true);
this.listBox2.SelectedIndex = 0; //select 256k region
Locked = true; //lock 2timer feature
}
else
{
this.class5_burn_0.method_1(false); //chip index = 5
this.listBox2.SelectedIndex = 1; //select 512k region
}
//enable write
if (!CanWrite() && (this.int_0 == 1)) this.button1.Enabled = false;
else this.button1.Enabled = true;
SetIndex();
//2timer lock
this.listBox2.Enabled = !Locked;
}
public bool Is512k()
{
if (this.ChipSelectBox.Text.Contains("512")) return true;
return false;
}
public bool CanWrite()
{
if (!this.ChipSelectBox.Text.Contains("(read only)")) return true;
return false;
}
public void SetIndex()
{
//if SST and 2Timer selected, switch to read last area
if (Is512k() && this.listBox2.SelectedIndex == 2 && this.int_0 == 2)
{
Is2Timer = false;
if (!IsLoading) MessageBox.Show(Form.ActiveForm, "You cannot read the full 2Timer area\nYou can't open 2x files on the same BMTune", "Burner Notification", MessageBoxButtons.OK, MessageBoxIcon.Hand);
this.listBox2.SelectedIndex = 1;
}
if (!Is512k()) this.class5_burn_0.method_3(0L);
else this.class5_burn_0.method_3(0x8000L);
if (Is2Timer)
{
this.class5_burn_0.method_3(0L);
}
int ChipIndex = this.ChipSelectBox.SelectedIndex;
int ChipRegion = this.listBox2.SelectedIndex;
int BurnIndex = 0;
if (ChipIndex == 0 && ChipRegion == 1) BurnIndex = 0;
if (ChipIndex == 0 && ChipRegion == 0) BurnIndex = 1;
if (ChipIndex == 1 && ChipRegion == 0) BurnIndex = 2;
if (ChipIndex == 3 && ChipRegion == 0) BurnIndex = 3;
if (ChipIndex == 4 && ChipRegion == 1) BurnIndex = 4;
if (ChipIndex == 4 && ChipRegion == 0) BurnIndex = 5;
if (ChipIndex == 0 && ChipRegion == 2) BurnIndex = 6;
//Settings.Default.burnChipIndex = BurnIndex;
this.class18_0.class10_settings_0.burnChipIndex = BurnIndex;
Load2TimerBox();
}
void Load2TimerBox()
{
if (Is512k())
{
if (this.int_0 != 2)
{
if (this.listBox2.SelectedIndex == 2)
{
this.groupBox1.Enabled = true;
//this.Size = new Size(287, 512);
}
else
{
SetSmall();
}
}
else
{
Is2Timer = false;
this.listBox2.SelectedIndex = 1;
SetSmall();
}
}
else
{
this.listBox2.SelectedIndex = 0;
SetSmall();
}
}
void SetSmall()
{
this.groupBox1.Enabled = false;
//this.Size = new Size(287, 357);
}
private void lstRegion_SelectedIndexChanged(object sender, EventArgs e)
{
SetIndex();
}
public void method_0(ref Class5_burn class5_1, ref Class18 class18_1)
{
this.class18_0 = class18_1;
this.class5_burn_0 = class5_1;
this.class5_burn_0.delegate8_0 += new Class5_burn.Delegate8(this.method_2);
this.class5_burn_0.delegate9_0 += new Class5_burn.Delegate9(this.SetBurnerTitle);
RefreshSelectedChip();
foreach (Control control in base.Controls)
{
float emSize = control.Font.Size * (class18_0.class10_settings_0.scaleRate / 100f);
control.Font = new Font(control.Font.Name, emSize, control.Font.Style, control.Font.Unit);
}
if (this.class18_0.method_30_HasFileLoadedInBMTune()) this.lblBinFilename.Text = Path.GetFileName(this.class18_0.method_25_GetFilename());
}
private void SetBurnerTitle(string string_0)
{
this.Text = "Burner: " + string_0;
if (string_0.Contains("Chip not verified") || string_0.Contains("Failed to read"))
{
this.button1.BackColor = this.class18_0.class10_settings_0.color_Off;
}
else if (string_0.Contains("Chip verified") || string_0.Contains("Succesfully read"))
{
this.button1.BackColor = this.class18_0.class10_settings_0.color_On;
}
else
{
this.button1.BackColor = SystemColors.Control;
}
this.Refresh();
}
private void method_2(int int_1)
{
this.progressBar1.Value = int_1;
if (int_1 != 100)
{
this.button1.Enabled = false;
}
else
{
this.button1.Enabled = true;
}
}
private void button3_Click(object sender, EventArgs e)
{
DialogResult result = openFileDialog1.ShowDialog();
if (result == DialogResult.OK)
{
byte[] BuffBytes = File.ReadAllBytes(openFileDialog1.FileName);
if (BuffBytes.Length < 0x8000)
{
MessageBox.Show(Form.ActiveForm, "Error!\nSelected file are too short, this is not a 32kb file!");
}
else if (BuffBytes.Length > 0x8000)
{
if (MessageBox.Show(Form.ActiveForm, "Error!\nSelected file are too long, this is not a 32kb file!" + Environment.NewLine + "Only the first 32kb will be burn" + Environment.NewLine + "Do you want to continue?", "BMTune", MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk) == DialogResult.Yes)
{
Set2Timer();
}
}
else
{
Set2Timer();
}
}
}
private void Set2Timer()
{
this.label5.Text = Path.GetFileName(openFileDialog1.FileName);
this.SecondBytes = File.ReadAllBytes(openFileDialog1.FileName);
label1.Visible = (label5.Text == "NO FILE SELECTED");
}
private void BtnAlternative_Click(object sender, EventArgs e)
{
string BackupTitle = openFileDialog1.Title;
openFileDialog1.Title = "Open any binary file";
DialogResult result = openFileDialog1.ShowDialog();
if (result == DialogResult.OK)
{
CustomBytes = File.ReadAllBytes(openFileDialog1.FileName);
if (CustomBytes.Length < 0x8000)
{
MessageBox.Show(Form.ActiveForm, "Error!\nSelected file are too short, this is not a 32kb file!");
}
else if (CustomBytes.Length > 0x8000)
{
if (MessageBox.Show(Form.ActiveForm, "Error!\nSelected file are too long, this is not a 32kb file!" + Environment.NewLine + "Only the first 32kb will be burn" + Environment.NewLine + "Do you want to continue?", "BMTune", MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk) == DialogResult.Yes)
{
SetCustom();
}
}
else {
SetCustom();
}
}
openFileDialog1.Title = BackupTitle;
}
private void SetCustom()
{
CustomFile = true;
this.lblBinFilename.Text = Path.GetFileName(openFileDialog1.FileName);
}
private void txtAccess_Validated(object sender, EventArgs e)
{
ChangeAccessTime();
}
private void ChangeAccessTime()
{
try
{
int AccT = int.Parse(txtAccess.Text);
if (AccT > 0 && AccT < 255)
{
if (AccT != LastAccessTime)
{
//Log_This("Changing AccessTime to: " + AccT + "ns");
//Serial.ChangeAccTime(AccT);
LastAccessTime = AccT;
}
}
else
{
MessageBox.Show(Form.ActiveForm, "ERROR : AccessTime not correctly set");
}
}
catch
{
MessageBox.Show(Form.ActiveForm, "ERROR : AccessTime not correctly set");
}
}
private void label6_Click(object sender, EventArgs e)
{
}
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
label6.Visible = checkBox1.Checked;
}
}

1790
frmBurner.resx Normal file

File diff suppressed because it is too large Load Diff

11
frmCPUBench.Designer.cs generated Normal file
View File

@ -0,0 +1,11 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Ce code a été généré par un outil.
// Version du runtime :4.0.30319.42000
//
// Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si
// le code est régénéré.
// </auto-generated>
//------------------------------------------------------------------------------
using System;

832
frmCPUBench.cs Normal file
View File

@ -0,0 +1,832 @@
using Microsoft.Win32;
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Management;
using System.Runtime.CompilerServices;
using System.Windows.Forms;
public class frmCPUBench : Form
{
public static string string_0 = "";
public static string string_1;
public static string string_2;
public static int int_0 = 0;
public long long_0;
public long long_1;
public long long_2;
public int int_1 = 0x3a98;
private const int int_2 = 0x200;
private IContainer icontainer_0;
private Button button1;
private Label label1;
private Label label2;
private ProgressBar progressBar1;
private ProgressBar progressBar2;
private ProgressBar progressBar3;
private ProgressBar progressBar4;
private Label label3;
private Button button2;
private Label label4;
private Label label5;
private Label label7;
private Label label8;
private Label label9;
private Label label10;
private Label label6;
internal frmCPUBench(ref Class17 Class17_1)
{
this.InitializeComponent();
/*foreach (Control control in base.Controls)
{
float emSize = control.Font.Size * (class18_0.class10_settings_0.scaleRate / 100f);
control.Font = new Font(control.Font.Name, emSize, control.Font.Style, control.Font.Unit);
}*/
}
private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show("Your Laptop may stop responding for 10-20 sec this is normal as the CPU 100% loaded");
this.long_0 = 0L;
this.Text = "Laptop Benchmark Tool - Benchmark in progress";
this.method_2();
this.long_1 = smethod_00(DateTime.Now);
this.long_2 = this.long_1 + 10L;
this.method_3();
this.method_4();
this.method_5();
this.method_6();
if (Environment.ProcessorCount >= 8)
{
this.method_7();
this.method_8();
this.method_9();
this.method_10();
}
}
public long smethod_00(DateTime dateTime_0) {
return ((long)(dateTime_0 - new DateTime(0x7b2, 1, 1, 0, 0, 0)).TotalSeconds);
}
private void button2_Click(object sender, EventArgs e)
{
base.Close();
}
private void CPUBench_Load(object sender, EventArgs e)
{
//this.progressBar1.GEnum19_0 = GEnum19.CustomText;
//this.progressBar2.GEnum19_0 = GEnum19.CustomText;
//this.progressBar3.GEnum19_0 = GEnum19.CustomText;
//this.progressBar4.GEnum19_0 = GEnum19.CustomText;
string_0 = "";
this.method_0();
this.method_1();
string[] textArray1 = new string[] { string_0, Environment.NewLine, "Dot Net frameworks found on system:", Environment.NewLine, Class22_startup.string_8 };
this.label2.Text = string.Concat(textArray1);
if (int.Parse(string_2) < 4)
{
MessageBox.Show("CPU thead count is less than recommended spec of 4 threads." + Environment.NewLine + "The program is designed to use 1 thread per task, Emulation/datalogging/Table tracing/GUI Updates", "Under Min Spec", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
int_0 += 0x7d0;
}
if (int.Parse(string_1) < 4)
{
int_0 += 0x7d0;
MessageBox.Show("RAM is less than recommended spec of 4GB." + Environment.NewLine + "You may not have any issues but the test team has found 4GB to be optimum", "Under Min Spec", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
}
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmCPUBench));
this.button1 = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.progressBar1 = new System.Windows.Forms.ProgressBar();
this.label3 = new System.Windows.Forms.Label();
this.progressBar2 = new System.Windows.Forms.ProgressBar();
this.progressBar3 = new System.Windows.Forms.ProgressBar();
this.progressBar4 = new System.Windows.Forms.ProgressBar();
this.button2 = new System.Windows.Forms.Button();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// button1
//
this.button1.Location = new System.Drawing.Point(376, 7);
this.button1.Margin = new System.Windows.Forms.Padding(2);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(143, 43);
this.button1.TabIndex = 0;
this.button1.Text = "Start Benchmark";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(7, 7);
this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(42, 13);
this.label1.TabIndex = 1;
this.label1.Text = "Details:";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(7, 27);
this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(35, 13);
this.label2.TabIndex = 2;
this.label2.Text = "label2";
//
// progressBar1
//
this.progressBar1.BackColor = System.Drawing.SystemColors.Control;
this.progressBar1.Location = new System.Drawing.Point(10, 214);
this.progressBar1.Margin = new System.Windows.Forms.Padding(2);
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(340, 16);
this.progressBar1.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
this.progressBar1.TabIndex = 3;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(7, 189);
this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(124, 13);
this.label3.TabIndex = 4;
this.label3.Text = "CPU Bench Score: 0000";
//
// progressBar2
//
this.progressBar2.Location = new System.Drawing.Point(10, 234);
this.progressBar2.Margin = new System.Windows.Forms.Padding(2);
this.progressBar2.Name = "progressBar2";
this.progressBar2.Size = new System.Drawing.Size(340, 16);
this.progressBar2.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
this.progressBar2.TabIndex = 5;
//
// progressBar3
//
this.progressBar3.Location = new System.Drawing.Point(10, 254);
this.progressBar3.Margin = new System.Windows.Forms.Padding(2);
this.progressBar3.Name = "progressBar3";
this.progressBar3.Size = new System.Drawing.Size(340, 16);
this.progressBar3.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
this.progressBar3.TabIndex = 6;
//
// progressBar4
//
this.progressBar4.Location = new System.Drawing.Point(10, 274);
this.progressBar4.Margin = new System.Windows.Forms.Padding(2);
this.progressBar4.Name = "progressBar4";
this.progressBar4.Size = new System.Drawing.Size(340, 16);
this.progressBar4.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
this.progressBar4.TabIndex = 7;
//
// button2
//
this.button2.Location = new System.Drawing.Point(376, 53);
this.button2.Margin = new System.Windows.Forms.Padding(2);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(143, 43);
this.button2.TabIndex = 8;
this.button2.Text = "Exit";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.142858F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
this.label4.Location = new System.Drawing.Point(453, 106);
this.label4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(43, 13);
this.label4.TabIndex = 9;
this.label4.Text = "GOOD";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.142858F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
this.label5.Location = new System.Drawing.Point(461, 122);
this.label5.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(24, 13);
this.label5.TabIndex = 10;
this.label5.Text = "OK";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label6
//
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.142858F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label6.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.label6.Location = new System.Drawing.Point(456, 140);
this.label6.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(32, 13);
this.label6.TabIndex = 11;
this.label6.Text = "BAD";
this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(362, 216);
this.label7.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(62, 13);
this.label7.TabIndex = 12;
this.label7.Text = "GUI thread:";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(362, 236);
this.label8.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(84, 13);
this.label8.TabIndex = 13;
this.label8.Text = "Emulator thread:";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(362, 256);
this.label9.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(100, 13);
this.label9.TabIndex = 14;
this.label9.Text = "Datalogging thread:";
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(362, 276);
this.label10.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(105, 13);
this.label10.TabIndex = 15;
this.label10.Text = "Table Editing thread:";
//
// frmCPUBench
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(526, 296);
this.Controls.Add(this.label10);
this.Controls.Add(this.label9);
this.Controls.Add(this.label8);
this.Controls.Add(this.label7);
this.Controls.Add(this.label6);
this.Controls.Add(this.label5);
this.Controls.Add(this.label4);
this.Controls.Add(this.button2);
this.Controls.Add(this.progressBar4);
this.Controls.Add(this.progressBar3);
this.Controls.Add(this.progressBar2);
this.Controls.Add(this.label3);
this.Controls.Add(this.progressBar1);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.button1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(2);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "frmCPUBench";
this.Text = "Laptop Benchmark Tool";
this.Load += new System.EventHandler(this.CPUBench_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
public void method_0()
{
foreach (ManagementObject obj2 in new ManagementObjectSearcher("select * from Win32_OperatingSystem").Get())
{
if (obj2["Caption"] != null)
{
string_0 = string_0 + "Operating System Name : " + obj2["Caption"].ToString() + Environment.NewLine;
}
if (obj2["OSArchitecture"] != null)
{
string_0 = string_0 + "Operating System Architecture : " + obj2["OSArchitecture"].ToString() + Environment.NewLine;
}
if (obj2["CSDVersion"] != null)
{
string_0 = string_0 + "Operating System Service Pack : " + obj2["CSDVersion"].ToString() + Environment.NewLine;
}
if (obj2["TotalVisibleMemorySize"] != null)
{
string_1 = (int.Parse(obj2["TotalVisibleMemorySize"].ToString()) / 0x100000).ToString("0");
string[] textArray1 = new string[] { string_0, "Total RAM : ", string_1, " GB", Environment.NewLine };
string_0 = string.Concat(textArray1);
}
}
}
public void method_1()
{
RegistryKey key = Registry.LocalMachine.OpenSubKey(@"Hardware\Description\System\CentralProcessor\0", (RegistryKeyPermissionCheck) RegistryKeyPermissionCheck.ReadSubTree);
if ((key != null) && (key.GetValue("ProcessorNameString") != null))
{
string text1;
object obj1 = key.GetValue("ProcessorNameString");
if (obj1 != null)
{
text1 = obj1.ToString();
}
else
{
object local1 = obj1;
text1 = null;
}
string_0 = string_0 + text1 + Environment.NewLine;
}
string_2 = Environment.ProcessorCount.ToString();
string_0 = string_0 + "CPU Threads: " + Environment.ProcessorCount.ToString() + Environment.NewLine;
}
private void method_10()
{
BackgroundWorker worker = new BackgroundWorker {
WorkerReportsProgress = true
};
worker.DoWork += new DoWorkEventHandler(this.method_30);
worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(this.method_31);
worker.RunWorkerAsync();
}
public long method_11(int int_3)
{
int num = 0;
long num2 = 2L;
while (num < int_3)
{
long num3 = 2L;
int num4 = 1;
while (true)
{
if ((num3 * num3) <= num2)
{
if ((num2 % num3) != 0)
{
num3 += 1L;
continue;
}
num4 = 0;
}
if (num4 > 0)
{
num++;
}
num2 += 1L;
break;
}
}
return (num2 -= 1L);
}
private void method_12(object sender, DoWorkEventArgs e)
{
BackgroundWorker worker = sender as BackgroundWorker;
bool flag = false;
while (!flag)
{
this.long_0 += 1L;
Stopwatch stopwatch = Stopwatch.StartNew();
this.method_11(this.int_1);
stopwatch.Stop();
worker.ReportProgress((int) stopwatch.ElapsedMilliseconds);
this.long_1 = smethod_00(DateTime.Now);
if (this.long_1 >= this.long_2)
{
flag = true;
}
}
}
private void method_13(object sender, ProgressChangedEventArgs e)
{
int num = smethod_0(0x3e8, 20, 10, 0x63, int.Parse(e.ProgressPercentage.ToString()));
if (num >= 100)
{
num = 0x63;
}
if (num <= 10)
{
num = 10;
}
this.progressBar1.Value = num;
this.label3.Text = "CPU Bench Score: " + e.ProgressPercentage.ToString() + " ms";
if (this.progressBar1.Value >= 70)
{
label7.Text = "GUI thread: GOOD";
label7.ForeColor = Color.Green;
}
else if ((this.progressBar1.Value > 0x45) || (this.progressBar1.Value < 40))
{
label7.Text = "GUI thread: BAD";
label7.ForeColor = Color.DarkRed;
}
else
{
label7.Text = "GUI thread: OK";
label7.ForeColor = Color.GreenYellow;
}
}
private void method_14(object sender, RunWorkerCompletedEventArgs e)
{
this.label3.Text = "CPU Bench Score: " + this.long_0.ToString();
this.button1.Text = "Benchmark";
this.Text = "Laptop Benchmark Tool";
this.button1.Enabled = true;
this.button2.Enabled = true;
}
private void method_15(object sender, DoWorkEventArgs e)
{
BackgroundWorker worker = sender as BackgroundWorker;
bool flag = false;
while (!flag)
{
this.long_0 += 1L;
Stopwatch stopwatch = Stopwatch.StartNew();
this.method_11(this.int_1);
stopwatch.Stop();
worker.ReportProgress((int) stopwatch.ElapsedMilliseconds);
this.long_1 = smethod_00(DateTime.Now);
if (this.long_1 >= this.long_2)
{
flag = true;
}
}
}
private void method_16(object sender, ProgressChangedEventArgs e)
{
int num = smethod_0(0x3e8, 20, 10, 0x63, int.Parse(e.ProgressPercentage.ToString()));
if (num >= 100)
{
num = 0x63;
}
if (num <= 10)
{
num = 10;
}
this.progressBar2.Value = num;
if (this.progressBar2.Value >= 70)
{
label8.Text = "Emulator thread: GOOD";
label8.ForeColor = Color.Green;
}
else if ((this.progressBar2.Value > 0x45) || (this.progressBar2.Value < 40))
{
label8.Text = "Emulator thread: BAD";
label8.ForeColor = Color.DarkRed;
}
else
{
label8.Text = "Emulator thread: OK";
label8.ForeColor = Color.GreenYellow;
}
}
private void method_17(object sender, RunWorkerCompletedEventArgs e)
{
this.label3.Text = "CPU Bench Score: " + this.long_0.ToString();
}
private void method_18(object sender, DoWorkEventArgs e)
{
BackgroundWorker worker = sender as BackgroundWorker;
bool flag = false;
while (!flag)
{
this.long_0 += 1L;
Stopwatch stopwatch = Stopwatch.StartNew();
this.method_11(this.int_1);
stopwatch.Stop();
worker.ReportProgress((int) stopwatch.ElapsedMilliseconds);
this.long_1 = smethod_00(DateTime.Now);
if (this.long_1 >= this.long_2)
{
flag = true;
}
}
}
private void method_19(object sender, ProgressChangedEventArgs e)
{
int num = smethod_0(0x3e8, 20, 10, 0x63, int.Parse(e.ProgressPercentage.ToString()));
if (num >= 100)
{
num = 0x63;
}
if (num <= 10)
{
num = 10;
}
this.progressBar3.Value = num;
if (this.progressBar3.Value >= 70)
{
label9.Text = "Datalogging thread: GOOD";
label9.ForeColor = Color.Green;
}
else if ((this.progressBar3.Value > 0x45) || (this.progressBar3.Value < 40))
{
label9.Text = "Datalogging thread: BAD";
label9.ForeColor = Color.DarkRed;
}
else
{
label9.Text = "Datalogging thread: OK";
label9.ForeColor = Color.GreenYellow;
}
}
private void method_2()
{
this.button1.Text = "Working";
this.button2.Enabled = false;
this.button1.Enabled = false;
}
private void method_20(object sender, RunWorkerCompletedEventArgs e)
{
this.label3.Text = "CPU Bench Score: " + this.long_0.ToString();
}
private void method_21(object sender, DoWorkEventArgs e)
{
BackgroundWorker worker = sender as BackgroundWorker;
bool flag = false;
while (!flag)
{
this.long_0 += 1L;
Stopwatch stopwatch = Stopwatch.StartNew();
this.method_11(this.int_1);
stopwatch.Stop();
worker.ReportProgress((int) stopwatch.ElapsedMilliseconds);
this.long_1 = smethod_00(DateTime.Now);
if (this.long_1 >= this.long_2)
{
flag = true;
}
}
}
private void method_22(object sender, ProgressChangedEventArgs e)
{
int num = smethod_0(0x3e8, 20, 10, 0x63, int.Parse(e.ProgressPercentage.ToString()));
if (num >= 100)
{
num = 0x63;
}
if (num <= 10)
{
num = 10;
}
this.progressBar4.Value = num;
if (this.progressBar4.Value >= 70)
{
label10.Text = "Table Editing thread: GOOD";
label10.ForeColor = Color.Green;
}
else if ((this.progressBar4.Value > 0x45) || (this.progressBar4.Value < 40))
{
label10.Text = "Table Editing thread: BAD";
label10.ForeColor = Color.DarkRed;
}
else
{
label10.Text = "Table Editing thread: OK";
label10.ForeColor = Color.GreenYellow;
}
}
private void method_23(object sender, RunWorkerCompletedEventArgs e)
{
this.label3.Text = "CPU Bench Score: " + this.long_0.ToString();
}
private void method_24(object sender, DoWorkEventArgs e)
{
BackgroundWorker worker = sender as BackgroundWorker;
bool flag = false;
while (!flag)
{
this.long_0 += 1L;
Stopwatch stopwatch = Stopwatch.StartNew();
this.method_11(this.int_1);
stopwatch.Stop();
worker.ReportProgress((int) stopwatch.ElapsedMilliseconds);
this.long_1 = smethod_00(DateTime.Now);
if (this.long_1 >= this.long_2)
{
flag = true;
}
}
}
private void method_25(object sender, RunWorkerCompletedEventArgs e)
{
this.label3.Text = "CPU Bench Score: " + this.long_0.ToString();
}
private void method_26(object sender, DoWorkEventArgs e)
{
BackgroundWorker worker = sender as BackgroundWorker;
bool flag = false;
while (!flag)
{
this.long_0 += 1L;
Stopwatch stopwatch = Stopwatch.StartNew();
this.method_11(this.int_1);
stopwatch.Stop();
worker.ReportProgress((int) stopwatch.ElapsedMilliseconds);
this.long_1 = smethod_00(DateTime.Now);
if (this.long_1 >= this.long_2)
{
flag = true;
}
}
}
private void method_27(object sender, RunWorkerCompletedEventArgs e)
{
this.label3.Text = "CPU Bench Score: " + this.long_0.ToString();
}
private void method_28(object sender, DoWorkEventArgs e)
{
BackgroundWorker worker = sender as BackgroundWorker;
bool flag = false;
while (!flag)
{
this.long_0 += 1L;
Stopwatch stopwatch = Stopwatch.StartNew();
this.method_11(this.int_1);
stopwatch.Stop();
worker.ReportProgress((int) stopwatch.ElapsedMilliseconds);
this.long_1 = smethod_00(DateTime.Now);
if (this.long_1 >= this.long_2)
{
flag = true;
}
}
}
private void method_29(object sender, RunWorkerCompletedEventArgs e)
{
this.label3.Text = "CPU Bench Score: " + this.long_0.ToString();
}
private void method_3()
{
BackgroundWorker worker = new BackgroundWorker {
WorkerReportsProgress = true
};
worker.DoWork += new DoWorkEventHandler(this.method_12);
worker.ProgressChanged += new ProgressChangedEventHandler(this.method_13);
worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(this.method_14);
worker.RunWorkerAsync();
}
private void method_30(object sender, DoWorkEventArgs e)
{
BackgroundWorker worker = sender as BackgroundWorker;
bool flag = false;
while (!flag)
{
this.long_0 += 1L;
Stopwatch stopwatch = Stopwatch.StartNew();
this.method_11(this.int_1);
stopwatch.Stop();
worker.ReportProgress((int) stopwatch.ElapsedMilliseconds);
this.long_1 = smethod_00(DateTime.Now);
if (this.long_1 >= this.long_2)
{
flag = true;
}
}
}
private void method_31(object sender, RunWorkerCompletedEventArgs e)
{
this.label3.Text = "CPU Bench Score: " + this.long_0.ToString();
}
private void method_4()
{
BackgroundWorker worker = new BackgroundWorker {
WorkerReportsProgress = true
};
worker.DoWork += new DoWorkEventHandler(this.method_15);
worker.ProgressChanged += new ProgressChangedEventHandler(this.method_16);
worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(this.method_17);
worker.RunWorkerAsync();
}
private void method_5()
{
BackgroundWorker worker = new BackgroundWorker {
WorkerReportsProgress = true
};
worker.DoWork += new DoWorkEventHandler(this.method_18);
worker.ProgressChanged += new ProgressChangedEventHandler(this.method_19);
worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(this.method_20);
worker.RunWorkerAsync();
}
private void method_6()
{
BackgroundWorker worker = new BackgroundWorker {
WorkerReportsProgress = true
};
worker.DoWork += new DoWorkEventHandler(this.method_21);
worker.ProgressChanged += new ProgressChangedEventHandler(this.method_22);
worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(this.method_23);
worker.RunWorkerAsync();
}
private void method_7()
{
BackgroundWorker worker = new BackgroundWorker {
WorkerReportsProgress = true
};
worker.DoWork += new DoWorkEventHandler(this.method_24);
worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(this.method_25);
worker.RunWorkerAsync();
}
private void method_8()
{
BackgroundWorker worker = new BackgroundWorker {
WorkerReportsProgress = true
};
worker.DoWork += new DoWorkEventHandler(this.method_26);
worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(this.method_27);
worker.RunWorkerAsync();
}
private void method_9()
{
BackgroundWorker worker = new BackgroundWorker {
WorkerReportsProgress = true
};
worker.DoWork += new DoWorkEventHandler(this.method_28);
worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(this.method_29);
worker.RunWorkerAsync();
}
public int smethod_0(int int_3, int int_4, int int_5, int int_6, int int_7)
{
double num = ((double) (int_6 - int_5)) / ((double) (int_4 - int_3));
return (int_5 + ((int) ((int_7 - int_3) * num)));
}
protected override void Dispose(bool disposing)
{
if (disposing && (this.icontainer_0 != null))
{
this.icontainer_0.Dispose();
}
base.Dispose(disposing);
}
protected override CreateParams CreateParams
{
get
{
CreateParams createParams = base.CreateParams;
createParams.ClassStyle |= 0x200;
return createParams;
}
}
}

1787
frmCPUBench.resx Normal file

File diff suppressed because it is too large Load Diff

117
frmChangelog.cs Normal file
View File

@ -0,0 +1,117 @@
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Reflection;
using System.Windows.Forms;
internal class frmChangelog : Form
{
private IContainer icontainer_0;
private Label labelProductName;
private Button okButton;
private TextBox textBoxDescription;
private Class18 Class18_0;
public frmChangelog(ref Class18 Class18_1)
{
this.InitializeComponent();
Class18_0 = Class18_1;
//this.Class18_0.LoadBinaryFiles();
textBoxDescription.Text = Class18_0.Binary_Files_0.Changelogs;
//this.Class18_0.CloseBinaryFiles();
foreach (Control control in base.Controls)
{
float emSize = control.Font.Size * (Class18_0.class10_settings_0.scaleRate / 100f);
control.Font = new Font(control.Font.Name, emSize, control.Font.Style, control.Font.Unit);
}
}
protected override void Dispose(bool disposing)
{
if (disposing && (this.icontainer_0 != null))
{
this.icontainer_0.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmChangelog));
this.labelProductName = new System.Windows.Forms.Label();
this.okButton = new System.Windows.Forms.Button();
this.textBoxDescription = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// labelProductName
//
this.labelProductName.AutoSize = true;
this.labelProductName.Font = new System.Drawing.Font("Lucida Sans", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelProductName.Location = new System.Drawing.Point(102, 10);
this.labelProductName.Margin = new System.Windows.Forms.Padding(7, 0, 3, 0);
this.labelProductName.MaximumSize = new System.Drawing.Size(0, 18);
this.labelProductName.Name = "labelProductName";
this.labelProductName.Size = new System.Drawing.Size(387, 15);
this.labelProductName.TabIndex = 19;
this.labelProductName.Text = "BASEROMS VERSIONS CHANGELOGS AND INFORMATIONS";
this.labelProductName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// okButton
//
this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.okButton.AutoSize = true;
this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
this.okButton.Location = new System.Drawing.Point(460, 557);
this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(87, 25);
this.okButton.TabIndex = 24;
this.okButton.Text = "&Close";
//
// textBoxDescription
//
this.textBoxDescription.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textBoxDescription.Location = new System.Drawing.Point(10, 28);
this.textBoxDescription.Margin = new System.Windows.Forms.Padding(7, 3, 3, 3);
this.textBoxDescription.Multiline = true;
this.textBoxDescription.Name = "textBoxDescription";
this.textBoxDescription.ReadOnly = true;
this.textBoxDescription.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.textBoxDescription.Size = new System.Drawing.Size(573, 523);
this.textBoxDescription.TabIndex = 23;
this.textBoxDescription.TabStop = false;
this.textBoxDescription.Text = "\r\n© BMTune, LLC (BMDevs) 2017";
//
// frmChangelog
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(594, 590);
this.Controls.Add(this.textBoxDescription);
this.Controls.Add(this.labelProductName);
this.Controls.Add(this.okButton);
this.Font = new System.Drawing.Font("Lucida Sans", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "frmChangelog";
this.Padding = new System.Windows.Forms.Padding(10);
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Baseroms Versions Changelogs";
this.Load += new System.EventHandler(this.frmChangelog_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
private void frmChangelog_Load(object sender, EventArgs e)
{
}
}

1787
frmChangelog.resx Normal file

File diff suppressed because it is too large Load Diff

708
frmChartTemplates.cs Normal file
View File

@ -0,0 +1,708 @@
using Data;
using System;
using System.IO;
using System.Diagnostics;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
internal class frmChartTemplates : Form
{
private bool bool_0;
private Button button_0;
private Button button_1;
private Button button_2;
private Button button_3;
private Button button_4;
private ChartCollection chartCollection_0;
private Class10_settings class10_settings_0;
private Class18 class18_0;
private ColorDialog colorDialog_0;
private IContainer icontainer_0;
private int int_0;
private Label label5;
private Label label6;
private Label label7;
private Label label8;
private Label label9;
private ComboBox plot1;
private ComboBox plot2;
private ComboBox plot3;
private ComboBox plot4;
private ComboBox plot5;
private Panel pnlGraphSetup;
private TabControl tabGraphs;
private TabPage tabPage1;
private TabPage tabPage2;
private TabPage tabPage3;
private Label label1;
private ComboBox comboBox1;
private Button button1;
private Button button2;
private SaveFileDialog saveFileDialog1;
private OpenFileDialog openFileDialog1;
private TabPage tabPage4;
private bool IsLoading = true;
internal frmChartTemplates()
{
this.InitializeComponent();
}
private void button_4_Click(object sender, EventArgs e)
{
if (this.colorDialog_0.ShowDialog() == DialogResult.OK)
((Button) sender).BackColor = this.colorDialog_0.Color;
}
public void ResetSelected()
{
try
{
this.tabGraphs.TabPages.Remove(this.tabPage2);
this.tabGraphs.TabPages.Remove(this.tabPage3);
this.tabGraphs.TabPages.Remove(this.tabPage4);
this.chartCollection_0.getSelectedTemplate().ChartsEnable[1] = false;
this.chartCollection_0.getSelectedTemplate().ChartsEnable[2] = false;
this.chartCollection_0.getSelectedTemplate().ChartsEnable[3] = false;
}
catch { }
if (comboBox1.SelectedIndex == 1)
{
this.tabGraphs.TabPages.Add(this.tabPage2);
this.chartCollection_0.getSelectedTemplate().ChartsEnable[1] = true;
}
if (comboBox1.SelectedIndex == 2)
{
this.tabGraphs.TabPages.Add(this.tabPage2);
this.tabGraphs.TabPages.Add(this.tabPage3);
this.chartCollection_0.getSelectedTemplate().ChartsEnable[1] = true;
this.chartCollection_0.getSelectedTemplate().ChartsEnable[2] = true;
}
if (comboBox1.SelectedIndex == 3)
{
this.tabGraphs.TabPages.Add(this.tabPage2);
this.tabGraphs.TabPages.Add(this.tabPage3);
this.tabGraphs.TabPages.Add(this.tabPage4);
this.chartCollection_0.getSelectedTemplate().ChartsEnable[1] = true;
this.chartCollection_0.getSelectedTemplate().ChartsEnable[2] = true;
this.chartCollection_0.getSelectedTemplate().ChartsEnable[3] = true;
}
if (this.class18_0.class17_0.frmMain_0.frmDatalogGraphs_0 != null)
{
if (this.class18_0.class17_0.frmMain_0.frmDatalogGraphs_0.ctrlLogGraph1 != null)
{
this.class18_0.class17_0.frmMain_0.frmDatalogGraphs_0.ctrlLogGraph1.ClearGraphStruct();
this.class18_0.class17_0.frmMain_0.frmDatalogGraphs_0.ctrlLogGraph1.Refresh();
}
}
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (!IsLoading) ResetSelected();
}
protected override void Dispose(bool disposing)
{
if (disposing && (this.icontainer_0 != null))
{
this.icontainer_0.Dispose();
}
base.Dispose(disposing);
}
private void frmChartTemplates_FormClosing(object sender, FormClosingEventArgs e)
{
this.class18_0.method_155("Graph Presets Settings");
this.method_3(this.tabGraphs.SelectedIndex);
this.class10_settings_0.chartCollection_0 = this.chartCollection_0;
this.chartCollection_0.throwEvent();
if (this.class18_0.class17_0.frmMain_0.frmDatalogGraphs_0 != null)
{
if (this.class18_0.class17_0.frmMain_0.frmDatalogGraphs_0.ctrlLogGraph1 != null)
{
this.class18_0.class17_0.frmMain_0.frmDatalogGraphs_0.ctrlLogGraph1.ClearGraphStruct();
this.class18_0.class17_0.frmMain_0.frmDatalogGraphs_0.ctrlLogGraph1.Refresh();
}
}
}
private void frmChartTemplates_Load(object sender, EventArgs e)
{
this.plot1.Items.Clear();
this.plot1.Items.Add("");
this.plot2.Items.Clear();
this.plot2.Items.Add("");
this.plot3.Items.Clear();
this.plot3.Items.Add("");
this.plot4.Items.Clear();
this.plot4.Items.Add("");
this.plot5.Items.Clear();
this.plot5.Items.Add("");
for (int i = 0; i < this.class10_settings_0.int_0; i++)
{
SensorsX sensors = (SensorsX) i;
this.plot1.Items.Add(this.class10_settings_0.method_13(sensors));
this.plot2.Items.Add(this.class10_settings_0.method_13(sensors));
this.plot3.Items.Add(this.class10_settings_0.method_13(sensors));
this.plot4.Items.Add(this.class10_settings_0.method_13(sensors));
this.plot5.Items.Add(this.class10_settings_0.method_13(sensors));
}
this.method_4();
}
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmChartTemplates));
this.tabGraphs = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.pnlGraphSetup = new System.Windows.Forms.Panel();
this.button_0 = new System.Windows.Forms.Button();
this.button_1 = new System.Windows.Forms.Button();
this.button_2 = new System.Windows.Forms.Button();
this.button_3 = new System.Windows.Forms.Button();
this.button_4 = new System.Windows.Forms.Button();
this.plot5 = new System.Windows.Forms.ComboBox();
this.label9 = new System.Windows.Forms.Label();
this.plot4 = new System.Windows.Forms.ComboBox();
this.plot3 = new System.Windows.Forms.ComboBox();
this.plot2 = new System.Windows.Forms.ComboBox();
this.plot1 = new System.Windows.Forms.ComboBox();
this.label8 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.tabPage4 = new System.Windows.Forms.TabPage();
this.colorDialog_0 = new System.Windows.Forms.ColorDialog();
this.label1 = new System.Windows.Forms.Label();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.tabGraphs.SuspendLayout();
this.tabPage1.SuspendLayout();
this.pnlGraphSetup.SuspendLayout();
this.SuspendLayout();
//
// tabGraphs
//
this.tabGraphs.Controls.Add(this.tabPage1);
this.tabGraphs.Location = new System.Drawing.Point(14, 76);
this.tabGraphs.Name = "tabGraphs";
this.tabGraphs.SelectedIndex = 0;
this.tabGraphs.Size = new System.Drawing.Size(253, 180);
this.tabGraphs.TabIndex = 2;
this.tabGraphs.SelectedIndexChanged += new System.EventHandler(this.tabGraphs_SelectedIndexChanged);
//
// tabPage1
//
this.tabPage1.Controls.Add(this.pnlGraphSetup);
this.tabPage1.Location = new System.Drawing.Point(4, 23);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(245, 153);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "Graph 1";
this.tabPage1.UseVisualStyleBackColor = true;
//
// pnlGraphSetup
//
this.pnlGraphSetup.Controls.Add(this.button_0);
this.pnlGraphSetup.Controls.Add(this.button_1);
this.pnlGraphSetup.Controls.Add(this.button_2);
this.pnlGraphSetup.Controls.Add(this.button_3);
this.pnlGraphSetup.Controls.Add(this.button_4);
this.pnlGraphSetup.Controls.Add(this.plot5);
this.pnlGraphSetup.Controls.Add(this.label9);
this.pnlGraphSetup.Controls.Add(this.plot4);
this.pnlGraphSetup.Controls.Add(this.plot3);
this.pnlGraphSetup.Controls.Add(this.plot2);
this.pnlGraphSetup.Controls.Add(this.plot1);
this.pnlGraphSetup.Controls.Add(this.label8);
this.pnlGraphSetup.Controls.Add(this.label7);
this.pnlGraphSetup.Controls.Add(this.label6);
this.pnlGraphSetup.Controls.Add(this.label5);
this.pnlGraphSetup.Location = new System.Drawing.Point(0, 0);
this.pnlGraphSetup.Name = "pnlGraphSetup";
this.pnlGraphSetup.Size = new System.Drawing.Size(244, 152);
this.pnlGraphSetup.TabIndex = 1;
//
// button_0
//
this.button_0.Location = new System.Drawing.Point(210, 122);
this.button_0.Name = "button_0";
this.button_0.Size = new System.Drawing.Size(24, 23);
this.button_0.TabIndex = 20;
this.button_0.UseVisualStyleBackColor = true;
this.button_0.Click += new System.EventHandler(this.button_4_Click);
//
// button_1
//
this.button_1.Location = new System.Drawing.Point(210, 94);
this.button_1.Name = "button_1";
this.button_1.Size = new System.Drawing.Size(24, 23);
this.button_1.TabIndex = 19;
this.button_1.UseVisualStyleBackColor = true;
this.button_1.Click += new System.EventHandler(this.button_4_Click);
//
// button_2
//
this.button_2.Location = new System.Drawing.Point(210, 65);
this.button_2.Name = "button_2";
this.button_2.Size = new System.Drawing.Size(24, 23);
this.button_2.TabIndex = 18;
this.button_2.UseVisualStyleBackColor = true;
this.button_2.Click += new System.EventHandler(this.button_4_Click);
//
// button_3
//
this.button_3.Location = new System.Drawing.Point(210, 36);
this.button_3.Name = "button_3";
this.button_3.Size = new System.Drawing.Size(24, 23);
this.button_3.TabIndex = 17;
this.button_3.UseVisualStyleBackColor = true;
this.button_3.Click += new System.EventHandler(this.button_4_Click);
//
// button_4
//
this.button_4.Location = new System.Drawing.Point(210, 6);
this.button_4.Name = "button_4";
this.button_4.Size = new System.Drawing.Size(24, 23);
this.button_4.TabIndex = 16;
this.button_4.UseVisualStyleBackColor = true;
this.button_4.Click += new System.EventHandler(this.button_4_Click);
//
// plot5
//
this.plot5.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.plot5.FormattingEnabled = true;
this.plot5.Location = new System.Drawing.Point(63, 122);
this.plot5.Name = "plot5";
this.plot5.Size = new System.Drawing.Size(139, 22);
this.plot5.TabIndex = 15;
this.plot5.SelectedIndexChanged += new System.EventHandler(this.plot1_SelectedIndexChanged);
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(6, 126);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(47, 14);
this.label9.TabIndex = 14;
this.label9.Text = "Value5:";
//
// plot4
//
this.plot4.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.plot4.FormattingEnabled = true;
this.plot4.Location = new System.Drawing.Point(63, 94);
this.plot4.Name = "plot4";
this.plot4.Size = new System.Drawing.Size(139, 22);
this.plot4.TabIndex = 8;
this.plot4.SelectedIndexChanged += new System.EventHandler(this.plot1_SelectedIndexChanged);
//
// plot3
//
this.plot3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.plot3.FormattingEnabled = true;
this.plot3.Location = new System.Drawing.Point(63, 65);
this.plot3.Name = "plot3";
this.plot3.Size = new System.Drawing.Size(139, 22);
this.plot3.TabIndex = 7;
this.plot3.SelectedIndexChanged += new System.EventHandler(this.plot1_SelectedIndexChanged);
//
// plot2
//
this.plot2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.plot2.FormattingEnabled = true;
this.plot2.Location = new System.Drawing.Point(63, 36);
this.plot2.Name = "plot2";
this.plot2.Size = new System.Drawing.Size(139, 22);
this.plot2.TabIndex = 6;
this.plot2.SelectedIndexChanged += new System.EventHandler(this.plot1_SelectedIndexChanged);
//
// plot1
//
this.plot1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.plot1.FormattingEnabled = true;
this.plot1.Location = new System.Drawing.Point(63, 6);
this.plot1.Name = "plot1";
this.plot1.Size = new System.Drawing.Size(139, 22);
this.plot1.TabIndex = 5;
this.plot1.SelectedIndexChanged += new System.EventHandler(this.plot1_SelectedIndexChanged);
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(6, 98);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(47, 14);
this.label8.TabIndex = 4;
this.label8.Text = "Value4:";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(6, 69);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(47, 14);
this.label7.TabIndex = 3;
this.label7.Text = "Value3:";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(6, 40);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(47, 14);
this.label6.TabIndex = 2;
this.label6.Text = "Value2:";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(6, 11);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(47, 14);
this.label5.TabIndex = 1;
this.label5.Text = "Value1:";
//
// tabPage2
//
this.tabPage2.Location = new System.Drawing.Point(4, 22);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(243, 203);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "Graph 2";
this.tabPage2.UseVisualStyleBackColor = true;
//
// tabPage3
//
this.tabPage3.Location = new System.Drawing.Point(4, 22);
this.tabPage3.Name = "tabPage3";
this.tabPage3.Size = new System.Drawing.Size(243, 203);
this.tabPage3.TabIndex = 2;
this.tabPage3.Text = "Graph 3";
this.tabPage3.UseVisualStyleBackColor = true;
//
// tabPage4
//
this.tabPage4.Location = new System.Drawing.Point(4, 22);
this.tabPage4.Name = "tabPage4";
this.tabPage4.Size = new System.Drawing.Size(243, 203);
this.tabPage4.TabIndex = 3;
this.tabPage4.Text = "Graph 4";
this.tabPage4.UseVisualStyleBackColor = true;
//
// colorDialog_0
//
this.colorDialog_0.SolidColorOnly = true;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(49, 51);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(107, 14);
this.label1.TabIndex = 2;
this.label1.Text = "Number of Graphs:";
//
// comboBox1
//
this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Items.AddRange(new object[] {
"1",
"2",
"3",
"4"});
this.comboBox1.Location = new System.Drawing.Point(162, 48);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(69, 22);
this.comboBox1.TabIndex = 3;
this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
//
// button1
//
this.button1.Location = new System.Drawing.Point(18, 13);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(108, 23);
this.button1.TabIndex = 4;
this.button1.Text = "Load";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// button2
//
this.button2.Location = new System.Drawing.Point(155, 13);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(108, 23);
this.button2.TabIndex = 5;
this.button2.Text = "Save";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// saveFileDialog1
//
this.saveFileDialog1.DefaultExt = "bmg";
this.saveFileDialog1.Filter = "BMTune Graph|*.bmg";
this.saveFileDialog1.Title = "Save BMTune Graph Settings";
//
// openFileDialog1
//
this.openFileDialog1.DefaultExt = "bmg";
this.openFileDialog1.Filter = "BMTune Graph|*.bmg";
this.openFileDialog1.Title = "Open BMTune Graph Settings";
//
// frmChartTemplates
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(278, 263);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.tabGraphs);
this.Controls.Add(this.comboBox1);
this.Controls.Add(this.label1);
this.Font = new System.Drawing.Font("Lucida Sans", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "frmChartTemplates";
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Graph Settings";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmChartTemplates_FormClosing);
this.Load += new System.EventHandler(this.frmChartTemplates_Load);
this.tabGraphs.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.pnlGraphSetup.ResumeLayout(false);
this.pnlGraphSetup.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
internal void method_0(ref Class18 class18_1, ref Class10_settings class10_1)
{
this.class10_settings_0 = class10_1;
this.class18_0 = class18_1;
this.chartCollection_0 = this.class10_settings_0.chartCollection_0;
this.bool_0 = true;
this.bool_0 = false;
this.chartCollection_0.templateChangedDelegate_0 += new ChartCollection.templateChangedDelegate(this.method_1);
foreach (Control control in base.Controls)
{
float emSize = control.Font.Size * (class18_0.class10_settings_0.scaleRate / 100f);
control.Font = new Font(control.Font.Name, emSize, control.Font.Style, control.Font.Unit);
}
}
private void method_1()
{
this.method_4();
}
private void method_3(int int_1)
{
this.chartCollection_0.getSelectedTemplate().ChartSetup[int_1].plotLinesEnable[0] = this.plot1.SelectedIndex != 0;
if (this.chartCollection_0.getSelectedTemplate().ChartSetup[int_1].plotLinesEnable[0])
{
this.chartCollection_0.getSelectedTemplate().ChartSetup[int_1].Sensors_0[0] = (SensorsX) (this.plot1.SelectedIndex - 1);
this.chartCollection_0.getSelectedTemplate().ChartSetup[int_1].colors[0] = this.button_4.BackColor;
}
this.chartCollection_0.getSelectedTemplate().ChartSetup[int_1].plotLinesEnable[1] = this.plot2.SelectedIndex != 0;
if (this.chartCollection_0.getSelectedTemplate().ChartSetup[int_1].plotLinesEnable[1])
{
this.chartCollection_0.getSelectedTemplate().ChartSetup[int_1].Sensors_0[1] = (SensorsX) (this.plot2.SelectedIndex - 1);
this.chartCollection_0.getSelectedTemplate().ChartSetup[int_1].colors[1] = this.button_3.BackColor;
}
this.chartCollection_0.getSelectedTemplate().ChartSetup[int_1].plotLinesEnable[2] = this.plot3.SelectedIndex != 0;
if (this.chartCollection_0.getSelectedTemplate().ChartSetup[int_1].plotLinesEnable[2])
{
this.chartCollection_0.getSelectedTemplate().ChartSetup[int_1].Sensors_0[2] = (SensorsX) (this.plot3.SelectedIndex - 1);
this.chartCollection_0.getSelectedTemplate().ChartSetup[int_1].colors[2] = this.button_2.BackColor;
}
this.chartCollection_0.getSelectedTemplate().ChartSetup[int_1].plotLinesEnable[3] = this.plot4.SelectedIndex != 0;
if (this.chartCollection_0.getSelectedTemplate().ChartSetup[int_1].plotLinesEnable[3])
{
this.chartCollection_0.getSelectedTemplate().ChartSetup[int_1].Sensors_0[3] = (SensorsX) (this.plot4.SelectedIndex - 1);
this.chartCollection_0.getSelectedTemplate().ChartSetup[int_1].colors[3] = this.button_1.BackColor;
}
this.chartCollection_0.getSelectedTemplate().ChartSetup[int_1].plotLinesEnable[4] = this.plot5.SelectedIndex != 0;
if (this.chartCollection_0.getSelectedTemplate().ChartSetup[int_1].plotLinesEnable[4])
{
this.chartCollection_0.getSelectedTemplate().ChartSetup[int_1].Sensors_0[4] = (SensorsX) (this.plot5.SelectedIndex - 1);
this.chartCollection_0.getSelectedTemplate().ChartSetup[int_1].colors[4] = this.button_0.BackColor;
}
}
private void method_4()
{
LoadTabs(0);
IsLoading = false;
int Index = 0;
if (this.chartCollection_0.getSelectedTemplate().ChartsEnable[1]) Index = 1;
if (this.chartCollection_0.getSelectedTemplate().ChartsEnable[2]) Index = 2;
if (this.chartCollection_0.getSelectedTemplate().ChartsEnable[3]) Index = 3;
this.comboBox1.SelectedIndex = Index;
}
private void LoadTabs(int selectedIndex)
{
this.button_4.BackColor = this.chartCollection_0.getSelectedTemplate().ChartSetup[selectedIndex].colors[0];
this.button_3.BackColor = this.chartCollection_0.getSelectedTemplate().ChartSetup[selectedIndex].colors[1];
this.button_2.BackColor = this.chartCollection_0.getSelectedTemplate().ChartSetup[selectedIndex].colors[2];
this.button_1.BackColor = this.chartCollection_0.getSelectedTemplate().ChartSetup[selectedIndex].colors[3];
this.button_0.BackColor = this.chartCollection_0.getSelectedTemplate().ChartSetup[selectedIndex].colors[4];
if (this.chartCollection_0.getSelectedTemplate().ChartSetup[selectedIndex].plotLinesEnable[0]) this.plot1.SelectedIndex = ((int)this.chartCollection_0.getSelectedTemplate().ChartSetup[selectedIndex].Sensors_0[0]) + 1;
else this.plot1.SelectedIndex = 0;
if (this.chartCollection_0.getSelectedTemplate().ChartSetup[selectedIndex].plotLinesEnable[1]) this.plot2.SelectedIndex = ((int)this.chartCollection_0.getSelectedTemplate().ChartSetup[selectedIndex].Sensors_0[1]) + 1;
else this.plot2.SelectedIndex = 0;
if (this.chartCollection_0.getSelectedTemplate().ChartSetup[selectedIndex].plotLinesEnable[2]) this.plot3.SelectedIndex = ((int)this.chartCollection_0.getSelectedTemplate().ChartSetup[selectedIndex].Sensors_0[2]) + 1;
else this.plot3.SelectedIndex = 0;
if (this.chartCollection_0.getSelectedTemplate().ChartSetup[selectedIndex].plotLinesEnable[3]) this.plot4.SelectedIndex = ((int)this.chartCollection_0.getSelectedTemplate().ChartSetup[selectedIndex].Sensors_0[3]) + 1;
else this.plot4.SelectedIndex = 0;
if (this.chartCollection_0.getSelectedTemplate().ChartSetup[selectedIndex].plotLinesEnable[4]) this.plot5.SelectedIndex = ((int)this.chartCollection_0.getSelectedTemplate().ChartSetup[selectedIndex].Sensors_0[4]) + 1;
else this.plot5.SelectedIndex = 0;
}
private void plot1_SelectedIndexChanged(object sender, EventArgs e)
{
ComboBox[] boxArray = new ComboBox[] { this.plot1, this.plot2, this.plot3, this.plot4, this.plot5 };
for (int i = 0; i < boxArray.Length; i++)
{
if (boxArray[i].SelectedIndex != 0)
{
for (int j = 0; j < boxArray.Length; j++)
{
if ((boxArray[i].SelectedIndex == boxArray[j].SelectedIndex) && (i != j))
{
boxArray[j].SelectedIndex = 0;
}
}
}
if (((boxArray[i].SelectedIndex == 0) && (boxArray[0].SelectedIndex != 0)) && ((i < (boxArray.Length - 1)) && (boxArray[i + 1].SelectedIndex != 0)))
{
boxArray[i].SelectedIndex = boxArray[i + 1].SelectedIndex;
}
}
}
private void tabGraphs_SelectedIndexChanged(object sender, EventArgs e)
{
int selectedIndex = this.tabGraphs.SelectedIndex;
this.tabGraphs.TabPages[this.tabGraphs.SelectedIndex].Controls.Clear();
this.tabGraphs.TabPages[this.tabGraphs.SelectedIndex].Controls.Add(this.pnlGraphSetup);
if (this.int_0 != -1) this.method_3(this.int_0);
LoadTabs(selectedIndex);
this.int_0 = this.tabGraphs.SelectedIndex;
}
private void button2_Click(object sender, EventArgs e)
{
DialogResult result = saveFileDialog1.ShowDialog();
if (result == DialogResult.OK)
{
SaveSet(saveFileDialog1.FileName);
}
}
public void SaveSet(string TPath)
{
try
{
string Line = "";
Line += comboBox1.SelectedIndex + Environment.NewLine;
for (int i = 0; i < (comboBox1.SelectedIndex + 1); i++)
{
if (this.chartCollection_0.getSelectedTemplate().ChartSetup[i].plotLinesEnable[0])
Line += "0#" + i + "#" + this.chartCollection_0.getSelectedTemplate().ChartSetup[i].colors[0].ToArgb().ToString() + "#" + ((int)this.chartCollection_0.getSelectedTemplate().ChartSetup[i].Sensors_0[0]) + Environment.NewLine;
else Line += "0#" + i + "#Disabled" + Environment.NewLine;
if (this.chartCollection_0.getSelectedTemplate().ChartSetup[i].plotLinesEnable[1])
Line += "1#" + i + "#" + this.chartCollection_0.getSelectedTemplate().ChartSetup[i].colors[1].ToArgb().ToString() + "#" + ((int)this.chartCollection_0.getSelectedTemplate().ChartSetup[i].Sensors_0[1]) + Environment.NewLine;
else Line += "1#" + i + "#Disabled" + Environment.NewLine;
if (this.chartCollection_0.getSelectedTemplate().ChartSetup[i].plotLinesEnable[2])
Line += "2#" + i + "#" + this.chartCollection_0.getSelectedTemplate().ChartSetup[i].colors[2].ToArgb().ToString() + "#" + ((int)this.chartCollection_0.getSelectedTemplate().ChartSetup[i].Sensors_0[2]) + Environment.NewLine;
else Line += "2#" + i + "#Disabled" + Environment.NewLine;
if (this.chartCollection_0.getSelectedTemplate().ChartSetup[i].plotLinesEnable[3])
Line += "3#" + i + "#" + this.chartCollection_0.getSelectedTemplate().ChartSetup[i].colors[3].ToArgb().ToString() + "#" + ((int)this.chartCollection_0.getSelectedTemplate().ChartSetup[i].Sensors_0[3]) + Environment.NewLine;
else Line += "3#" + i + "#Disabled" + Environment.NewLine;
if (this.chartCollection_0.getSelectedTemplate().ChartSetup[i].plotLinesEnable[4])
Line += "4#" + i + "#" + this.chartCollection_0.getSelectedTemplate().ChartSetup[i].colors[4].ToArgb().ToString() + "#" + ((int)this.chartCollection_0.getSelectedTemplate().ChartSetup[i].Sensors_0[4]) + Environment.NewLine;
else Line += "4#" + i + "#Disabled" + Environment.NewLine;
}
StreamWriter writer = new StreamWriter(TPath, false);
writer.Write(Line);
writer.Close();
writer.Dispose();
writer = null;
}
catch (Exception Message)
{
MessageBox.Show(Form.ActiveForm, "Unable to save graph settings!\n" + Message, "BMTune", MessageBoxButtons.OK, MessageBoxIcon.Hand);
}
}
public void LoadSet(string TPath)
{
try
{
string[] AllLines = File.ReadAllLines(TPath);
comboBox1.SelectedIndex = int.Parse(AllLines[0]);
for (int i = 0; i < AllLines.Length - 2; i++)
{
string[] SeparetedLines = AllLines[i + 1].Split('#');
if (SeparetedLines[2] != "Disabled")
{
this.chartCollection_0.getSelectedTemplate().ChartSetup[int.Parse(SeparetedLines[1])].plotLinesEnable[int.Parse(SeparetedLines[0])] = true;
this.chartCollection_0.getSelectedTemplate().ChartSetup[int.Parse(SeparetedLines[1])].colors[int.Parse(SeparetedLines[0])] = Color.FromArgb((Int32)Convert.ToInt32(SeparetedLines[2]));
this.chartCollection_0.getSelectedTemplate().ChartSetup[int.Parse(SeparetedLines[1])].Sensors_0[int.Parse(SeparetedLines[0])] = (SensorsX)int.Parse(SeparetedLines[3]);
}
else
{
this.chartCollection_0.getSelectedTemplate().ChartSetup[int.Parse(SeparetedLines[1])].plotLinesEnable[int.Parse(SeparetedLines[0])] = false;
this.chartCollection_0.getSelectedTemplate().ChartSetup[int.Parse(SeparetedLines[1])].colors[int.Parse(SeparetedLines[0])] = Color.Transparent;
this.chartCollection_0.getSelectedTemplate().ChartSetup[int.Parse(SeparetedLines[1])].Sensors_0[int.Parse(SeparetedLines[0])] = 0;
}
}
LoadTabs(this.tabGraphs.SelectedIndex);
}
catch (Exception Message)
{
MessageBox.Show(Form.ActiveForm, "Unable to open graph settings!\n" + Message, "BMTune", MessageBoxButtons.OK, MessageBoxIcon.Hand);
}
}
private void button1_Click(object sender, EventArgs e)
{
DialogResult result = openFileDialog1.ShowDialog();
if (result == DialogResult.OK) LoadSet(openFileDialog1.FileName);
}
}

1796
frmChartTemplates.resx Normal file

File diff suppressed because it is too large Load Diff

388
frmConsole.cs Normal file
View File

@ -0,0 +1,388 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
internal class frmConsole : Form
{
private Class18 class18_0;
private FrmMain frmMain_0;
private IContainer icontainer_0;
private IContainer components;
public Button button1;
private Label label1;
private Label label2;
private Label label3;
private Label label4;
private Label label5;
private Label label6;
private Label label7;
private Panel panel1;
private Panel panel2;
private Panel panel3;
private Label label8;
private Label label9;
private Label label10;
private ListBox cmd_List;
private TextBox txt_Logs;
private Label label11;
private Label label12;
private TextBox textBox1;
internal frmConsole(ref FrmMain frmMain_1, ref Class18 class18_1)
{
this.InitializeComponent();
frmMain_0 = frmMain_1;
class18_0 = class18_1;
foreach (Control control in base.Controls)
{
float emSize = control.Font.Size * (class18_0.class10_settings_0.scaleRate / 100f);
control.Font = new Font(control.Font.Name, emSize, control.Font.Style, control.Font.Unit);
}
}
protected override void Dispose(bool disposing)
{
if (disposing && (this.icontainer_0 != null))
{
this.icontainer_0.Dispose();
}
base.Dispose(disposing);
}
private void frmDebug_FormClosed(object sender, FormClosedEventArgs e)
{
this.frmMain_0.frmConsole_0.Dispose();
this.frmMain_0.frmConsole_0 = null;
}
private void frmDebug_Load(object sender, EventArgs e)
{
}
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmConsole));
this.button1 = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.panel1 = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel();
this.panel3 = new System.Windows.Forms.Panel();
this.label8 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.cmd_List = new System.Windows.Forms.ListBox();
this.txt_Logs = new System.Windows.Forms.TextBox();
this.label11 = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.panel3.SuspendLayout();
this.SuspendLayout();
//
// button1
//
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button1.ForeColor = System.Drawing.Color.Red;
this.button1.Location = new System.Drawing.Point(226, 199);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(73, 23);
this.button1.TabIndex = 0;
this.button1.Text = "Apply";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(1, 200);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(223, 20);
this.textBox1.TabIndex = 2;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(75, 6);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(152, 24);
this.label1.TabIndex = 3;
this.label1.Text = "Commands List";
//
// label2
//
this.label2.AutoSize = true;
this.label2.ForeColor = System.Drawing.Color.Blue;
this.label2.Location = new System.Drawing.Point(7, 6);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(109, 13);
this.label2.TabIndex = 4;
this.label2.Text = "Rom_Location=Value";
//
// label3
//
this.label3.AutoSize = true;
this.label3.ForeColor = System.Drawing.Color.Red;
this.label3.Location = new System.Drawing.Point(79, 121);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(141, 13);
this.label3.TabIndex = 5;
this.label3.Text = "**Add 0x for values in HEX**";
//
// label4
//
this.label4.AutoSize = true;
this.label4.ForeColor = System.Drawing.Color.Green;
this.label4.Location = new System.Drawing.Point(113, 6);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(71, 13);
this.label4.TabIndex = 6;
this.label4.Text = "0x5F26=0xFF";
//
// label5
//
this.label5.AutoSize = true;
this.label5.ForeColor = System.Drawing.Color.Green;
this.label5.Location = new System.Drawing.Point(213, 6);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(49, 13);
this.label5.TabIndex = 7;
this.label5.Text = "16768=0";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(13, 6);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(55, 13);
this.label6.TabIndex = 8;
this.label6.Text = "Exemples:";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(7, 6);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(75, 13);
this.label7.TabIndex = 9;
this.label7.Text = "Set Rom Byte:";
//
// panel1
//
this.panel1.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.panel1.Controls.Add(this.label6);
this.panel1.Controls.Add(this.label4);
this.panel1.Controls.Add(this.label5);
this.panel1.Location = new System.Drawing.Point(2, 140);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(297, 25);
this.panel1.TabIndex = 10;
//
// panel2
//
this.panel2.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.panel2.Controls.Add(this.label11);
this.panel2.Controls.Add(this.label7);
this.panel2.Location = new System.Drawing.Point(2, 63);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(149, 55);
this.panel2.TabIndex = 11;
//
// panel3
//
this.panel3.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.panel3.Controls.Add(this.label12);
this.panel3.Controls.Add(this.label2);
this.panel3.Location = new System.Drawing.Point(150, 63);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(149, 55);
this.panel3.TabIndex = 12;
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(30, 44);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(87, 13);
this.label8.TabIndex = 13;
this.label8.Text = "Cmd Description:";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(190, 44);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(67, 13);
this.label9.TabIndex = 14;
this.label9.Text = "Cmd Writing:";
//
// label10
//
this.label10.AutoSize = true;
this.label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label10.Location = new System.Drawing.Point(105, 170);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(87, 24);
this.label10.TabIndex = 15;
this.label10.Text = "Console";
//
// cmd_List
//
this.cmd_List.FormattingEnabled = true;
this.cmd_List.Location = new System.Drawing.Point(1, 226);
this.cmd_List.Name = "cmd_List";
this.cmd_List.Size = new System.Drawing.Size(298, 108);
this.cmd_List.TabIndex = 16;
this.cmd_List.SelectedIndexChanged += new System.EventHandler(this.Cmd_List_SelectedIndexChanged);
//
// txt_Logs
//
this.txt_Logs.Location = new System.Drawing.Point(1, 340);
this.txt_Logs.Multiline = true;
this.txt_Logs.Name = "txt_Logs";
this.txt_Logs.ReadOnly = true;
this.txt_Logs.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.txt_Logs.Size = new System.Drawing.Size(298, 163);
this.txt_Logs.TabIndex = 17;
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(7, 22);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(76, 13);
this.label11.TabIndex = 10;
this.label11.Text = "Get Rom Byte:";
//
// label12
//
this.label12.AutoSize = true;
this.label12.ForeColor = System.Drawing.Color.Blue;
this.label12.Location = new System.Drawing.Point(7, 22);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(76, 13);
this.label12.TabIndex = 5;
this.label12.Text = "Rom_Location";
//
// frmConsole
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(300, 506);
this.Controls.Add(this.txt_Logs);
this.Controls.Add(this.cmd_List);
this.Controls.Add(this.label10);
this.Controls.Add(this.label9);
this.Controls.Add(this.label8);
this.Controls.Add(this.panel3);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.Controls.Add(this.label3);
this.Controls.Add(this.label1);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.button1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.Name = "frmConsole";
this.Text = "Developper Console";
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.frmDebug_FormClosed);
this.Load += new System.EventHandler(this.frmDebug_Load);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
this.panel3.ResumeLayout(false);
this.panel3.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
private void button1_Click(object sender, EventArgs e)
{
string CMDString = textBox1.Text;
textBox1.Text = "";
cmd_List.Items.Add(CMDString);
if (CMDString.Length > 0)
{
//set bytes
if (CMDString.Contains("="))
{
string[] CMDS = CMDString.Split('=');
if (CMDS.Length == 2)
{
if (CMDS[0] != "" && CMDS[1] != "")
{
try
{
long Location = 0;
int ByteN = 0;
if (CMDS[0].Contains("0x") || CMDS[0].Contains("0X"))
{
CMDS[0] = CMDS[0].Substring(2);
Location = long.Parse(CMDS[0], System.Globalization.NumberStyles.HexNumber);
}
else Location = long.Parse(CMDS[0]);
if (CMDS[1].Contains("0x") || CMDS[0].Contains("0X"))
{
CMDS[1] = CMDS[1].Substring(2);
ByteN = int.Parse(CMDS[1], System.Globalization.NumberStyles.HexNumber);
}
else ByteN = int.Parse(CMDS[1]);
this.class18_0.SetByteAt(Location, (byte) ByteN);
this.txt_Logs.AppendText("SetByte: 0x" + Location.ToString("X4") + "=" + "0x" + ByteN.ToString("X2") + " " + Location + "=" + ((int)ByteN).ToString() + Environment.NewLine);
}
catch { }
}
}
}
else
{
//get byte
if (CMDString != "")
{
try
{
long Location = 0;
int ByteN = 0;
if (CMDString.Contains("0x") || CMDString.Contains("0X"))
{
CMDString = CMDString.Substring(2);
Location = long.Parse(CMDString, System.Globalization.NumberStyles.HexNumber);
}
else Location = long.Parse(CMDString);
this.class18_0.GetByteAt(Location);
this.txt_Logs.AppendText("GetByte: 0x" + Location.ToString("X4") + "=" + "0x" + this.class18_0.GetByteAt(Location).ToString("X2") + " " + Location + "=" + ((int) this.class18_0.GetByteAt(Location)).ToString() + Environment.NewLine);
}
catch { }
}
}
}
}
private void Cmd_List_SelectedIndexChanged(object sender, EventArgs e)
{
if (cmd_List.SelectedIndex >= 0)
{
textBox1.Text = cmd_List.Items[cmd_List.SelectedIndex].ToString();
}
}
}

1787
frmConsole.resx Normal file

File diff suppressed because it is too large Load Diff

1874
frmConvert.cs Normal file

File diff suppressed because it is too large Load Diff

1793
frmConvert.resx Normal file

File diff suppressed because it is too large Load Diff

185
frmCopyMaps.cs Normal file
View File

@ -0,0 +1,185 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
internal class frmCopyMaps : Form
{
private Button btnOk;
private Button button2;
private CheckBox chkLoad;
private CheckBox chkRpm;
private Class18 class18_0;
private IContainer icontainer_0;
private Label label1;
private ListBox listBox1;
private int int_0;
internal frmCopyMaps()
{
this.InitializeComponent();
}
private void btnOk_Click(object sender, EventArgs e)
{
this.class18_0.method_155("Copy Maps Settings");
if (this.int_0 == 1)
{
this.class18_0.method_266(this.chkLoad.Checked, this.chkRpm.Checked);
}
else
{
this.class18_0.method_267(this.chkLoad.Checked, this.chkRpm.Checked);
}
}
protected override void Dispose(bool disposing)
{
if (disposing && (this.icontainer_0 != null))
{
this.icontainer_0.Dispose();
}
base.Dispose(disposing);
}
private void frmCopyMaps_Load(object sender, EventArgs e)
{
if (!this.class18_0.method_39()) this.listBox1.SelectedIndex = 0;
else this.listBox1.SelectedIndex = 1;
this.int_0 = this.listBox1.SelectedIndex + 1;
try
{
if (base.Tag != null)
{
if (base.Tag.ToString() != "")
{
if (int.Parse(base.Tag.ToString()) > 0)
{
this.int_0 = int.Parse(base.Tag.ToString());
if (this.int_0 == 1) this.listBox1.SelectedIndex = 0;
else this.listBox1.SelectedIndex = 1;
}
}
}
}
catch { }
}
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmCopyMaps));
this.chkLoad = new System.Windows.Forms.CheckBox();
this.chkRpm = new System.Windows.Forms.CheckBox();
this.btnOk = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.listBox1 = new System.Windows.Forms.ListBox();
this.SuspendLayout();
//
// chkLoad
//
this.chkLoad.AutoSize = true;
this.chkLoad.Location = new System.Drawing.Point(36, 73);
this.chkLoad.Name = "chkLoad";
this.chkLoad.Size = new System.Drawing.Size(84, 18);
this.chkLoad.TabIndex = 0;
this.chkLoad.Text = "Map Scalar";
this.chkLoad.UseVisualStyleBackColor = true;
//
// chkRpm
//
this.chkRpm.AutoSize = true;
this.chkRpm.Location = new System.Drawing.Point(36, 98);
this.chkRpm.Name = "chkRpm";
this.chkRpm.Size = new System.Drawing.Size(84, 18);
this.chkRpm.TabIndex = 1;
this.chkRpm.Text = "RPM Scalar";
this.chkRpm.UseVisualStyleBackColor = true;
//
// btnOk
//
this.btnOk.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btnOk.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOk.Location = new System.Drawing.Point(24, 127);
this.btnOk.Name = "btnOk";
this.btnOk.Size = new System.Drawing.Size(112, 25);
this.btnOk.TabIndex = 2;
this.btnOk.Text = "Copy";
this.btnOk.UseVisualStyleBackColor = true;
this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
//
// button2
//
this.button2.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button2.Location = new System.Drawing.Point(24, 158);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(112, 25);
this.button2.TabIndex = 3;
this.button2.Text = "Cancel";
this.button2.UseVisualStyleBackColor = true;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(14, 10);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(56, 14);
this.label1.TabIndex = 4;
this.label1.Text = "From/To:";
//
// listBox1
//
this.listBox1.FormattingEnabled = true;
this.listBox1.ItemHeight = 14;
this.listBox1.Items.AddRange(new object[] {
"Primary to Secondary",
"Secondary to Primary"});
this.listBox1.Location = new System.Drawing.Point(15, 29);
this.listBox1.Name = "listBox1";
this.listBox1.Size = new System.Drawing.Size(143, 32);
this.listBox1.TabIndex = 5;
this.listBox1.SelectedIndexChanged += new System.EventHandler(this.listBox1_SelectedIndexChanged);
//
// frmCopyMaps
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(170, 195);
this.Controls.Add(this.listBox1);
this.Controls.Add(this.label1);
this.Controls.Add(this.button2);
this.Controls.Add(this.btnOk);
this.Controls.Add(this.chkRpm);
this.Controls.Add(this.chkLoad);
this.Font = new System.Drawing.Font("Lucida Sans", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "frmCopyMaps";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Copy Primay / Secondary";
this.Load += new System.EventHandler(this.frmCopyMaps_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
internal void method_0(ref Class18 class18_1)
{
this.class18_0 = class18_1;
foreach (Control control in base.Controls)
{
float emSize = control.Font.Size * (class18_0.class10_settings_0.scaleRate / 100f);
control.Font = new Font(control.Font.Name, emSize, control.Font.Style, control.Font.Unit);
}
}
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
this.int_0 = this.listBox1.SelectedIndex + 1;
}
}

1787
frmCopyMaps.resx Normal file

File diff suppressed because it is too large Load Diff

223
frmCopyright.cs Normal file
View File

@ -0,0 +1,223 @@
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Reflection;
using System.Windows.Forms;
internal class frmCopyright : Form
{
private IContainer icontainer_0;
private Label labelProductName;
private LinkLabel linkBMTune;
private LinkLabel linkForum;
private Button okButton;
private Label label1;
private Button button1;
private TextBox textBoxDescription;
private FrmMain FrmMain_0;
private LinkLabel linkLabel1;
private bool UsedAgree = false;
public frmCopyright(ref FrmMain FrmMain_1)
{
this.InitializeComponent();
FrmMain_0 = FrmMain_1;
/*foreach (Control control in base.Controls)
{
float emSize = control.Font.Size * (class18_0.class10_settings_0.scaleRate / 100f);
control.Font = new Font(control.Font.Name, emSize, control.Font.Style, control.Font.Unit);
}*/
}
protected override void Dispose(bool disposing)
{
if (disposing && (this.icontainer_0 != null))
{
this.icontainer_0.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmCopyright));
this.labelProductName = new System.Windows.Forms.Label();
this.linkBMTune = new System.Windows.Forms.LinkLabel();
this.okButton = new System.Windows.Forms.Button();
this.textBoxDescription = new System.Windows.Forms.TextBox();
this.linkForum = new System.Windows.Forms.LinkLabel();
this.label1 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
this.SuspendLayout();
//
// labelProductName
//
this.labelProductName.AutoSize = true;
this.labelProductName.Font = new System.Drawing.Font("Lucida Sans", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelProductName.Location = new System.Drawing.Point(73, 10);
this.labelProductName.Margin = new System.Windows.Forms.Padding(7, 0, 3, 0);
this.labelProductName.MaximumSize = new System.Drawing.Size(0, 18);
this.labelProductName.Name = "labelProductName";
this.labelProductName.Size = new System.Drawing.Size(437, 15);
this.labelProductName.TabIndex = 19;
this.labelProductName.Text = "END-USER LICENSE AGREEMENT FOR BMTUNE TUNING SOFTWARE";
this.labelProductName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// linkBMTune
//
this.linkBMTune.AutoSize = true;
this.linkBMTune.Location = new System.Drawing.Point(150, 562);
this.linkBMTune.Name = "linkBMTune";
this.linkBMTune.Size = new System.Drawing.Size(50, 14);
this.linkBMTune.TabIndex = 29;
this.linkBMTune.TabStop = true;
this.linkBMTune.Text = "Website";
this.linkBMTune.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkBMTune_LinkClicked);
//
// okButton
//
this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.okButton.AutoSize = true;
this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
this.okButton.Location = new System.Drawing.Point(460, 557);
this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(87, 25);
this.okButton.TabIndex = 24;
this.okButton.Text = "&Agree";
this.okButton.Click += new System.EventHandler(this.okButton_Click);
//
// textBoxDescription
//
this.textBoxDescription.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textBoxDescription.Location = new System.Drawing.Point(10, 85);
this.textBoxDescription.Margin = new System.Windows.Forms.Padding(7, 3, 3, 3);
this.textBoxDescription.Multiline = true;
this.textBoxDescription.Name = "textBoxDescription";
this.textBoxDescription.ReadOnly = true;
this.textBoxDescription.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.textBoxDescription.Size = new System.Drawing.Size(573, 466);
this.textBoxDescription.TabIndex = 23;
this.textBoxDescription.TabStop = false;
this.textBoxDescription.Text = resources.GetString("textBoxDescription.Text");
//
// linkForum
//
this.linkForum.AutoSize = true;
this.linkForum.Location = new System.Drawing.Point(226, 562);
this.linkForum.Name = "linkForum";
this.linkForum.Size = new System.Drawing.Size(89, 14);
this.linkForum.TabIndex = 30;
this.linkForum.TabStop = true;
this.linkForum.Text = "Facebook Page";
this.linkForum.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkForum_LinkClicked);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Lucida Sans", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.ForeColor = System.Drawing.Color.Red;
this.label1.Location = new System.Drawing.Point(74, 41);
this.label1.Margin = new System.Windows.Forms.Padding(7, 0, 3, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(436, 36);
this.label1.TabIndex = 31;
this.label1.Text = "* IMPORTANT *\r\nPLEASE READ THE TERMS AND CONDITIONS OF THIS LICENSE AGREEMENT\r\nCA" +
"REFULLY BEFORE CONTINUING WITH THIS PROGRAM";
this.label1.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// button1
//
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.button1.AutoSize = true;
this.button1.DialogResult = System.Windows.Forms.DialogResult.OK;
this.button1.ForeColor = System.Drawing.Color.Red;
this.button1.Location = new System.Drawing.Point(40, 557);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(87, 25);
this.button1.TabIndex = 32;
this.button1.Text = "&Disagree";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// linkLabel1
//
this.linkLabel1.AutoSize = true;
this.linkLabel1.Location = new System.Drawing.Point(336, 562);
this.linkLabel1.Name = "linkLabel1";
this.linkLabel1.Size = new System.Drawing.Size(96, 14);
this.linkLabel1.TabIndex = 33;
this.linkLabel1.TabStop = true;
this.linkLabel1.Text = "Facebook Group";
this.linkLabel1.Visible = false;
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
//
// frmCopyright
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(594, 590);
this.Controls.Add(this.linkLabel1);
this.Controls.Add(this.button1);
this.Controls.Add(this.label1);
this.Controls.Add(this.textBoxDescription);
this.Controls.Add(this.labelProductName);
this.Controls.Add(this.linkBMTune);
this.Controls.Add(this.okButton);
this.Controls.Add(this.linkForum);
this.Font = new System.Drawing.Font("Lucida Sans", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "frmCopyright";
this.Padding = new System.Windows.Forms.Padding(10);
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "License Agreement";
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.frmCopyright_FormClosed);
this.Load += new System.EventHandler(this.frmAboutBox_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
private void linkBMTune_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
Process.Start("http://www.bmtune.com/");
}
private void linkForum_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
Process.Start("https://www.facebook.com/BMTuneSoftware/");
}
private void frmAboutBox_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
Environment.Exit(0);
}
private void frmCopyright_FormClosed(object sender, FormClosedEventArgs e)
{
if (!UsedAgree) Environment.Exit(0);
}
private void okButton_Click(object sender, EventArgs e)
{
UsedAgree = true;
}
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
Process.Start("https://www.facebook.com/groups/BMTune/");
}
}

1848
frmCopyright.resx Normal file

File diff suppressed because it is too large Load Diff

131
frmDataGrid.cs Normal file
View File

@ -0,0 +1,131 @@
using Data;
//using PropertiesRes;
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
internal class frmDataGrid : Form
{
private Class10_settings class10_settings_0;
private Class17 class17_0;
public CtrlSensorGrid ctrlSensorGrid1;
private FrmMain frmMain_0;
private IContainer icontainer_0;
private IContainer components;
public bool loading = true;
internal frmDataGrid()
{
this.InitializeComponent();
}
protected override void Dispose(bool disposing)
{
if (disposing && (this.icontainer_0 != null))
{
this.icontainer_0.Dispose();
}
base.Dispose(disposing);
}
private void frmDataGrid_FormClosed(object sender, FormClosedEventArgs e)
{
if (this.class10_settings_0.WindowedMode) this.class10_settings_0.logGrid_Location = base.Location;
this.ctrlSensorGrid1.method_0();
this.frmMain_0.frmDataGrid_0.Dispose();
this.frmMain_0.frmDataGrid_0 = null;
base.Dispose();
}
private void frmDataGrid_Load(object sender, EventArgs e)
{
if (this.class10_settings_0 != null)
{
if (this.class10_settings_0.WindowedMode)
{
this.FormBorderStyle = FormBorderStyle.Sizable;
this.Dock = DockStyle.None;
base.Location = this.class10_settings_0.logGrid_Location;
base.Size = this.class10_settings_0.logGrid_Size;
}
else
{
this.FormBorderStyle = FormBorderStyle.None;
this.Dock = DockStyle.Fill;
}
}
loading = false;
}
private void frmDataGrid_Resize(object sender, EventArgs e)
{
if (this.class10_settings_0 != null)
{
if (this.class10_settings_0.WindowedMode && !loading)
{
if (base.WindowState == FormWindowState.Normal)
{
this.class10_settings_0.logGrid_Size = base.Size;
}
this.class10_settings_0.logGrid_Location = base.Location;
}
}
}
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmDataGrid));
this.ctrlSensorGrid1 = new CtrlSensorGrid();
this.SuspendLayout();
//
// ctrlSensorGrid1
//
this.ctrlSensorGrid1.Dock = System.Windows.Forms.DockStyle.Fill;
this.ctrlSensorGrid1.Font = new System.Drawing.Font("Lucida Sans", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.ctrlSensorGrid1.Location = new System.Drawing.Point(0, 0);
this.ctrlSensorGrid1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.ctrlSensorGrid1.Name = "ctrlSensorGrid1";
this.ctrlSensorGrid1.Size = new System.Drawing.Size(185, 464);
this.ctrlSensorGrid1.TabIndex = 0;
//
// frmDataGrid
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 11F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(185, 464);
this.Controls.Add(this.ctrlSensorGrid1);
this.DoubleBuffered = true;
this.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.Name = "frmDataGrid";
this.Text = "Data";
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.frmDataGrid_FormClosed);
this.Load += new System.EventHandler(this.frmDataGrid_Load);
this.Resize += new System.EventHandler(this.frmDataGrid_Resize);
this.ResumeLayout(false);
}
internal void method_0(ref Class18 class18_0, ref Class10_settings class10_1, ref Class17 class17_1, ref FrmMain frmMain_1)
{
this.frmMain_0 = frmMain_1;
this.class10_settings_0 = class10_1;
this.class17_0 = class17_1;
this.ctrlSensorGrid1.method_1(ref class18_0, ref class10_1, ref class17_1);
foreach (Control control in base.Controls)
{
float emSize = control.Font.Size * (class18_0.class10_settings_0.scaleRate / 100f);
control.Font = new Font(control.Font.Name, emSize, control.Font.Style, control.Font.Unit);
}
}
public void method_2()
{
this.ctrlSensorGrid1.method_4();
}
}

1787
frmDataGrid.resx Normal file

File diff suppressed because it is too large Load Diff

560
frmDatalogGraphs.cs Normal file
View File

@ -0,0 +1,560 @@
using Controls;
using Data;
//using PropertiesRes;
using System;
using System.ComponentModel;
using System.Drawing;
using System.Runtime.CompilerServices;
using System.Windows.Forms;
internal class frmDatalogGraphs : Form
{
private bool bool_0 = true;
private bool bool_1;
private Class10_settings class10_settings_0;
private Class17 class17_0;
private Class18 class18_0;
private ContextMenuStrip contextMenuStrip;
public ctrlLogGraph ctrlLogGraph1;
private ToolStripMenuItem editTemplatesToolStripMenuItem;
private frmDatalogGraphs frmDatalogGraphs_0;
private FrmMain frmMain_0;
private HScrollBar hScrollBar;
private IContainer icontainer_0;
private ToolStripButton toolEditTemplate;
private ToolStrip toolStrip1;
private ToolStripSeparator toolStripSeparator1;
private ToolStripButton toolZoomIn;
private ToolStripButton toolZoomOut;
private ToolStripButton toolZoomFull;
private Panel panel1;
private Panel panel2;
private IContainer components;
private ToolStripSeparator toolStripSeparator2;
private ToolStripDropDownButton toolStripDropDownButton1;
private ToolStripButton toolStripButton1;
private ToolStripSeparator toolStripSeparator4;
private ToolStripMenuItem maxDataSizeToolStripMenuItem;
private ToolStripTextBox toolStripTextBox2;
public bool loading = true;
internal frmDatalogGraphs()
{
this.InitializeComponent();
this.frmDatalogGraphs_0 = this;
base.HandleDestroyed += new EventHandler(this.frmDatalogGraphs_HandleDestroyed);
this.ctrlLogGraph1.Width = base.Width - 8;
this.ctrlLogGraph1.Height = base.Height - 0x41;
this.hScrollBar.Visible = false;
}
protected override void Dispose(bool disposing)
{
if (disposing && (this.icontainer_0 != null))
{
this.icontainer_0.Dispose();
}
base.Dispose(disposing);
}
private void frmDatalogGraphs_FormClosed(object sender, FormClosedEventArgs e)
{
this.frmMain_0.frmDatalogGraphs_0.Dispose();
this.frmMain_0.frmDatalogGraphs_0 = null;
if (this.class17_0 != null)
{
this.class17_0.delegate53_0 -= new Class17.Delegate53(this.method_9);
this.class17_0 = null;
}
if (this.ctrlLogGraph1 != null)
{
this.ctrlLogGraph1.Dispose();
this.ctrlLogGraph1 = null;
}
}
private void frmDatalogGraphs_FormClosing(object sender, FormClosingEventArgs e)
{
if (this.ctrlLogGraph1 != null)
{
this.ctrlLogGraph1.Close();
this.ctrlLogGraph1.Dispose();
this.ctrlLogGraph1 = null;
}
if (this.class10_settings_0.WindowedMode) this.class18_0.class10_settings_0.logGraphs_Location = base.Location;
}
private void frmDatalogGraphs_HandleDestroyed(object sender, EventArgs e)
{
this.bool_0 = false;
}
private void frmDatalogGraphs_Load(object sender, EventArgs e)
{
if (this.class10_settings_0 != null)
{
if (this.class10_settings_0.WindowedMode)
{
this.FormBorderStyle = FormBorderStyle.Sizable;
this.Dock = DockStyle.None;
base.Location = this.class18_0.class10_settings_0.logGraphs_Location;
base.Size = this.class18_0.class10_settings_0.logGraphs_Size;
}
else
{
this.FormBorderStyle = FormBorderStyle.None;
this.Dock = DockStyle.Fill;
}
}
loading = false;
if (this.class17_0 != null)
{
if (this.class17_0.method_63_HasLogsFileOpen())
{
this.hScrollBar.Minimum = 0;
this.hScrollBar.Maximum = (int)this.class17_0.method_65();
this.hScrollBar.LargeChange = (int)this.class17_0.method_65();
this.ctrlLogGraph1.Refresh();
}
this.ctrlLogGraph1.Focus();
this.toolZoomFull.Enabled = this.class17_0.method_63_HasLogsFileOpen();
this.toolZoomIn.Enabled = this.class17_0.method_63_HasLogsFileOpen();
this.toolZoomOut.Enabled = this.class17_0.method_63_HasLogsFileOpen();
}
}
private void frmDatalogGraphs_Move(object sender, EventArgs e)
{
}
private void frmDatalogGraphs_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
{
}
private void frmDatalogGraphs_Resize(object sender, EventArgs e)
{
if (this.class10_settings_0 != null)
{
if (this.class10_settings_0.WindowedMode && !loading)
{
if (base.WindowState == FormWindowState.Normal)
{
this.class18_0.class10_settings_0.logGraphs_Size = base.Size;
}
this.class18_0.class10_settings_0.logGraphs_Location = base.Location;
}
}
}
private void hScrollBar_KeyDown(object sender, KeyEventArgs e)
{
if ((e.Modifiers == Keys.Control) || (e.Modifiers == Keys.ControlKey))
{
this.ctrlLogGraph1.Focus();
}
}
private void hScrollBar_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
{
}
private void hScrollBar_Scroll(object sender, ScrollEventArgs e)
{
if ((e.OldValue != e.NewValue) && this.class17_0.method_63_HasLogsFileOpen())
{
this.ctrlLogGraph1.SetPlotStartEnd(e.NewValue, e.NewValue + this.hScrollBar.LargeChange);
this.ctrlLogGraph1.Refresh();
}
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmDatalogGraphs));
this.hScrollBar = new System.Windows.Forms.HScrollBar();
this.contextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
this.editTemplatesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.toolEditTemplate = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripDropDownButton1 = new System.Windows.Forms.ToolStripDropDownButton();
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
this.maxDataSizeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripTextBox2 = new System.Windows.Forms.ToolStripTextBox();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.toolZoomIn = new System.Windows.Forms.ToolStripButton();
this.toolZoomOut = new System.Windows.Forms.ToolStripButton();
this.toolZoomFull = new System.Windows.Forms.ToolStripButton();
this.panel1 = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel();
this.ctrlLogGraph1 = new Controls.ctrlLogGraph();
this.contextMenuStrip.SuspendLayout();
this.toolStrip1.SuspendLayout();
this.SuspendLayout();
//
// hScrollBar
//
this.hScrollBar.CausesValidation = false;
this.hScrollBar.Dock = System.Windows.Forms.DockStyle.Bottom;
this.hScrollBar.LargeChange = 100;
this.hScrollBar.Location = new System.Drawing.Point(0, 416);
this.hScrollBar.Maximum = 1000;
this.hScrollBar.Name = "hScrollBar";
this.hScrollBar.Size = new System.Drawing.Size(835, 16);
this.hScrollBar.SmallChange = 100;
this.hScrollBar.TabIndex = 1;
this.hScrollBar.Scroll += new System.Windows.Forms.ScrollEventHandler(this.hScrollBar_Scroll);
this.hScrollBar.KeyUp += new System.Windows.Forms.KeyEventHandler(this.hScrollBar_KeyDown);
this.hScrollBar.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.hScrollBar_PreviewKeyDown);
//
// contextMenuStrip
//
this.contextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.editTemplatesToolStripMenuItem});
this.contextMenuStrip.Name = "contextMenuStrip";
this.contextMenuStrip.Size = new System.Drawing.Size(130, 26);
//
// editTemplatesToolStripMenuItem
//
this.editTemplatesToolStripMenuItem.Name = "editTemplatesToolStripMenuItem";
this.editTemplatesToolStripMenuItem.Size = new System.Drawing.Size(129, 22);
this.editTemplatesToolStripMenuItem.Text = "Edit Graph";
this.editTemplatesToolStripMenuItem.Click += new System.EventHandler(this.toolEditTemplate_Click);
//
// toolStrip1
//
this.toolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolEditTemplate,
this.toolStripSeparator1,
this.toolStripDropDownButton1,
this.toolStripSeparator2,
this.toolZoomIn,
this.toolZoomOut,
this.toolZoomFull});
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional;
this.toolStrip1.Size = new System.Drawing.Size(835, 25);
this.toolStrip1.TabIndex = 3;
this.toolStrip1.Text = "toolStrip1";
//
// toolEditTemplate
//
this.toolEditTemplate.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.toolEditTemplate.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolEditTemplate.Name = "toolEditTemplate";
this.toolEditTemplate.Size = new System.Drawing.Size(66, 22);
this.toolEditTemplate.Text = "Edit Graph";
this.toolEditTemplate.Click += new System.EventHandler(this.toolEditTemplate_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
//
// toolStripDropDownButton1
//
this.toolStripDropDownButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.toolStripDropDownButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripButton1,
this.toolStripSeparator4,
this.maxDataSizeToolStripMenuItem});
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(93, 22);
this.toolStripDropDownButton1.Text = "Live Graphing";
//
// toolStripButton1
//
this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton1.Name = "toolStripButton1";
this.toolStripButton1.Size = new System.Drawing.Size(125, 19);
this.toolStripButton1.Text = "Disable Live Graphing";
this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click);
//
// toolStripSeparator4
//
this.toolStripSeparator4.Name = "toolStripSeparator4";
this.toolStripSeparator4.Size = new System.Drawing.Size(182, 6);
//
// maxDataSizeToolStripMenuItem
//
this.maxDataSizeToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripTextBox2});
this.maxDataSizeToolStripMenuItem.Name = "maxDataSizeToolStripMenuItem";
this.maxDataSizeToolStripMenuItem.Size = new System.Drawing.Size(185, 22);
this.maxDataSizeToolStripMenuItem.Text = "Max Data Size";
//
// toolStripTextBox2
//
this.toolStripTextBox2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.toolStripTextBox2.Name = "toolStripTextBox2";
this.toolStripTextBox2.Size = new System.Drawing.Size(50, 23);
this.toolStripTextBox2.TextChanged += new System.EventHandler(this.ToolStripTextBox2_TextChanged);
//
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25);
//
// toolZoomIn
//
this.toolZoomIn.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolZoomIn.Image = global::Properties.Resources.magnifier__plus;
this.toolZoomIn.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolZoomIn.Name = "toolZoomIn";
this.toolZoomIn.Size = new System.Drawing.Size(23, 22);
this.toolZoomIn.Text = "Zoom in";
this.toolZoomIn.Click += new System.EventHandler(this.toolZoomIn_Click);
//
// toolZoomOut
//
this.toolZoomOut.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolZoomOut.Image = global::Properties.Resources.magnifier__minus;
this.toolZoomOut.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolZoomOut.Name = "toolZoomOut";
this.toolZoomOut.Size = new System.Drawing.Size(23, 22);
this.toolZoomOut.Text = "Zoom out";
this.toolZoomOut.Click += new System.EventHandler(this.toolZoomOut_Click);
//
// toolZoomFull
//
this.toolZoomFull.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolZoomFull.Image = global::Properties.Resources.magnifier_history;
this.toolZoomFull.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolZoomFull.Name = "toolZoomFull";
this.toolZoomFull.Size = new System.Drawing.Size(23, 22);
this.toolZoomFull.Text = "Zoom Full";
this.toolZoomFull.Click += new System.EventHandler(this.toolZoomFull_Click);
//
// panel1
//
this.panel1.BackColor = System.Drawing.Color.Transparent;
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 25);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(835, 10);
this.panel1.TabIndex = 4;
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.DarkSlateGray;
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(0, 35);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(835, 381);
this.panel2.TabIndex = 5;
//
// ctrlLogGraph1
//
this.ctrlLogGraph1.BackColor = System.Drawing.Color.LightBlue;
this.ctrlLogGraph1.Cursor = System.Windows.Forms.Cursors.Cross;
this.ctrlLogGraph1.Dock = System.Windows.Forms.DockStyle.Fill;
this.ctrlLogGraph1.Location = new System.Drawing.Point(0, 35);
this.ctrlLogGraph1.Name = "ctrlLogGraph1";
this.ctrlLogGraph1.PlotCursor = 0;
this.ctrlLogGraph1.PlotEnd = 0F;
this.ctrlLogGraph1.PlotStart = 0F;
this.ctrlLogGraph1.Size = new System.Drawing.Size(835, 381);
this.ctrlLogGraph1.TabIndex = 0;
//
// frmDatalogGraphs
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.LightBlue;
this.ClientSize = new System.Drawing.Size(835, 432);
this.ContextMenuStrip = this.contextMenuStrip;
this.Controls.Add(this.ctrlLogGraph1);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.Controls.Add(this.hScrollBar);
this.Controls.Add(this.toolStrip1);
this.DoubleBuffered = true;
this.Font = new System.Drawing.Font("Lucida Sans", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.KeyPreview = true;
this.Name = "frmDatalogGraphs";
this.Text = "Datalog Graphs";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmDatalogGraphs_FormClosing);
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.frmDatalogGraphs_FormClosed);
this.Load += new System.EventHandler(this.frmDatalogGraphs_Load);
this.Move += new System.EventHandler(this.frmDatalogGraphs_Move);
this.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.frmDatalogGraphs_PreviewKeyDown);
this.Resize += new System.EventHandler(this.frmDatalogGraphs_Resize);
this.contextMenuStrip.ResumeLayout(false);
this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
internal void method_1(ref Class18 class18_1, ref Class10_settings class10_1, ref Class17 class17_1, ref FrmMain frmMain_1)
{
this.frmMain_0 = frmMain_1;
this.class10_settings_0 = class10_1;
this.class17_0 = class17_1;
this.class18_0 = class18_1;
this.ctrlLogGraph1.method_0(ref class18_1, ref class10_1, ref class17_1);
this.ctrlLogGraph1.plotChangeDelegate_0 += new ctrlLogGraph.plotChangeDelegate(this.method_8);
this.ctrlLogGraph1.plotCursorChangeDelegate_0 += new ctrlLogGraph.plotCursorChangeDelegate(this.method_7);
this.ctrlLogGraph1.requestEditTemplateDelegate_0 += new ctrlLogGraph.requestEditTemplateDelegate(this.method_3);
this.class17_0.delegate53_0 += new Class17.Delegate53(this.method_9);
if (this.class10_settings_0.LiveGraphing) toolStripButton1.Text = "Disable Live Graphing";
else toolStripButton1.Text = "Enable Live Graphing";
toolStripTextBox2.Text = this.class10_settings_0.LiveGraph_Lenght.ToString();
this.BackColor = this.class10_settings_0.color_8;
this.ctrlLogGraph1.BackColor = this.class10_settings_0.color_8;
foreach (Control control in base.Controls)
{
float emSize = control.Font.Size * (class18_0.class10_settings_0.scaleRate / 100f);
control.Font = new Font(control.Font.Name, emSize, control.Font.Style, control.Font.Unit);
}
}
private string method_10(long long_0)
{
TimeSpan span = TimeSpan.FromMilliseconds((double) long_0);
int num = (int) Math.Floor((double) (((float) span.Milliseconds) / 10f));
if (span.Minutes <= 0)
{
return (span.Minutes.ToString("00") + ":" + span.Seconds.ToString("00") + ":" + num.ToString("00"));
}
if (span.Minutes > 0)
{
return (span.Minutes.ToString("00") + ":" + span.Seconds.ToString("00") + ":" + num.ToString("00"));
}
if (span.Hours > 0)
{
return (span.Hours.ToString("00") + ":" + span.Minutes.ToString("00") + ":" + span.Seconds.ToString("00") + ":" + num.ToString("00"));
}
return "";
}
private void method_3()
{
this.toolEditTemplate_Click(null, null);
}
private void method_7(int int_0)
{
string str = TimeSpan.FromMilliseconds((double) this.class17_0.method_77(SensorsX.duration, int_0)).ToString();
if (str.Length > 8)
{
str = str.Remove(str.Length - 4, 4);
}
}
private void method_8()
{
this.hScrollBar.LargeChange = ((int) this.ctrlLogGraph1.PlotEnd) - ((int) this.ctrlLogGraph1.PlotStart);
this.hScrollBar.Maximum = (int) this.class17_0.method_65();
this.hScrollBar.Value = (int) this.ctrlLogGraph1.PlotStart;
}
private void method_9(long long_0, string string_0)
{
try
{
if (this.class17_0 != null)
{
this.hScrollBar.Visible = this.class17_0.method_63_HasLogsFileOpen();
if (this.class17_0.method_63_HasLogsFileOpen())
{
this.hScrollBar.Minimum = 0;
this.hScrollBar.Maximum = (int) this.class17_0.method_65();
this.hScrollBar.LargeChange = (int) this.class17_0.method_65();
}
this.toolZoomFull.Enabled = this.class17_0.method_63_HasLogsFileOpen();
this.toolZoomIn.Enabled = this.class17_0.method_63_HasLogsFileOpen();
this.toolZoomOut.Enabled = this.class17_0.method_63_HasLogsFileOpen();
}
}
catch (Exception)
{
}
}
private void toolClearMarker_Click(object sender, EventArgs e)
{
this.ctrlLogGraph1.clearMarkersToolStripMenuItem_Click(sender, e);
}
private void toolEditTemplate_Click(object sender, EventArgs e)
{
this.frmMain_0.graphsSetupToolStripMenuItem_Click(sender, e);
}
private void toolSetEnd_Click(object sender, EventArgs e)
{
this.ctrlLogGraph1.setEndToolStripMenuItem_Click(sender, e);
}
private void toolSetMarker_Click(object sender, EventArgs e)
{
this.ctrlLogGraph1.setMarkerCurrentCursor();
}
private void toolSetStart_Click(object sender, EventArgs e)
{
this.ctrlLogGraph1.setStartToolStripMenuItem_Click(sender, e);
}
private void toolZoomFull_Click(object sender, EventArgs e)
{
this.ctrlLogGraph1.zoomFullToolStripMenuItem_Click(sender, e);
}
private void toolZoomIn_Click(object sender, EventArgs e)
{
this.ctrlLogGraph1.zoomInToolStripMenuItem_Click(sender, e);
}
private void toolZoomOut_Click(object sender, EventArgs e)
{
this.ctrlLogGraph1.zoomOutToolStripMenuItem_Click(sender, e);
}
private void toolStripButton1_Click(object sender, EventArgs e)
{
if (this.class10_settings_0.LiveGraphing)
{
this.class10_settings_0.LiveGraphing = false;
toolStripButton1.Text = "Enable Live Graphing";
}
else
{
this.class10_settings_0.LiveGraphing = true;
toolStripButton1.Text = "Disable Live Graphing";
}
}
private void ToolStripTextBox2_TextChanged(object sender, EventArgs e)
{
try
{
this.class10_settings_0.LiveGraph_Lenght = int.Parse(toolStripTextBox2.Text);
toolStripTextBox2.Text = this.class10_settings_0.LiveGraph_Lenght.ToString();
}
catch
{
}
}
}

1823
frmDatalogGraphs.resx Normal file

File diff suppressed because it is too large Load Diff

408
frmDebug.cs Normal file
View File

@ -0,0 +1,408 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
internal class frmDebug : Form
{
private Class18 class18_0;
private ToolStripMenuItem clearErrorCodesToolStripMenuItem;
private ContextMenuStrip contextMenuStrip1;
private FrmMain frmMain_0;
private IContainer icontainer_0;
private IContainer components;
private Panel panel1;
public Button button1;
public Button button2;
private SaveFileDialog saveFileDialog1;
private System.Windows.Forms.Timer LoopTimer = new System.Windows.Forms.Timer();
private RichTextBox richTextBox1;
//private BackgroundWorker backgroundWorker1;
public bool loading = true;
public bool loading2 = true;
private ToolStripMenuItem copyToolStripMenuItem;
private ToolStripSeparator toolStripSeparator1;
private ToolStripMenuItem logsAdvancedDatasToolStripMenuItem;
private ToolStripSeparator toolStripSeparator2;
private CheckBox checkBoxLogDatetime;
private int SavedLines = 0;
internal frmDebug()
{
this.InitializeComponent();
}
internal void method_0(ref Class18 class18_1, ref FrmMain frmMain_1)
{
this.class18_0 = class18_1;
this.frmMain_0 = frmMain_1;
LoopTimer.Interval = 100;
//LoopTimer.Interval = 1000;
LoopTimer.Tick += DoThisAllTheTime;
LoopTimer.Start();
loading2 = true;
this.logsAdvancedDatasToolStripMenuItem.Checked = this.class18_0.class10_settings_0.LogAdvancedDatas;
checkBoxLogDatetime.Checked = class18_0.class10_settings_0.LogDatetime;
loading2 = false;
foreach (Control control in base.Controls)
{
float emSize = control.Font.Size * (class18_0.class10_settings_0.scaleRate / 100f);
control.Font = new Font(control.Font.Name, emSize, control.Font.Style, control.Font.Unit);
}
/*this.backgroundWorker1.WorkerSupportsCancellation = true;
this.backgroundWorker1.WorkerReportsProgress = false;
this.backgroundWorker1.DoWork += new DoWorkEventHandler(this.backgroundWorker1_DoWork);
this.backgroundWorker1.RunWorkerAsync();*/
}
private void ApplyLogs()
{
if (!loading)
{
if (frmMain_0.DebugLogs.Count > SavedLines)
{
LoopTimer.Stop();
while (frmMain_0.DebugLogs.Count > SavedLines)
{
if (checkBoxLogDatetime.Checked) this.richTextBox1.Text += DateTime.Now.ToString("H:mm:ss") + " - ";
this.richTextBox1.Text += frmMain_0.DebugLogs[SavedLines] + Environment.NewLine;
try
{
this.richTextBox1.SelectionStart = this.richTextBox1.TextLength;
this.richTextBox1.ScrollToCaret();
}
catch { }
SavedLines++;
//this.richTextBox1.Invalidate();
}
LoopTimer.Start();
}
}
}
void DoThisAllTheTime(object sender, EventArgs e)
//private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
{
ApplyLogs();
}
private void frmDebug_FormClosing(object sender, FormClosingEventArgs e)
{
//if (this.backgroundWorker1.IsBusy) this.backgroundWorker1.CancelAsync();
//this.backgroundWorker1.Dispose();
//this.backgroundWorker1 = null;
}
public void Clear()
{
frmMain_0.ClearLogs();
this.richTextBox1.Clear();
SavedLines = 0;
}
private void clearErrorCodesToolStripMenuItem_Click(object sender, EventArgs e)
{
Clear();
}
protected override void Dispose(bool disposing)
{
if (disposing && (this.icontainer_0 != null))
{
this.icontainer_0.Dispose();
}
base.Dispose(disposing);
}
private void frmDebug_FormClosed(object sender, FormClosedEventArgs e)
{
if (this.class18_0.class10_settings_0.WindowedMode) this.class18_0.class10_settings_0.Debug_Location = base.Location;
this.frmMain_0.frmDebug_0.Dispose();
this.frmMain_0.frmDebug_0 = null;
}
private void frmDebug_Load(object sender, EventArgs e)
{
if (this.class18_0 != null)
{
if (this.class18_0.class10_settings_0 != null)
{
if (this.class18_0.class10_settings_0.WindowedMode)
{
this.FormBorderStyle = FormBorderStyle.Sizable;
this.Dock = DockStyle.None;
base.Location = this.class18_0.class10_settings_0.Debug_Location;
base.Size = this.class18_0.class10_settings_0.Debug_Size;
}
else
{
this.FormBorderStyle = FormBorderStyle.None;
this.Dock = DockStyle.Fill;
}
}
}
this.richTextBox1.Clear();
loading = false;
}
private void frmDebug_Move(object sender, EventArgs e)
{
}
private void frmDebug_Resize(object sender, EventArgs e)
{
if (this.class18_0 != null)
{
if (this.class18_0.class10_settings_0 != null)
{
if (this.class18_0.class10_settings_0.WindowedMode && !loading)
{
if (base.WindowState == FormWindowState.Normal)
{
this.class18_0.class10_settings_0.Debug_Size = base.Size;
}
this.class18_0.class10_settings_0.Debug_Location = base.Location;
}
}
}
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmDebug));
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.logsAdvancedDatasToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.copyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.clearErrorCodesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.panel1 = new System.Windows.Forms.Panel();
this.checkBoxLogDatetime = new System.Windows.Forms.CheckBox();
this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.contextMenuStrip1.SuspendLayout();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// contextMenuStrip1
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.logsAdvancedDatasToolStripMenuItem,
this.toolStripSeparator2,
this.copyToolStripMenuItem,
this.toolStripSeparator1,
this.clearErrorCodesToolStripMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(188, 82);
this.contextMenuStrip1.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStrip1_Opening);
//
// logsAdvancedDatasToolStripMenuItem
//
this.logsAdvancedDatasToolStripMenuItem.CheckOnClick = true;
this.logsAdvancedDatasToolStripMenuItem.Name = "logsAdvancedDatasToolStripMenuItem";
this.logsAdvancedDatasToolStripMenuItem.Size = new System.Drawing.Size(187, 22);
this.logsAdvancedDatasToolStripMenuItem.Text = "Logs Advanced Datas";
this.logsAdvancedDatasToolStripMenuItem.CheckedChanged += new System.EventHandler(this.logsAdvancedDatasToolStripMenuItem_CheckedChanged);
//
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(184, 6);
//
// copyToolStripMenuItem
//
this.copyToolStripMenuItem.Name = "copyToolStripMenuItem";
this.copyToolStripMenuItem.Size = new System.Drawing.Size(187, 22);
this.copyToolStripMenuItem.Text = "Copy";
this.copyToolStripMenuItem.Click += new System.EventHandler(this.copyToolStripMenuItem_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(184, 6);
//
// clearErrorCodesToolStripMenuItem
//
this.clearErrorCodesToolStripMenuItem.Name = "clearErrorCodesToolStripMenuItem";
this.clearErrorCodesToolStripMenuItem.Size = new System.Drawing.Size(187, 22);
this.clearErrorCodesToolStripMenuItem.Text = "Clear";
this.clearErrorCodesToolStripMenuItem.Click += new System.EventHandler(this.clearErrorCodesToolStripMenuItem_Click);
//
// panel1
//
this.panel1.BackColor = System.Drawing.SystemColors.Control;
this.panel1.ContextMenuStrip = this.contextMenuStrip1;
this.panel1.Controls.Add(this.checkBoxLogDatetime);
this.panel1.Controls.Add(this.button2);
this.panel1.Controls.Add(this.button1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(342, 33);
this.panel1.TabIndex = 1;
//
// checkBoxLogDatetime
//
this.checkBoxLogDatetime.AutoSize = true;
this.checkBoxLogDatetime.Checked = true;
this.checkBoxLogDatetime.CheckState = System.Windows.Forms.CheckState.Checked;
this.checkBoxLogDatetime.Location = new System.Drawing.Point(158, 9);
this.checkBoxLogDatetime.Name = "checkBoxLogDatetime";
this.checkBoxLogDatetime.Size = new System.Drawing.Size(89, 17);
this.checkBoxLogDatetime.TabIndex = 2;
this.checkBoxLogDatetime.Text = "Log Datetime";
this.checkBoxLogDatetime.UseVisualStyleBackColor = true;
this.checkBoxLogDatetime.CheckedChanged += new System.EventHandler(this.checkBoxLogDatetime_CheckedChanged);
//
// button2
//
this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button2.Location = new System.Drawing.Point(6, 5);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(88, 23);
this.button2.TabIndex = 1;
this.button2.Text = "Export Logs";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button1
//
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button1.ForeColor = System.Drawing.Color.Red;
this.button1.Location = new System.Drawing.Point(100, 5);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(52, 23);
this.button1.TabIndex = 0;
this.button1.Text = "Clear";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// saveFileDialog1
//
this.saveFileDialog1.DefaultExt = "txt";
this.saveFileDialog1.Filter = "Log Text File|*.txt";
this.saveFileDialog1.Title = "Save Debug Log";
//
// richTextBox1
//
this.richTextBox1.BackColor = System.Drawing.SystemColors.Window;
this.richTextBox1.ContextMenuStrip = this.contextMenuStrip1;
this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.richTextBox1.Location = new System.Drawing.Point(0, 33);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.ReadOnly = true;
this.richTextBox1.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
this.richTextBox1.Size = new System.Drawing.Size(342, 267);
this.richTextBox1.TabIndex = 2;
this.richTextBox1.Text = "";
//
// frmDebug
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(342, 300);
this.Controls.Add(this.richTextBox1);
this.Controls.Add(this.panel1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.Name = "frmDebug";
this.Text = "Debug Logs";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmDebug_FormClosing);
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.frmDebug_FormClosed);
this.Load += new System.EventHandler(this.frmDebug_Load);
this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.frmDebug_KeyUp);
this.Move += new System.EventHandler(this.frmDebug_Move);
this.Resize += new System.EventHandler(this.frmDebug_Resize);
this.contextMenuStrip1.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.ResumeLayout(false);
}
private void button1_Click(object sender, EventArgs e)
{
Clear();
}
private void button2_Click(object sender, EventArgs e)
{
DialogResult result = saveFileDialog1.ShowDialog();
if (result == DialogResult.OK)
{
string ThisTxt = "";
ThisTxt = this.richTextBox1.Text;
StreamWriter writer = new StreamWriter(saveFileDialog1.FileName, false);
writer.Write(ThisTxt);
writer.Close();
writer.Dispose();
writer = null;
}
}
private void richTextBox1_KeyDown(object sender, KeyEventArgs e)
{
/*if (this.frmMain_0.class10_settings_0.GetKeyPressed(e, "Copy"))
{
Clipboard.SetText(richTextBox1.SelectedText);
this.frmMain_0.LogThis("Logs copied to clipboard");
}*/
}
private void copyToolStripMenuItem_Click(object sender, EventArgs e)
{
Clipboard.SetText(richTextBox1.SelectedText);
this.frmMain_0.LogThis("Logs copied to clipboard");
}
private void contextMenuStrip1_Opening(object sender, CancelEventArgs e)
{
copyToolStripMenuItem.Enabled = true;
if (richTextBox1.SelectedText == "" || richTextBox1.SelectedText == null) copyToolStripMenuItem.Enabled = false;
}
public void CopyLogToClip()
{
if (richTextBox1.SelectedText != null)
{
Clipboard.SetText(richTextBox1.SelectedText);
this.frmMain_0.LogThis("Logs copied to clipboard");
}
}
public void frmDebug_KeyUp(object sender, KeyEventArgs e)
{
if (this.frmMain_0.class10_settings_0.GetKeyPressed(e, "Copy"))
//else if ((e.KeyCode == (Keys) Enum.Parse(typeof(Keys), "C")) && e.Control && (!e.Shift && !e.Alt))
{
CopyLogToClip();
}
else
{
e.Handled = false;
}
}
private void logsAdvancedDatasToolStripMenuItem_CheckedChanged(object sender, EventArgs e)
{
if (!loading2) this.class18_0.class10_settings_0.LogAdvancedDatas = this.logsAdvancedDatasToolStripMenuItem.Checked;
}
private void checkBoxLogDatetime_CheckedChanged(object sender, EventArgs e)
{
if (!loading2) this.class18_0.class10_settings_0.LogDatetime = this.checkBoxLogDatetime.Checked;
}
}

1793
frmDebug.resx Normal file

File diff suppressed because it is too large Load Diff