-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
John Fouts
committed
Aug 30, 2016
1 parent
c0dc591
commit 950c44a
Showing
18 changed files
with
777 additions
and
3 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file modified
BIN
+20.5 KB
(150%)
obj/Debug/External Overlay.csprojResolveAssemblyReference.cache
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.