Calculator stuffs 2
This commit is contained in:
parent
cc4b3c6f09
commit
3e5498e2f9
5 changed files with 164 additions and 4 deletions
136
ShiftOS.WinForms/Applications/Calculator.Designer.cs
generated
136
ShiftOS.WinForms/Applications/Calculator.Designer.cs
generated
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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>
|
|
@ -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>
|
||||
|
@ -247,6 +253,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>
|
||||
|
|
|
@ -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!"
|
||||
}
|
||||
]
|
||||
|
|
Reference in a new issue