aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms
diff options
context:
space:
mode:
Diffstat (limited to 'ShiftOS.WinForms')
-rw-r--r--ShiftOS.WinForms/Applications/Calculator.Designer.cs2
-rw-r--r--ShiftOS.WinForms/Applications/Calculator.cs16
-rw-r--r--ShiftOS.WinForms/Resources/Shiftorium.txt22
3 files changed, 33 insertions, 7 deletions
diff --git a/ShiftOS.WinForms/Applications/Calculator.Designer.cs b/ShiftOS.WinForms/Applications/Calculator.Designer.cs
index d505e1a..f7a6e52 100644
--- a/ShiftOS.WinForms/Applications/Calculator.Designer.cs
+++ b/ShiftOS.WinForms/Applications/Calculator.Designer.cs
@@ -193,7 +193,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.Size = new System.Drawing.Size(186, 190);
this.Load += new System.EventHandler(this.Template_Load);
this.ResumeLayout(false);
this.PerformLayout();
diff --git a/ShiftOS.WinForms/Applications/Calculator.cs b/ShiftOS.WinForms/Applications/Calculator.cs
index 66b959c..f7eed4a 100644
--- a/ShiftOS.WinForms/Applications/Calculator.cs
+++ b/ShiftOS.WinForms/Applications/Calculator.cs
@@ -35,12 +35,14 @@ 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();
@@ -48,20 +50,24 @@ namespace ShiftOS.WinForms.Applications
private void Template_Load(object sender, EventArgs e)
{
+ justopened = true;
+
+ prepareButtons();
}
private void prepareButtons()
{
- buttonEquals.Visible = Shiftorium.UpgradeInstalled("calc_equals_button");
+ if (!ShiftoriumFrontend.UpgradeInstalled("calc_equals_button")) buttonEquals.Visible = false;
}
public void OnLoad()
{
- prepareButtons();
+
}
public void OnSkinLoad()
{
+
}
public bool OnUnload()
@@ -71,12 +77,12 @@ namespace ShiftOS.WinForms.Applications
public void OnUpgrade()
{
- prepareButtons();
+ throw new NotImplementedException();
}
private void button1_Click(object sender, EventArgs e)
{
- numBox.Text = "1";
+ numBox.Text = numBox.Text + "1";
}
}
}
diff --git a/ShiftOS.WinForms/Resources/Shiftorium.txt b/ShiftOS.WinForms/Resources/Shiftorium.txt
index 7635ec6..8d2e199 100644
--- a/ShiftOS.WinForms/Resources/Shiftorium.txt
+++ b/ShiftOS.WinForms/Resources/Shiftorium.txt
@@ -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!"
+ }
] \ No newline at end of file