Compare commits

..

8 Commits

@ -12,6 +12,21 @@
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@ -32,6 +47,18 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<SignManifests>false</SignManifests>
</PropertyGroup>
<PropertyGroup>
<ManifestCertificateThumbprint>D19BDBC21544C44B269FADA562582A08614989EA</ManifestCertificateThumbprint>
</PropertyGroup>
<PropertyGroup>
<ManifestKeyFile>Elite Power Management Simulator_TemporaryKey.pfx</ManifestKeyFile>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>skyfall_logo_roulette_white001_64only.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
@ -67,6 +94,7 @@
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="Elite Power Management Simulator_TemporaryKey.pfx" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
@ -80,5 +108,23 @@
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<Content Include="SKYFALL_002.ico" />
<Content Include="skyfall_logo_roulette_white001.ico" />
<Content Include="skyfall_logo_roulette_white001_256only.ico" />
<Content Include="skyfall_logo_roulette_white001_64only.ico" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.7.2 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

@ -41,69 +41,99 @@
this.lbl_instructions = new System.Windows.Forms.Label();
this.lbl_version = new System.Windows.Forms.Label();
this.gbox_pipmgmt = new System.Windows.Forms.GroupBox();
this.cbox_showLog = new System.Windows.Forms.CheckBox();
this.gbox_log = new System.Windows.Forms.GroupBox();
this.lst_log = new System.Windows.Forms.ListBox();
this.txt_mba = new System.Windows.Forms.TextBox();
this.gbox_macroBuilder = new System.Windows.Forms.GroupBox();
this.lbl_mbaChangeWarning = new System.Windows.Forms.Label();
this.gbox_custom = new System.Windows.Forms.GroupBox();
this.lbl_custRst = new System.Windows.Forms.Label();
this.lbl_custWep = new System.Windows.Forms.Label();
this.lbl_custEng = new System.Windows.Forms.Label();
this.lbl_custSys = new System.Windows.Forms.Label();
this.txt_custRst = new System.Windows.Forms.TextBox();
this.txt_custWep = new System.Windows.Forms.TextBox();
this.txt_custEng = new System.Windows.Forms.TextBox();
this.txt_custSys = new System.Windows.Forms.TextBox();
this.rad_custom = new System.Windows.Forms.RadioButton();
this.rad_ahk = new System.Windows.Forms.RadioButton();
this.rad_ch = new System.Windows.Forms.RadioButton();
this.gbox_pipmgmt.SuspendLayout();
this.gbox_log.SuspendLayout();
this.gbox_macroBuilder.SuspendLayout();
this.gbox_custom.SuspendLayout();
this.SuspendLayout();
//
// prog_eng
//
this.prog_eng.BackColor = System.Drawing.SystemColors.ControlDarkDark;
this.prog_eng.Location = new System.Drawing.Point(117, 27);
this.prog_eng.Location = new System.Drawing.Point(117, 33);
this.prog_eng.Maximum = 8;
this.prog_eng.Name = "prog_eng";
this.prog_eng.Size = new System.Drawing.Size(158, 23);
this.prog_eng.TabIndex = 0;
this.prog_eng.Value = 4;
this.prog_eng.Click += new System.EventHandler(this.eng_click);
//
// prog_sys
//
this.prog_sys.BackColor = System.Drawing.SystemColors.ControlDarkDark;
this.prog_sys.Location = new System.Drawing.Point(12, 76);
this.prog_sys.Location = new System.Drawing.Point(12, 82);
this.prog_sys.Maximum = 8;
this.prog_sys.Name = "prog_sys";
this.prog_sys.Size = new System.Drawing.Size(158, 23);
this.prog_sys.TabIndex = 1;
this.prog_sys.Value = 4;
this.prog_sys.Click += new System.EventHandler(this.sys_click);
//
// prog_wep
//
this.prog_wep.BackColor = System.Drawing.SystemColors.ControlDarkDark;
this.prog_wep.Location = new System.Drawing.Point(222, 76);
this.prog_wep.Location = new System.Drawing.Point(222, 82);
this.prog_wep.Maximum = 8;
this.prog_wep.Name = "prog_wep";
this.prog_wep.Size = new System.Drawing.Size(158, 23);
this.prog_wep.TabIndex = 2;
this.prog_wep.Value = 4;
this.prog_wep.Click += new System.EventHandler(this.wep_click);
//
// lbl_eng
//
this.lbl_eng.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.lbl_eng.AutoSize = true;
this.lbl_eng.Location = new System.Drawing.Point(181, 53);
this.lbl_eng.Location = new System.Drawing.Point(181, 59);
this.lbl_eng.Name = "lbl_eng";
this.lbl_eng.Size = new System.Drawing.Size(30, 13);
this.lbl_eng.Size = new System.Drawing.Size(30, 26);
this.lbl_eng.TabIndex = 3;
this.lbl_eng.Text = "ENG";
this.lbl_eng.Text = "ENG\r\n2";
this.lbl_eng.TextAlign = System.Drawing.ContentAlignment.TopCenter;
this.lbl_eng.Click += new System.EventHandler(this.eng_click);
//
// lbl_sys
//
this.lbl_sys.AutoSize = true;
this.lbl_sys.Location = new System.Drawing.Point(76, 102);
this.lbl_sys.Location = new System.Drawing.Point(76, 108);
this.lbl_sys.Name = "lbl_sys";
this.lbl_sys.Size = new System.Drawing.Size(28, 13);
this.lbl_sys.Size = new System.Drawing.Size(28, 26);
this.lbl_sys.TabIndex = 4;
this.lbl_sys.Text = "SYS";
this.lbl_sys.Text = "SYS\r\n2";
this.lbl_sys.TextAlign = System.Drawing.ContentAlignment.TopCenter;
this.lbl_sys.Click += new System.EventHandler(this.sys_click);
//
// lbl_wep
//
this.lbl_wep.AutoSize = true;
this.lbl_wep.Location = new System.Drawing.Point(283, 102);
this.lbl_wep.Location = new System.Drawing.Point(283, 108);
this.lbl_wep.Name = "lbl_wep";
this.lbl_wep.Size = new System.Drawing.Size(32, 13);
this.lbl_wep.Size = new System.Drawing.Size(32, 26);
this.lbl_wep.TabIndex = 5;
this.lbl_wep.Text = "WEP";
this.lbl_wep.Text = "WEP\r\n2";
this.lbl_wep.TextAlign = System.Drawing.ContentAlignment.TopCenter;
this.lbl_wep.Click += new System.EventHandler(this.wep_click);
//
// btn_reset
//
this.btn_reset.Location = new System.Drawing.Point(133, 120);
this.btn_reset.Location = new System.Drawing.Point(133, 126);
this.btn_reset.Name = "btn_reset";
this.btn_reset.Size = new System.Drawing.Size(126, 31);
this.btn_reset.TabIndex = 6;
@ -115,7 +145,7 @@
//
this.lbl_copyright.AutoSize = true;
this.lbl_copyright.ForeColor = System.Drawing.SystemColors.ControlDark;
this.lbl_copyright.Location = new System.Drawing.Point(274, 188);
this.lbl_copyright.Location = new System.Drawing.Point(666, 324);
this.lbl_copyright.Name = "lbl_copyright";
this.lbl_copyright.Size = new System.Drawing.Size(106, 13);
this.lbl_copyright.TabIndex = 7;
@ -126,7 +156,7 @@
//
this.lbl_xant_ad.AutoSize = true;
this.lbl_xant_ad.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
this.lbl_xant_ad.Location = new System.Drawing.Point(61, 188);
this.lbl_xant_ad.Location = new System.Drawing.Point(288, 324);
this.lbl_xant_ad.Name = "lbl_xant_ad";
this.lbl_xant_ad.Size = new System.Drawing.Size(209, 13);
this.lbl_xant_ad.TabIndex = 8;
@ -137,7 +167,7 @@
//
this.lbl_instructions.AutoSize = true;
this.lbl_instructions.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
this.lbl_instructions.Location = new System.Drawing.Point(98, 161);
this.lbl_instructions.Location = new System.Drawing.Point(95, 12);
this.lbl_instructions.Name = "lbl_instructions";
this.lbl_instructions.Size = new System.Drawing.Size(196, 13);
this.lbl_instructions.TabIndex = 10;
@ -148,14 +178,16 @@
//
this.lbl_version.AutoSize = true;
this.lbl_version.ForeColor = System.Drawing.SystemColors.ControlDark;
this.lbl_version.Location = new System.Drawing.Point(9, 188);
this.lbl_version.Location = new System.Drawing.Point(12, 324);
this.lbl_version.Name = "lbl_version";
this.lbl_version.Size = new System.Drawing.Size(46, 13);
this.lbl_version.TabIndex = 11;
this.lbl_version.Text = "v1.0.0.2";
this.lbl_version.Text = "v1.0.3.0";
//
// gbox_pipmgmt
//
this.gbox_pipmgmt.Controls.Add(this.cbox_showLog);
this.gbox_pipmgmt.Controls.Add(this.lbl_instructions);
this.gbox_pipmgmt.ForeColor = System.Drawing.SystemColors.ControlText;
this.gbox_pipmgmt.Location = new System.Drawing.Point(3, 3);
this.gbox_pipmgmt.Name = "gbox_pipmgmt";
@ -164,13 +196,210 @@
this.gbox_pipmgmt.TabStop = false;
this.gbox_pipmgmt.Text = "Power Distribution";
//
// cbox_showLog
//
this.cbox_showLog.AutoSize = true;
this.cbox_showLog.Checked = true;
this.cbox_showLog.CheckState = System.Windows.Forms.CheckState.Checked;
this.cbox_showLog.Enabled = false;
this.cbox_showLog.Location = new System.Drawing.Point(7, 159);
this.cbox_showLog.Name = "cbox_showLog";
this.cbox_showLog.Size = new System.Drawing.Size(144, 17);
this.cbox_showLog.TabIndex = 11;
this.cbox_showLog.Text = "Show Log/Macro Builder";
this.cbox_showLog.UseVisualStyleBackColor = true;
this.cbox_showLog.Visible = false;
this.cbox_showLog.CheckedChanged += new System.EventHandler(this.cbox_showLog_CheckedChanged);
//
// gbox_log
//
this.gbox_log.Controls.Add(this.lst_log);
this.gbox_log.Location = new System.Drawing.Point(396, 3);
this.gbox_log.Name = "gbox_log";
this.gbox_log.Size = new System.Drawing.Size(385, 203);
this.gbox_log.TabIndex = 13;
this.gbox_log.TabStop = false;
this.gbox_log.Text = "Distribution Log";
//
// lst_log
//
this.lst_log.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.lst_log.BackColor = System.Drawing.SystemColors.Window;
this.lst_log.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lst_log.ForeColor = System.Drawing.SystemColors.MenuText;
this.lst_log.FormattingEnabled = true;
this.lst_log.Items.AddRange(new object[] {
"[ RST ]\t\t[ 2 / 2 / 2 ]"});
this.lst_log.Location = new System.Drawing.Point(5, 14);
this.lst_log.Name = "lst_log";
this.lst_log.Size = new System.Drawing.Size(376, 184);
this.lst_log.TabIndex = 0;
//
// txt_mba
//
this.txt_mba.Location = new System.Drawing.Point(5, 90);
this.txt_mba.Name = "txt_mba";
this.txt_mba.Size = new System.Drawing.Size(768, 20);
this.txt_mba.TabIndex = 14;
this.txt_mba.Text = "KBDOWN ";
//
// gbox_macroBuilder
//
this.gbox_macroBuilder.Controls.Add(this.lbl_mbaChangeWarning);
this.gbox_macroBuilder.Controls.Add(this.gbox_custom);
this.gbox_macroBuilder.Controls.Add(this.rad_custom);
this.gbox_macroBuilder.Controls.Add(this.rad_ahk);
this.gbox_macroBuilder.Controls.Add(this.rad_ch);
this.gbox_macroBuilder.Controls.Add(this.txt_mba);
this.gbox_macroBuilder.Location = new System.Drawing.Point(3, 205);
this.gbox_macroBuilder.Name = "gbox_macroBuilder";
this.gbox_macroBuilder.Size = new System.Drawing.Size(778, 116);
this.gbox_macroBuilder.TabIndex = 14;
this.gbox_macroBuilder.TabStop = false;
this.gbox_macroBuilder.Text = "Macro Builder";
//
// lbl_mbaChangeWarning
//
this.lbl_mbaChangeWarning.AutoSize = true;
this.lbl_mbaChangeWarning.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbl_mbaChangeWarning.ForeColor = System.Drawing.Color.Firebrick;
this.lbl_mbaChangeWarning.Location = new System.Drawing.Point(153, 22);
this.lbl_mbaChangeWarning.Name = "lbl_mbaChangeWarning";
this.lbl_mbaChangeWarning.Size = new System.Drawing.Size(176, 39);
this.lbl_mbaChangeWarning.TabIndex = 28;
this.lbl_mbaChangeWarning.Text = "! WARNING !\r\nA pip reset must be performed\r\nto clear the macro builder!";
this.lbl_mbaChangeWarning.TextAlign = System.Drawing.ContentAlignment.TopCenter;
this.lbl_mbaChangeWarning.Visible = false;
//
// gbox_custom
//
this.gbox_custom.Controls.Add(this.lbl_custRst);
this.gbox_custom.Controls.Add(this.lbl_custWep);
this.gbox_custom.Controls.Add(this.lbl_custEng);
this.gbox_custom.Controls.Add(this.lbl_custSys);
this.gbox_custom.Controls.Add(this.txt_custRst);
this.gbox_custom.Controls.Add(this.txt_custWep);
this.gbox_custom.Controls.Add(this.txt_custEng);
this.gbox_custom.Controls.Add(this.txt_custSys);
this.gbox_custom.Enabled = false;
this.gbox_custom.Location = new System.Drawing.Point(393, 7);
this.gbox_custom.Name = "gbox_custom";
this.gbox_custom.Size = new System.Drawing.Size(381, 80);
this.gbox_custom.TabIndex = 27;
this.gbox_custom.TabStop = false;
this.gbox_custom.Text = "Custom Macro Buttons";
//
// lbl_custRst
//
this.lbl_custRst.AutoSize = true;
this.lbl_custRst.Location = new System.Drawing.Point(231, 58);
this.lbl_custRst.Name = "lbl_custRst";
this.lbl_custRst.Size = new System.Drawing.Size(41, 13);
this.lbl_custRst.TabIndex = 7;
this.lbl_custRst.Text = "[ RST ]";
//
// lbl_custWep
//
this.lbl_custWep.AutoSize = true;
this.lbl_custWep.Location = new System.Drawing.Point(345, 36);
this.lbl_custWep.Name = "lbl_custWep";
this.lbl_custWep.Size = new System.Drawing.Size(32, 13);
this.lbl_custWep.TabIndex = 6;
this.lbl_custWep.Text = "WEP";
//
// lbl_custEng
//
this.lbl_custEng.AutoSize = true;
this.lbl_custEng.Location = new System.Drawing.Point(231, 14);
this.lbl_custEng.Name = "lbl_custEng";
this.lbl_custEng.Size = new System.Drawing.Size(30, 13);
this.lbl_custEng.TabIndex = 5;
this.lbl_custEng.Text = "ENG";
//
// lbl_custSys
//
this.lbl_custSys.AutoSize = true;
this.lbl_custSys.Location = new System.Drawing.Point(117, 36);
this.lbl_custSys.Name = "lbl_custSys";
this.lbl_custSys.Size = new System.Drawing.Size(28, 13);
this.lbl_custSys.TabIndex = 4;
this.lbl_custSys.Text = "SYS";
//
// txt_custRst
//
this.txt_custRst.Location = new System.Drawing.Point(125, 54);
this.txt_custRst.Name = "txt_custRst";
this.txt_custRst.Size = new System.Drawing.Size(100, 20);
this.txt_custRst.TabIndex = 3;
this.txt_custRst.TextChanged += new System.EventHandler(this.txt_custRst_TextChanged);
//
// txt_custWep
//
this.txt_custWep.Location = new System.Drawing.Point(239, 33);
this.txt_custWep.Name = "txt_custWep";
this.txt_custWep.Size = new System.Drawing.Size(100, 20);
this.txt_custWep.TabIndex = 2;
this.txt_custWep.TextChanged += new System.EventHandler(this.txt_custWep_TextChanged);
//
// txt_custEng
//
this.txt_custEng.Location = new System.Drawing.Point(125, 11);
this.txt_custEng.Name = "txt_custEng";
this.txt_custEng.Size = new System.Drawing.Size(100, 20);
this.txt_custEng.TabIndex = 1;
this.txt_custEng.TextChanged += new System.EventHandler(this.txt_custEng_TextChanged);
//
// txt_custSys
//
this.txt_custSys.Location = new System.Drawing.Point(11, 33);
this.txt_custSys.Name = "txt_custSys";
this.txt_custSys.Size = new System.Drawing.Size(100, 20);
this.txt_custSys.TabIndex = 0;
this.txt_custSys.TextChanged += new System.EventHandler(this.txt_custSys_TextChanged);
//
// rad_custom
//
this.rad_custom.AutoSize = true;
this.rad_custom.Location = new System.Drawing.Point(7, 66);
this.rad_custom.Name = "rad_custom";
this.rad_custom.Size = new System.Drawing.Size(60, 17);
this.rad_custom.TabIndex = 17;
this.rad_custom.Text = "Custom";
this.rad_custom.UseVisualStyleBackColor = true;
this.rad_custom.CheckedChanged += new System.EventHandler(this.rad_mba_CheckedChanged);
//
// rad_ahk
//
this.rad_ahk.AutoSize = true;
this.rad_ahk.Location = new System.Drawing.Point(7, 43);
this.rad_ahk.Name = "rad_ahk";
this.rad_ahk.Size = new System.Drawing.Size(82, 17);
this.rad_ahk.TabIndex = 16;
this.rad_ahk.Text = "AutoHotKey";
this.rad_ahk.UseVisualStyleBackColor = true;
this.rad_ahk.CheckedChanged += new System.EventHandler(this.rad_mba_CheckedChanged);
//
// rad_ch
//
this.rad_ch.AutoSize = true;
this.rad_ch.Checked = true;
this.rad_ch.Location = new System.Drawing.Point(7, 20);
this.rad_ch.Name = "rad_ch";
this.rad_ch.Size = new System.Drawing.Size(85, 17);
this.rad_ch.TabIndex = 15;
this.rad_ch.TabStop = true;
this.rad_ch.Text = "CH Products";
this.rad_ch.UseVisualStyleBackColor = true;
this.rad_ch.CheckedChanged += new System.EventHandler(this.rad_mba_CheckedChanged);
//
// form_main
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(392, 210);
this.ClientSize = new System.Drawing.Size(784, 342);
this.Controls.Add(this.gbox_macroBuilder);
this.Controls.Add(this.gbox_log);
this.Controls.Add(this.lbl_version);
this.Controls.Add(this.lbl_instructions);
this.Controls.Add(this.lbl_xant_ad);
this.Controls.Add(this.lbl_copyright);
this.Controls.Add(this.btn_reset);
@ -183,8 +412,16 @@
this.Controls.Add(this.gbox_pipmgmt);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.Name = "form_main";
this.Text = "Elite Power Management Simulator";
this.gbox_pipmgmt.ResumeLayout(false);
this.gbox_pipmgmt.PerformLayout();
this.gbox_log.ResumeLayout(false);
this.gbox_macroBuilder.ResumeLayout(false);
this.gbox_macroBuilder.PerformLayout();
this.gbox_custom.ResumeLayout(false);
this.gbox_custom.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
@ -204,6 +441,24 @@
private System.Windows.Forms.Label lbl_instructions;
private System.Windows.Forms.Label lbl_version;
private System.Windows.Forms.GroupBox gbox_pipmgmt;
private System.Windows.Forms.CheckBox cbox_showLog;
private System.Windows.Forms.GroupBox gbox_log;
private System.Windows.Forms.ListBox lst_log;
private System.Windows.Forms.TextBox txt_mba;
private System.Windows.Forms.GroupBox gbox_macroBuilder;
private System.Windows.Forms.RadioButton rad_custom;
private System.Windows.Forms.RadioButton rad_ahk;
private System.Windows.Forms.RadioButton rad_ch;
private System.Windows.Forms.GroupBox gbox_custom;
private System.Windows.Forms.Label lbl_custRst;
private System.Windows.Forms.Label lbl_custWep;
private System.Windows.Forms.Label lbl_custEng;
private System.Windows.Forms.Label lbl_custSys;
private System.Windows.Forms.TextBox txt_custRst;
private System.Windows.Forms.TextBox txt_custWep;
private System.Windows.Forms.TextBox txt_custEng;
private System.Windows.Forms.TextBox txt_custSys;
private System.Windows.Forms.Label lbl_mbaChangeWarning;
}
}

@ -1,4 +1,5 @@
using System;
using elite_power_sim;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
@ -22,6 +23,15 @@ namespace Elite_Power_Management_Simulator
public static Int16 eng = 4;
public static Int16 sys = 4;
public static Int16 wep = 4;
public static string key_rst = "KBDOWN";
public static string key_sys = " KBLEFT";
public static string key_eng = " KBUP";
public static string key_wep = " KBRIGHT";
public static string rst_text = "[ RST ]\t\t[ 2 / 2 / 2 ]";
public static int log_count = 0;
}
public static class calc
@ -31,235 +41,407 @@ namespace Elite_Power_Management_Simulator
private void btn_reset_Click(object sender, EventArgs e)
{
global.eng = 4;
global.sys = 4;
global.wep = 4;
update();
pwr_reset();
}
/*public static void fastProg(this ProgressBar bar, int value)
{
if (value < bar.Maximum)
{
bar.Value = value + 1;
}
bar.Value = value;
}*/
public void update()
{
/*
// Old style, slow due to progress bar animations
prog_eng.Value = global.eng;
prog_sys.Value = global.sys;
prog_wep.Value = global.wep;
*/
/*
fastProg(prog_eng, global.eng);
fastProg(prog_sys, global.sys);
fastProg(prog_wep, global.wep);
*/
// // Fast processing of Windows progress bars // //
//SYS
if (global.sys < prog_sys.Maximum) {
prog_sys.Value = global.sys + 1;
prog_sys.Value = global.sys;
} else {
prog_sys.Maximum = 10;
prog_sys.Value = prog_sys.Maximum;
prog_sys.Value = global.sys;
prog_sys.Maximum = 8;
}
//ENG
if (global.eng < prog_eng.Maximum) {
prog_eng.Value = global.eng + 1;
prog_eng.Value = global.eng;
} else {
prog_eng.Maximum = 10;
prog_eng.Value = prog_eng.Maximum;
prog_eng.Value = global.eng;
prog_eng.Maximum = 8;
}
//WEP
if (global.wep < prog_wep.Maximum) {
prog_wep.Value = global.wep + 1;
prog_wep.Value = global.wep;
} else {
prog_wep.Maximum = 10;
prog_wep.Value = prog_wep.Maximum;
prog_wep.Value = global.wep;
prog_wep.Maximum = 8;
}
//Update Labels to show pip count
string eng = Convert.ToString(Convert.ToDecimal(global.eng) / 2);
string sys = Convert.ToString(Convert.ToDecimal(global.sys) / 2);
string wep = Convert.ToString(Convert.ToDecimal(global.wep) / 2);
lbl_eng.Text = "ENG\n" + eng;
lbl_sys.Text = "SYS\n" + sys;
lbl_wep.Text = "WEP\n" + wep;
}
//Distribution History Tracking
public void track_history(string log_item, string log_btn)
{
string q = log_item;
string eng = Convert.ToString(Convert.ToDecimal(global.eng)/2);
string sys = Convert.ToString(Convert.ToDecimal(global.sys)/2);
string wep = Convert.ToString(Convert.ToDecimal(global.wep)/2);
global.log_count += 1; //Increment log count before declaring log entry number 'lc'
string lc = Convert.ToString(global.log_count);
lst_log.Items.Add(q + "\t\t" + "[ " + sys + " / " + eng + " / " + wep + " ]\t\t" + lc);
txt_mba.Text = txt_mba.Text + log_btn;
}
public void reset_history()
{
lst_log.Items.Clear();
lst_log.Items.Add(global.rst_text);
txt_mba.Text = global.key_rst;
lbl_mbaChangeWarning.Hide();
}
//Power Distribution Functions
public void pwr_reset()
{
global.eng = 4;
global.sys = 4;
global.wep = 4;
global.log_count = 0;
reset_history();
update();
}
public void pwr_eng()
{
string log_iname = "+ENG";
bool fin = false;
if (global.eng < 8)
{
if (global.eng == 7)
{
calc.e = 1;
}
else
{
calc.e = 2;
}
if (calc.e == 2)
{
if (global.sys >= 1 && global.wep >= 1 && !fin)
{
global.eng += 2;
global.sys -= 1;
global.wep -= 1;
fin = true;
}
if (global.sys < 1 && global.wep > 1 && !fin)
{
global.eng += 2;
global.wep -= 2;
fin = true;
}
if (global.sys > 1 && global.wep < 1 && !fin)
{
global.eng += 2;
global.sys -= 2;
fin = true;
}
}
if (calc.e == 1)
{
if (global.sys % 2 == 0)
{
if (global.wep >= 1 && !fin)
{
global.eng += 1;
global.wep -= 1;
fin = true;
}
}
else
{
if (global.sys >= 1 && !fin)
{
global.eng += 1;
global.sys -= 1;
fin = true;
}
}
}
track_history(log_iname, global.key_eng);
}
update();
}
public void pwr_sys()
{
string log_iname = "+SYS";
bool fin = false;
if (global.sys < 8)
{
if (global.sys == 7)
{
calc.e = 1;
}
else
{
calc.e = 2;
}
if (calc.e == 2)
{
if (global.eng >= 1 && global.wep >= 1 && !fin)
{
global.sys += 2;
global.eng -= 1;
global.wep -= 1;
fin = true;
}
if (global.eng < 1 && global.wep > 1 && !fin)
{
global.sys += 2;
global.wep -= 2;
fin = true;
}
if (global.eng > 1 && global.wep < 1 && !fin)
{
global.sys += 2;
global.eng -= 2;
fin = true;
}
}
if (calc.e == 1)
{
if (global.eng % 2 == 0)
{
if (global.wep >= 1 && !fin)
{
global.sys += 1;
global.wep -= 1;
fin = true;
}
}
else
{
if (global.eng >= 1 && !fin)
{
global.sys += 1;
global.eng -= 1;
fin = true;
}
}
}
track_history(log_iname, global.key_sys);
}
update();
}
public void pwr_wep()
{
string log_iname = "+WEP";
bool fin = false;
if (global.wep < 8)
{
if (global.wep == 7)
{
calc.e = 1;
}
else
{
calc.e = 2;
}
if (calc.e == 2)
{
if (global.sys >= 1 && global.eng >= 1 && !fin)
{
global.wep += 2;
global.sys -= 1;
global.eng -= 1;
fin = true;
}
if (global.sys < 1 && global.eng > 1 && !fin)
{
global.wep += 2;
global.eng -= 2;
fin = true;
}
if (global.sys > 1 && global.eng < 1 && !fin)
{
global.wep += 2;
global.sys -= 2;
fin = true;
}
}
if (calc.e == 1)
{
if (global.sys % 2 == 0)
{
if (global.eng >= 1 && !fin)
{
global.wep += 1;
global.eng -= 1;
fin = true;
}
}
else
{
if (global.sys >= 1 && !fin)
{
global.wep += 1;
global.sys -= 1;
fin = true;
}
}
}
track_history(log_iname, global.key_wep);
}
update();
}
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
//capture up arrow key
if (keyData == Keys.Up)
{
bool fin = false;
if (global.eng < 8)
{
if (global.eng == 7)
{
calc.e = 1;
}
else
{
calc.e = 2;
}
if (calc.e == 2)
{
if (global.sys >= 1 && global.wep >= 1 && !fin)
{
global.eng += 2;
global.sys -= 1;
global.wep -= 1;
fin = true;
}
if (global.sys < 1 && global.wep > 1 && !fin)
{
global.eng += 2;
global.wep -= 2;
fin = true;
}
if (global.sys > 1 && global.wep < 1 && !fin)
{
global.eng += 2;
global.sys -= 2;
fin = true;
}
}
if (calc.e == 1)
{
if (global.sys % 2 == 0)
{
if (global.wep >= 1 && !fin)
{
global.eng += 1;
global.wep -= 1;
fin = true;
}
/*else
{
if (!fin)
{
MessageBox.Show("Internal math error!");
}
}*/
}
else
{
if (global.sys >= 1 && !fin)
{
global.eng += 1;
global.sys -= 1;
fin = true;
}
/*else
{
if (!fin)
{
MessageBox.Show("Internal math error!");
}
}*/
}
}
}
update();
pwr_eng();
return true;
}
//capture down arrow key
if (keyData == Keys.Down)
{
global.eng = 4;
global.sys = 4;
global.wep = 4;
update();
pwr_reset();
return true;
}
//capture left arrow key
if (keyData == Keys.Left)
{
bool fin = false;
if (global.sys < 8)
{
if (global.sys == 7)
{
calc.e = 1;
}
else
{
calc.e = 2;
}
if (calc.e == 2)
{
if (global.eng >= 1 && global.wep >= 1 && !fin)
{
global.sys += 2;
global.eng -= 1;
global.wep -= 1;
fin = true;
}
if (global.eng < 1 && global.wep > 1 && !fin)
{
global.sys += 2;
global.wep -= 2;
fin = true;
}
if (global.eng > 1 && global.wep < 1 && !fin)
{
global.sys += 2;
global.eng -= 2;
fin = true;
}
}
if (calc.e == 1)
{
if (global.eng % 2 == 0)
{
if (global.wep >= 1 && !fin)
{
global.sys += 1;
global.wep -= 1;
fin = true;
}
}
else
{
if (global.eng >= 1 && !fin)
{
global.sys += 1;
global.eng -= 1;
fin = true;
}
}
}
}
update();
pwr_sys();
return true;
}
//capture right arrow key
if (keyData == Keys.Right)
{
bool fin = false;
if (global.wep < 8)
{
if (global.wep == 7)
{
calc.e = 1;
}
else
{
calc.e = 2;
}
if (calc.e == 2)
{
if (global.sys >= 1 && global.eng >= 1 && !fin)
{
global.wep += 2;
global.sys -= 1;
global.eng -= 1;
fin = true;
}
if (global.sys < 1 && global.eng > 1 && !fin)
{
global.wep += 2;
global.eng -= 2;
fin = true;
}
if (global.sys > 1 && global.eng < 1 && !fin)
{
global.wep += 2;
global.sys -= 2;
fin = true;
}
}
if (calc.e == 1)
{
if (global.sys % 2 == 0)
{
if (global.eng >= 1 && !fin)
{
global.wep += 1;
global.eng -= 1;
fin = true;
}
}
else
{
if (global.sys >= 1 && !fin)
{
global.wep += 1;
global.sys -= 1;
fin = true;
}
}
}
}
update();
pwr_wep();
return true;
}
return base.ProcessCmdKey(ref msg, keyData);
}
private void sys_click(object sender, EventArgs e)
{
pwr_sys();
}
private void eng_click(object sender, EventArgs e)
{
pwr_eng();
}
private void wep_click(object sender, EventArgs e)
{
pwr_wep();
}
private void lbl_copyright_Click(object sender, EventArgs e)
{
lbl_xant_ad.Visible = true;
}
private void cbox_showLog_CheckedChanged(object sender, EventArgs e)
{
//Default size: 408, 248
if (!cbox_showLog.Checked)
{
this.Width = 408;
this.Height = 248;
gbox_log.Hide();
gbox_macroBuilder.Hide();
}
else
{
this.Width = 800;
this.Height = 363;
gbox_log.Show();
gbox_macroBuilder.Show();
}
}
private void txt_custSys_TextChanged(object sender, EventArgs e)
{
global.key_sys = txt_custSys.Text;
lbl_mbaChangeWarning.Show();
}
private void txt_custEng_TextChanged(object sender, EventArgs e)
{
global.key_eng = txt_custEng.Text;
lbl_mbaChangeWarning.Show();
}
private void txt_custWep_TextChanged(object sender, EventArgs e)
{
global.key_wep = txt_custWep.Text;
lbl_mbaChangeWarning.Show();
}
private void txt_custRst_TextChanged(object sender, EventArgs e)
{
global.key_rst = txt_custRst.Text;
lbl_mbaChangeWarning.Show();
}
private void rad_mba_CheckedChanged(object sender, EventArgs e)
{
if (rad_ch.Checked)
{
global.key_rst = "KBDOWN";
global.key_sys = " KBLEFT";
global.key_eng = " KBUP";
global.key_wep = " KBRIGHT";
lbl_mbaChangeWarning.Show();
//gbox_custom.Hide();
gbox_custom.Enabled = false;
}
if (rad_ahk.Checked)
{
global.key_rst = "{down}";
global.key_sys = "{left}";
global.key_eng = "{up}";
global.key_wep = "{right}";
lbl_mbaChangeWarning.Show();
//gbox_custom.Hide();
gbox_custom.Enabled = false;
}
if (rad_custom.Checked)
{
global.key_rst = txt_custRst.Text;
global.key_sys = txt_custSys.Text;
global.key_eng = txt_custEng.Text;
global.key_wep = txt_custWep.Text;
lbl_mbaChangeWarning.Show();
//gbox_custom.Show();
gbox_custom.Enabled = true;
}
}
}
}

@ -1,4 +1,5 @@
using System.Reflection;
using System.Resources;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@ -32,5 +33,6 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.2")]
[assembly: AssemblyFileVersion("1.0.0.2")]
[assembly: AssemblyVersion("1.0.3.0")]
[assembly: AssemblyFileVersion("1.0.3.0")]
[assembly: NeutralResourcesLanguage("en")]

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Loading…
Cancel
Save