mirror of
https://git.alee14.me/shiftos-archive/ShiftOS_TheReturn.git
synced 2025-01-23 02:12:14 +00:00
commit
41ea4a927c
3 changed files with 82 additions and 10 deletions
12
ShiftOS.WinForms/Applications/Calculator.Designer.cs
generated
12
ShiftOS.WinForms/Applications/Calculator.Designer.cs
generated
|
@ -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();
|
||||
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -719,6 +719,26 @@
|
|||
Cost: 2500,
|
||||
Dependencies: "shiftorium_gui",
|
||||
Description: "In the shiftorium GUI but dont know what you can spend because you can't see how many code points are on hand? Well shop easy, because with this upgrade that is now possible! You have to restart the shiftorium for it to work."
|
||||
}
|
||||
},
|
||||
|
||||
// CALCULATOR UPGRADES
|
||||
{
|
||||
Name: "Calculator",
|
||||
Cost: 1000,
|
||||
Dependencies: "wm_free_placement;desktop",
|
||||
Description: "Crazy math problems getting you down? Well, this calculator will take care of that!"
|
||||
},
|
||||
{
|
||||
Name: "AL Calculator",
|
||||
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!"
|
||||
}
|
||||
|
||||
]
|
Loading…
Reference in a new issue