aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlempamo <[email protected]>2017-02-24 20:12:14 -0500
committerlempamo <[email protected]>2017-02-24 20:12:14 -0500
commit4ff53eb4a271ee7ee3bc52674a29fb6b2d07e275 (patch)
treef77c9a3a5ab9b1237b404c8f0c0e08c166aa4a70
parented008c1898ec9dc48d40ad8e6219e4af0e3a31b6 (diff)
downloadshiftos_thereturn-4ff53eb4a271ee7ee3bc52674a29fb6b2d07e275.tar.gz
shiftos_thereturn-4ff53eb4a271ee7ee3bc52674a29fb6b2d07e275.tar.bz2
shiftos_thereturn-4ff53eb4a271ee7ee3bc52674a29fb6b2d07e275.zip
Get started on Calculator
-rw-r--r--ShiftOS.WinForms/Applications/Calculator.Designer.cs58
-rw-r--r--ShiftOS.WinForms/Applications/Calculator.cs52
-rw-r--r--ShiftOS.WinForms/Applications/Calculator.resx123
-rw-r--r--ShiftOS_TheReturn/Resources/Shiftorium.txt16
4 files changed, 248 insertions, 1 deletions
diff --git a/ShiftOS.WinForms/Applications/Calculator.Designer.cs b/ShiftOS.WinForms/Applications/Calculator.Designer.cs
new file mode 100644
index 0000000..4347aa6
--- /dev/null
+++ b/ShiftOS.WinForms/Applications/Calculator.Designer.cs
@@ -0,0 +1,58 @@
+namespace ShiftOS.WinForms.Applications
+{
+ partial class Calculator
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.numBox = new System.Windows.Forms.TextBox();
+ this.SuspendLayout();
+ //
+ // numBox
+ //
+ 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.Size = new System.Drawing.Size(143, 30);
+ this.numBox.TabIndex = 0;
+ //
+ // Calculator
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.numBox);
+ this.Name = "Calculator";
+ this.Load += new System.EventHandler(this.Template_Load);
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.TextBox numBox;
+ }
+}
diff --git a/ShiftOS.WinForms/Applications/Calculator.cs b/ShiftOS.WinForms/Applications/Calculator.cs
new file mode 100644
index 0000000..cc34769
--- /dev/null
+++ b/ShiftOS.WinForms/Applications/Calculator.cs
@@ -0,0 +1,52 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using ShiftOS.Engine;
+
+namespace ShiftOS.WinForms.Applications
+{
+ [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)
+ {
+ justopened = true;
+ }
+
+ public void OnLoad()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void OnSkinLoad()
+ {
+ throw new NotImplementedException();
+ }
+
+ public bool OnUnload()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void OnUpgrade()
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/ShiftOS.WinForms/Applications/Calculator.resx b/ShiftOS.WinForms/Applications/Calculator.resx
new file mode 100644
index 0000000..61bc649
--- /dev/null
+++ b/ShiftOS.WinForms/Applications/Calculator.resx
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <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_TheReturn/Resources/Shiftorium.txt b/ShiftOS_TheReturn/Resources/Shiftorium.txt
index 32c0514..ec0a36d 100644
--- a/ShiftOS_TheReturn/Resources/Shiftorium.txt
+++ b/ShiftOS_TheReturn/Resources/Shiftorium.txt
@@ -594,6 +594,20 @@
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!"
+ }
]