aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms/Applications
diff options
context:
space:
mode:
authorAren <[email protected]>2017-02-25 16:49:43 +0100
committerAren <[email protected]>2017-02-25 16:49:43 +0100
commit9b3303c2d53a241ddf1691f1f95070181e92cac8 (patch)
tree613abf0458370430e136a054bf9a62ebc02c4ec2 /ShiftOS.WinForms/Applications
parent57e955e3d4e4c2b9685ad6eba360aec338bf2910 (diff)
parent41ea4a927c9c397a43cfc3d0f987bfac1ebc7eae (diff)
downloadshiftos_thereturn-9b3303c2d53a241ddf1691f1f95070181e92cac8.tar.gz
shiftos_thereturn-9b3303c2d53a241ddf1691f1f95070181e92cac8.tar.bz2
shiftos_thereturn-9b3303c2d53a241ddf1691f1f95070181e92cac8.zip
Merge branch 'master' of https://github.com/shiftos-game/shiftos
Diffstat (limited to 'ShiftOS.WinForms/Applications')
-rw-r--r--ShiftOS.WinForms/Applications/Calculator.Designer.cs12
-rw-r--r--ShiftOS.WinForms/Applications/Calculator.cs58
2 files changed, 61 insertions, 9 deletions
diff --git a/ShiftOS.WinForms/Applications/Calculator.Designer.cs b/ShiftOS.WinForms/Applications/Calculator.Designer.cs
index d505e1a..c97c754 100644
--- a/ShiftOS.WinForms/Applications/Calculator.Designer.cs
+++ b/ShiftOS.WinForms/Applications/Calculator.Designer.cs
@@ -94,6 +94,7 @@ namespace ShiftOS.WinForms.Applications
this.button2.TabIndex = 3;
this.button2.Text = "2";
this.button2.UseVisualStyleBackColor = true;
+ this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button3
//
@@ -103,6 +104,7 @@ namespace ShiftOS.WinForms.Applications
this.button3.TabIndex = 4;
this.button3.Text = "3";
this.button3.UseVisualStyleBackColor = true;
+ this.button3.Click += new System.EventHandler(this.button3_Click);
//
// button4
//
@@ -112,6 +114,7 @@ namespace ShiftOS.WinForms.Applications
this.button4.TabIndex = 5;
this.button4.Text = "4";
this.button4.UseVisualStyleBackColor = true;
+ this.button4.Click += new System.EventHandler(this.button4_Click);
//
// button5
//
@@ -121,6 +124,7 @@ namespace ShiftOS.WinForms.Applications
this.button5.TabIndex = 6;
this.button5.Text = "5";
this.button5.UseVisualStyleBackColor = true;
+ this.button5.Click += new System.EventHandler(this.button5_Click);
//
// button6
//
@@ -130,6 +134,7 @@ namespace ShiftOS.WinForms.Applications
this.button6.TabIndex = 7;
this.button6.Text = "6";
this.button6.UseVisualStyleBackColor = true;
+ this.button6.Click += new System.EventHandler(this.button6_Click);
//
// button7
//
@@ -139,6 +144,7 @@ namespace ShiftOS.WinForms.Applications
this.button7.TabIndex = 8;
this.button7.Text = "7";
this.button7.UseVisualStyleBackColor = true;
+ this.button7.Click += new System.EventHandler(this.button7_Click);
//
// button8
//
@@ -148,6 +154,7 @@ namespace ShiftOS.WinForms.Applications
this.button8.TabIndex = 9;
this.button8.Text = "8";
this.button8.UseVisualStyleBackColor = true;
+ this.button8.Click += new System.EventHandler(this.button8_Click);
//
// button9
//
@@ -157,6 +164,7 @@ namespace ShiftOS.WinForms.Applications
this.button9.TabIndex = 10;
this.button9.Text = "9";
this.button9.UseVisualStyleBackColor = true;
+ this.button9.Click += new System.EventHandler(this.button9_Click);
//
// button10
//
@@ -166,6 +174,7 @@ namespace ShiftOS.WinForms.Applications
this.button10.TabIndex = 11;
this.button10.Text = "0";
this.button10.UseVisualStyleBackColor = true;
+ this.button10.Click += new System.EventHandler(this.button10_Click);
//
// buttonEquals
//
@@ -193,8 +202,7 @@ namespace ShiftOS.WinForms.Applications
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.Size = new System.Drawing.Size(171, 176);
this.ResumeLayout(false);
this.PerformLayout();
diff --git a/ShiftOS.WinForms/Applications/Calculator.cs b/ShiftOS.WinForms/Applications/Calculator.cs
index 66b959c..eb2df29 100644
--- a/ShiftOS.WinForms/Applications/Calculator.cs
+++ b/ShiftOS.WinForms/Applications/Calculator.cs
@@ -35,24 +35,22 @@ using ShiftOS.Engine;
namespace ShiftOS.WinForms.Applications
{
- [Launcher("Calculator", false, null, "Accessories")]
+ [Launcher("Calculator", true, "al_calculator", "Accessories")]
[RequiresUpgrade("calculator")]
[WinOpen("calculator")]
[DefaultIcon("iconCalculator")]
public partial class Calculator : UserControl, IShiftOSWindow
{
+ public bool justopened = false;
+
public Calculator()
{
InitializeComponent();
}
- private void Template_Load(object sender, EventArgs e)
- {
- }
-
private void prepareButtons()
{
- buttonEquals.Visible = Shiftorium.UpgradeInstalled("calc_equals_button");
+ buttonEquals.Visible = ShiftoriumFrontend.UpgradeInstalled("calc_equals_button");
}
public void OnLoad()
@@ -62,6 +60,7 @@ namespace ShiftOS.WinForms.Applications
public void OnSkinLoad()
{
+
}
public bool OnUnload()
@@ -76,7 +75,52 @@ namespace ShiftOS.WinForms.Applications
private void button1_Click(object sender, EventArgs e)
{
- numBox.Text = "1";
+ numBox.Text = numBox.Text + "1";
+ }
+
+ private void button2_Click(object sender, EventArgs e)
+ {
+ numBox.Text = numBox.Text + "2";
+ }
+
+ private void button3_Click(object sender, EventArgs e)
+ {
+ numBox.Text = numBox.Text + "3";
+ }
+
+ private void button4_Click(object sender, EventArgs e)
+ {
+ numBox.Text = numBox.Text + "4";
+ }
+
+ private void button5_Click(object sender, EventArgs e)
+ {
+ numBox.Text = numBox.Text + "5";
+ }
+
+ private void button6_Click(object sender, EventArgs e)
+ {
+ numBox.Text = numBox.Text + "6";
+ }
+
+ private void button7_Click(object sender, EventArgs e)
+ {
+ numBox.Text = numBox.Text + "7";
+ }
+
+ private void button8_Click(object sender, EventArgs e)
+ {
+ numBox.Text = numBox.Text + "8";
+ }
+
+ private void button9_Click(object sender, EventArgs e)
+ {
+ numBox.Text = numBox.Text + "9";
+ }
+
+ private void button10_Click(object sender, EventArgs e)
+ {
+ numBox.Text = numBox.Text + "0";
}
}
}