aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael VanOverbeek <[email protected]>2017-02-25 10:04:11 -0500
committerGitHub <[email protected]>2017-02-25 10:04:11 -0500
commit413a7da898716d43711dcfe99791b329bb6d866b (patch)
treee8c14c7cfbc192d2e0cf60e3faef32d24b86ba0c
parent910a1c455e0176bfff7776e47f9160e349cfaf67 (diff)
parent271c973c3f1de0afd96a4ad3d0e0ed43b5e1b4f8 (diff)
downloadshiftos_thereturn-413a7da898716d43711dcfe99791b329bb6d866b.tar.gz
shiftos_thereturn-413a7da898716d43711dcfe99791b329bb6d866b.tar.bz2
shiftos_thereturn-413a7da898716d43711dcfe99791b329bb6d866b.zip
Merge pull request #89 from lempamo/master
Calc stuffs 2
-rw-r--r--ShiftOS.WinForms/Applications/Calculator.Designer.cs136
-rw-r--r--ShiftOS.WinForms/Applications/Calculator.cs12
-rw-r--r--ShiftOS.WinForms/Applications/Calculator.resx3
-rw-r--r--ShiftOS.WinForms/ShiftOS.WinForms.csproj9
-rw-r--r--ShiftOS_TheReturn/Resources/Shiftorium.txt8
5 files changed, 164 insertions, 4 deletions
diff --git a/ShiftOS.WinForms/Applications/Calculator.Designer.cs b/ShiftOS.WinForms/Applications/Calculator.Designer.cs
index 4a72cbf..d505e1a 100644
--- a/ShiftOS.WinForms/Applications/Calculator.Designer.cs
+++ b/ShiftOS.WinForms/Applications/Calculator.Designer.cs
@@ -53,22 +53,147 @@ namespace ShiftOS.WinForms.Applications
private void InitializeComponent()
{
this.numBox = new System.Windows.Forms.TextBox();
+ this.button1 = new System.Windows.Forms.Button();
+ this.button2 = new System.Windows.Forms.Button();
+ this.button3 = new System.Windows.Forms.Button();
+ this.button4 = new System.Windows.Forms.Button();
+ this.button5 = new System.Windows.Forms.Button();
+ this.button6 = new System.Windows.Forms.Button();
+ this.button7 = new System.Windows.Forms.Button();
+ this.button8 = new System.Windows.Forms.Button();
+ this.button9 = new System.Windows.Forms.Button();
+ this.button10 = new System.Windows.Forms.Button();
+ this.buttonEquals = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// numBox
//
+ this.numBox.BackColor = System.Drawing.SystemColors.Window;
this.numBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.numBox.Location = new System.Drawing.Point(4, 3);
this.numBox.Name = "numBox";
+ this.numBox.ReadOnly = true;
this.numBox.Size = new System.Drawing.Size(143, 30);
this.numBox.TabIndex = 0;
//
+ // button1
+ //
+ this.button1.Location = new System.Drawing.Point(4, 39);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(22, 22);
+ this.button1.TabIndex = 2;
+ this.button1.Text = "1";
+ this.button1.UseVisualStyleBackColor = true;
+ this.button1.Click += new System.EventHandler(this.button1_Click);
+ //
+ // button2
+ //
+ this.button2.Location = new System.Drawing.Point(32, 39);
+ this.button2.Name = "button2";
+ this.button2.Size = new System.Drawing.Size(22, 22);
+ this.button2.TabIndex = 3;
+ this.button2.Text = "2";
+ this.button2.UseVisualStyleBackColor = true;
+ //
+ // button3
+ //
+ this.button3.Location = new System.Drawing.Point(60, 39);
+ this.button3.Name = "button3";
+ this.button3.Size = new System.Drawing.Size(22, 22);
+ this.button3.TabIndex = 4;
+ this.button3.Text = "3";
+ this.button3.UseVisualStyleBackColor = true;
+ //
+ // button4
+ //
+ this.button4.Location = new System.Drawing.Point(4, 67);
+ this.button4.Name = "button4";
+ this.button4.Size = new System.Drawing.Size(22, 22);
+ this.button4.TabIndex = 5;
+ this.button4.Text = "4";
+ this.button4.UseVisualStyleBackColor = true;
+ //
+ // button5
+ //
+ this.button5.Location = new System.Drawing.Point(32, 67);
+ this.button5.Name = "button5";
+ this.button5.Size = new System.Drawing.Size(22, 22);
+ this.button5.TabIndex = 6;
+ this.button5.Text = "5";
+ this.button5.UseVisualStyleBackColor = true;
+ //
+ // button6
+ //
+ this.button6.Location = new System.Drawing.Point(60, 67);
+ this.button6.Name = "button6";
+ this.button6.Size = new System.Drawing.Size(22, 22);
+ this.button6.TabIndex = 7;
+ this.button6.Text = "6";
+ this.button6.UseVisualStyleBackColor = true;
+ //
+ // button7
+ //
+ this.button7.Location = new System.Drawing.Point(4, 95);
+ this.button7.Name = "button7";
+ this.button7.Size = new System.Drawing.Size(22, 22);
+ this.button7.TabIndex = 8;
+ this.button7.Text = "7";
+ this.button7.UseVisualStyleBackColor = true;
+ //
+ // button8
+ //
+ this.button8.Location = new System.Drawing.Point(32, 95);
+ this.button8.Name = "button8";
+ this.button8.Size = new System.Drawing.Size(22, 22);
+ this.button8.TabIndex = 9;
+ this.button8.Text = "8";
+ this.button8.UseVisualStyleBackColor = true;
+ //
+ // button9
+ //
+ this.button9.Location = new System.Drawing.Point(60, 95);
+ this.button9.Name = "button9";
+ this.button9.Size = new System.Drawing.Size(22, 22);
+ this.button9.TabIndex = 10;
+ this.button9.Text = "9";
+ this.button9.UseVisualStyleBackColor = true;
+ //
+ // button10
+ //
+ this.button10.Location = new System.Drawing.Point(4, 123);
+ this.button10.Name = "button10";
+ this.button10.Size = new System.Drawing.Size(22, 22);
+ this.button10.TabIndex = 11;
+ this.button10.Text = "0";
+ this.button10.UseVisualStyleBackColor = true;
+ //
+ // buttonEquals
+ //
+ this.buttonEquals.Location = new System.Drawing.Point(60, 123);
+ this.buttonEquals.Name = "buttonEquals";
+ this.buttonEquals.Size = new System.Drawing.Size(22, 22);
+ this.buttonEquals.TabIndex = 12;
+ this.buttonEquals.Text = "=";
+ this.buttonEquals.UseVisualStyleBackColor = true;
+ //
// Calculator
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.buttonEquals);
+ this.Controls.Add(this.button10);
+ this.Controls.Add(this.button9);
+ this.Controls.Add(this.button8);
+ this.Controls.Add(this.button7);
+ this.Controls.Add(this.button6);
+ this.Controls.Add(this.button5);
+ this.Controls.Add(this.button4);
+ this.Controls.Add(this.button3);
+ this.Controls.Add(this.button2);
+ this.Controls.Add(this.button1);
this.Controls.Add(this.numBox);
this.Name = "Calculator";
+ this.Size = new System.Drawing.Size(150, 149);
this.Load += new System.EventHandler(this.Template_Load);
this.ResumeLayout(false);
this.PerformLayout();
@@ -78,5 +203,16 @@ namespace ShiftOS.WinForms.Applications
#endregion
private System.Windows.Forms.TextBox numBox;
+ private System.Windows.Forms.Button button1;
+ private System.Windows.Forms.Button button2;
+ private System.Windows.Forms.Button button3;
+ private System.Windows.Forms.Button button4;
+ private System.Windows.Forms.Button button5;
+ private System.Windows.Forms.Button button6;
+ private System.Windows.Forms.Button button7;
+ private System.Windows.Forms.Button button8;
+ private System.Windows.Forms.Button button9;
+ private System.Windows.Forms.Button button10;
+ private System.Windows.Forms.Button buttonEquals;
}
}
diff --git a/ShiftOS.WinForms/Applications/Calculator.cs b/ShiftOS.WinForms/Applications/Calculator.cs
index 9cbbd0b..ac09567 100644
--- a/ShiftOS.WinForms/Applications/Calculator.cs
+++ b/ShiftOS.WinForms/Applications/Calculator.cs
@@ -51,6 +51,13 @@ namespace ShiftOS.WinForms.Applications
private void Template_Load(object sender, EventArgs e)
{
justopened = true;
+
+ prepareButtons();
+ }
+
+ private void prepareButtons()
+ {
+ if (!ShiftoriumFrontend.UpgradeInstalled("calc_equals_button")) buttonEquals.Visible = false;
}
public void OnLoad()
@@ -72,5 +79,10 @@ namespace ShiftOS.WinForms.Applications
{
throw new NotImplementedException();
}
+
+ private void button1_Click(object sender, EventArgs e)
+ {
+ numBox.Text = "" + "1";
+ }
}
}
diff --git a/ShiftOS.WinForms/Applications/Calculator.resx b/ShiftOS.WinForms/Applications/Calculator.resx
index 61bc649..1af7de1 100644
--- a/ShiftOS.WinForms/Applications/Calculator.resx
+++ b/ShiftOS.WinForms/Applications/Calculator.resx
@@ -117,7 +117,4 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
- <metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
</root> \ No newline at end of file
diff --git a/ShiftOS.WinForms/ShiftOS.WinForms.csproj b/ShiftOS.WinForms/ShiftOS.WinForms.csproj
index dac8c73..8ea1a04 100644
--- a/ShiftOS.WinForms/ShiftOS.WinForms.csproj
+++ b/ShiftOS.WinForms/ShiftOS.WinForms.csproj
@@ -64,6 +64,12 @@
<Compile Include="Applications\Artpad.Designer.cs">
<DependentUpon>Artpad.cs</DependentUpon>
</Compile>
+ <Compile Include="Applications\Calculator.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="Applications\Calculator.Designer.cs">
+ <DependentUpon>Calculator.cs</DependentUpon>
+ </Compile>
<Compile Include="Applications\Chat.cs">
<SubType>UserControl</SubType>
</Compile>
@@ -253,6 +259,9 @@
<EmbeddedResource Include="Applications\Artpad.resx">
<DependentUpon>Artpad.cs</DependentUpon>
</EmbeddedResource>
+ <EmbeddedResource Include="Applications\Calculator.resx">
+ <DependentUpon>Calculator.cs</DependentUpon>
+ </EmbeddedResource>
<EmbeddedResource Include="Applications\Chat.resx">
<DependentUpon>Chat.cs</DependentUpon>
</EmbeddedResource>
diff --git a/ShiftOS_TheReturn/Resources/Shiftorium.txt b/ShiftOS_TheReturn/Resources/Shiftorium.txt
index ec0a36d..d5951dc 100644
--- a/ShiftOS_TheReturn/Resources/Shiftorium.txt
+++ b/ShiftOS_TheReturn/Resources/Shiftorium.txt
@@ -601,7 +601,7 @@
{
Name: "Calculator",
Cost: 1000,
- Dependencies: "wm_free_placement; desktop",
+ Dependencies: "wm_free_placement;desktop",
Description: "Crazy math problems getting you down? Well, this calculator will take care of that!"
},
{
@@ -609,5 +609,11 @@
Cost: 350,
Dependencies: "calculator;app_launcher",
Description: "Add an App Launcher Entry for the Calculator!"
+ },
+ {
+ Name: "Calc Equals Button",
+ Cost: 600,
+ Dependencies: "calculator",
+ Description: "Right now, you can only type numbers, but this equals button opens the door to solving equations!"
}
]