Skip to content

Commit

Permalink
added form 2
Browse files Browse the repository at this point in the history
  • Loading branch information
John Fouts committed Aug 30, 2016
1 parent c0dc591 commit 950c44a
Show file tree
Hide file tree
Showing 18 changed files with 777 additions and 3 deletions.
Binary file modified .vs/External Overlay/v14/.suo
Binary file not shown.
Binary file removed .vs/PoEFlasks/v14/.suo
Binary file not shown.
10 changes: 10 additions & 0 deletions External Overlay.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,21 @@
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="Form2.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form2.Designer.cs">
<DependentUpon>Form2.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Settings.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Form2.resx">
<DependentUpon>Form2.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
Expand Down
447 changes: 447 additions & 0 deletions Form2.Designer.cs

Large diffs are not rendered by default.

167 changes: 167 additions & 0 deletions Form2.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace External_Overlay
{
public partial class Form2 : Form
{
List<Flask> Flasks = new List<Flask>();
List<string> FlaskTypes = new List<string>();
Form1 f;
bool running = false;
BackgroundWorker worker = new BackgroundWorker();
public Form2()
{
Array fvalues = Enum.GetValues(typeof(Flask.Name));
Array fvalues2 = Enum.GetValues(typeof(Flask.Name));
Array fvalues3 = Enum.GetValues(typeof(Flask.Name));
Array fvalues4 = Enum.GetValues(typeof(Flask.Name));
Array fvalues5 = Enum.GetValues(typeof(Flask.Name));
Array values = Enum.GetValues(typeof(Keys));
Array values2 = Enum.GetValues(typeof(Keys));
Array values3 = Enum.GetValues(typeof(Keys));
Array values4 = Enum.GetValues(typeof(Keys));
Array values5 = Enum.GetValues(typeof(Keys));
InitializeComponent();
this.comboBox1.DataSource = values;
this.comboBox2.DataSource = values2;
this.comboBox3.DataSource = values3;
this.comboBox4.DataSource = values4;
this.comboBox5.DataSource = values5;
this.comboBox6.DataSource = fvalues;
this.comboBox7.DataSource = fvalues2;
this.comboBox8.DataSource = fvalues3;
this.comboBox9.DataSource = fvalues4;
this.comboBox10.DataSource = fvalues5;
this.comboBox1.SelectedIndex = (int)Properties.Settings.Default["cb1"];
this.comboBox2.SelectedIndex = (int)Properties.Settings.Default["cb2"];
this.comboBox3.SelectedIndex = (int)Properties.Settings.Default["cb3"];
this.comboBox4.SelectedIndex = (int)Properties.Settings.Default["cb4"];
this.comboBox5.SelectedIndex = (int)Properties.Settings.Default["cb5"];
this.comboBox6.SelectedIndex = (int)Properties.Settings.Default["cb6"];
this.comboBox7.SelectedIndex = (int)Properties.Settings.Default["cb7"];
this.comboBox8.SelectedIndex = (int)Properties.Settings.Default["cb8"];
this.comboBox9.SelectedIndex = (int)Properties.Settings.Default["cb9"];
this.comboBox10.SelectedIndex = (int)Properties.Settings.Default["cb10"];
this.checkBox1.Checked = (bool)Properties.Settings.Default["check1"];
this.checkBox2.Checked = (bool)Properties.Settings.Default["check2"];
this.checkBox3.Checked = (bool)Properties.Settings.Default["check3"];
this.checkBox4.Checked = (bool)Properties.Settings.Default["check4"];
this.checkBox5.Checked = (bool)Properties.Settings.Default["check5"];
this.numericUpDown1.Value = (int)Properties.Settings.Default["qual1"];
this.numericUpDown2.Value = (int)Properties.Settings.Default["qual2"];
this.numericUpDown3.Value = (int)Properties.Settings.Default["qual3"];
this.numericUpDown4.Value = (int)Properties.Settings.Default["qual4"];
this.numericUpDown5.Value = (int)Properties.Settings.Default["qual5"];
this.numericUpDown6.Value = (int)Properties.Settings.Default["globalqual"];
}

private void button1_Click(object sender, EventArgs e)
{
if (!running)
{
//saving settings
Properties.Settings.Default["cb1"] = comboBox1.SelectedIndex;
Properties.Settings.Default["cb2"] = comboBox2.SelectedIndex;
Properties.Settings.Default["cb3"] = comboBox3.SelectedIndex;
Properties.Settings.Default["cb4"] = comboBox4.SelectedIndex;
Properties.Settings.Default["cb5"] = comboBox5.SelectedIndex;
Properties.Settings.Default["cb6"] = comboBox6.SelectedIndex;
Properties.Settings.Default["cb7"] = comboBox7.SelectedIndex;
Properties.Settings.Default["cb8"] = comboBox8.SelectedIndex;
Properties.Settings.Default["cb9"] = comboBox9.SelectedIndex;
Properties.Settings.Default["cb10"] = comboBox10.SelectedIndex;
Properties.Settings.Default["check1"] = checkBox1.Checked;
Properties.Settings.Default["check2"] = checkBox2.Checked;
Properties.Settings.Default["check3"] = checkBox3.Checked;
Properties.Settings.Default["check4"] = checkBox4.Checked;
Properties.Settings.Default["check5"] = checkBox5.Checked;
Properties.Settings.Default["qual1"] = (int)numericUpDown1.Value;
Properties.Settings.Default["qual2"] = (int)numericUpDown2.Value;
Properties.Settings.Default["qual3"] = (int)numericUpDown3.Value;
Properties.Settings.Default["qual4"] = (int)numericUpDown4.Value;
Properties.Settings.Default["qual5"] = (int)numericUpDown5.Value;
Properties.Settings.Default["globalqual"] = (int)numericUpDown6.Value;
Properties.Settings.Default.Save();
Flask f1 = new Flask(checkBox1.Checked, (Flask.Name)comboBox6.SelectedValue, (Keys)comboBox1.SelectedItem, (int)numericUpDown1.Value);
Flask f2 = new Flask(checkBox1.Checked, (Flask.Name)comboBox7.SelectedValue, (Keys)comboBox2.SelectedItem, (int)numericUpDown2.Value);
Flask f3 = new Flask(checkBox1.Checked, (Flask.Name)comboBox8.SelectedValue, (Keys)comboBox3.SelectedItem, (int)numericUpDown3.Value);
Flask f4 = new Flask(checkBox1.Checked, (Flask.Name)comboBox9.SelectedValue, (Keys)comboBox4.SelectedItem, (int)numericUpDown4.Value);
Flask f5 = new Flask(checkBox1.Checked, (Flask.Name)comboBox10.SelectedValue, (Keys)comboBox5.SelectedItem, (int)numericUpDown5.Value);

Flasks.Add(f1);
Flasks.Add(f2);
Flasks.Add(f3);
Flasks.Add(f4);
Flasks.Add(f5);
f = new Form1(Flasks, (int)numericUpDown6.Value);
f.Show();
running = true;


}
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{

}
private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
{

}
private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
{

}
private void comboBox4_SelectedIndexChanged(object sender, EventArgs e)
{

}
private void comboBox5_SelectedIndexChanged(object sender, EventArgs e)
{

}
private void comboBox6_SelectedIndexChanged(object sender, EventArgs e)
{

}
private void comboBox7_SelectedIndexChanged(object sender, EventArgs e)
{

}
private void comboBox8_SelectedIndexChanged(object sender, EventArgs e)
{

}
private void comboBox9_SelectedIndexChanged(object sender, EventArgs e)
{

}
private void comboBox10_SelectedIndexChanged(object sender, EventArgs e)
{

}

private void button2_Click(object sender, EventArgs e)
{
f.Close();
}

private void button3_Click(object sender, EventArgs e)
{
if (f != null)
{
f.Close();
f = new Form1(Flasks, (int)numericUpDown6.Value);
f.Show();
}
}
}
}
120 changes: 120 additions & 0 deletions Form2.resx
Original file line number Diff line number Diff line change
@@ -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>
6 changes: 3 additions & 3 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Flask f3 = new Flask(true, Flask.Name.Atziris_Promise, Keys.D9, 0);
/* Flask f3 = new Flask(true, Flask.Name.Atziris_Promise, Keys.D9, 0);
Flask f4 = new Flask(true, Flask.Name.Atziris_Promise, Keys.D9, 0);
Flask f = new Flask(true, Flask.Name.Atziris_Promise, Keys.D3, 0);
List<Flask> Flasks = new List<Flask>();
Flasks.Add(f3);
Flasks.Add(f4);
Flasks.Add(f);
Flask f2 = new Flask(true, Flask.Name.Lions_Roar, Keys.D4, 0);
Flasks.Add(f2);
Application.Run(new Form1(Flasks,0));
Flasks.Add(f2);*/
Application.Run(new Form2());
}
}
}
28 changes: 28 additions & 0 deletions Settings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
namespace External_Overlay.Properties {


// This class allows you to handle specific events on the settings class:
// The SettingChanging event is raised before a setting's value is changed.
// The PropertyChanged event is raised after a setting's value is changed.
// The SettingsLoaded event is raised after the setting values are loaded.
// The SettingsSaving event is raised before the setting values are saved.
internal sealed partial class Settings {

public Settings() {
// // To add event handlers for saving and changing settings, uncomment the lines below:
//
// this.SettingChanging += this.SettingChangingEventHandler;
//
// this.SettingsSaving += this.SettingsSavingEventHandler;
//
}

private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) {
// Add code to handle the SettingChangingEvent event here.
}

private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) {
// Add code to handle the SettingsSaving event here.
}
}
}
Binary file modified bin/Debug/External Overlay.exe
Binary file not shown.
Binary file modified bin/Debug/External Overlay.pdb
Binary file not shown.
Binary file modified obj/Debug/DesignTimeResolveAssemblyReferences.cache
Binary file not shown.
Binary file modified obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
Binary file not shown.
2 changes: 2 additions & 0 deletions obj/Debug/External Overlay.csproj.FileListAbsolute.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,5 @@ C:\Users\jfouts\Documents\Visual Studio 2015\Projects\PoEFlasks\obj\Debug\Extern
C:\Users\jfouts\Documents\Visual Studio 2015\Projects\PoEFlasks\obj\Debug\External Overlay.csproj.GenerateResource.Cache
C:\Users\John\Documents\Visual Studio 2015\Projects\PoEFlasks\bin\Debug\MouseKeyboardActivityMonitor.dll
C:\Users\John\Documents\Visual Studio 2015\Projects\PoEFlasks\bin\Debug\MouseKeyboardActivityMonitor.xml
C:\Users\jfouts\Documents\Visual Studio 2015\Projects\PoEFlasks\bin\Debug\MouseKeyboardActivityMonitor.dll
C:\Users\jfouts\Documents\Visual Studio 2015\Projects\PoEFlasks\bin\Debug\MouseKeyboardActivityMonitor.xml
Binary file modified obj/Debug/External Overlay.csproj.GenerateResource.Cache
Binary file not shown.
Binary file modified obj/Debug/External Overlay.csprojResolveAssemblyReference.cache
Binary file not shown.
Binary file modified obj/Debug/External Overlay.exe
Binary file not shown.
Binary file modified obj/Debug/External Overlay.pdb
Binary file not shown.
Binary file added obj/Debug/External_Overlay.Form2.resources
Binary file not shown.

0 comments on commit 950c44a

Please sign in to comment.