aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms/Applications
diff options
context:
space:
mode:
Diffstat (limited to 'ShiftOS.WinForms/Applications')
-rw-r--r--ShiftOS.WinForms/Applications/Artpad.cs1
-rw-r--r--ShiftOS.WinForms/Applications/Chat.cs1
-rw-r--r--ShiftOS.WinForms/Applications/Dialog.cs6
-rw-r--r--ShiftOS.WinForms/Applications/Downloader.cs1
-rw-r--r--ShiftOS.WinForms/Applications/FormatEditor.cs1
-rw-r--r--ShiftOS.WinForms/Applications/GraphicPicker.cs1
-rw-r--r--ShiftOS.WinForms/Applications/MUDControlCentre.cs1
-rw-r--r--ShiftOS.WinForms/Applications/NameChanger.cs1
-rw-r--r--ShiftOS.WinForms/Applications/Pong.cs1
-rw-r--r--ShiftOS.WinForms/Applications/ShiftLetters.cs6
-rw-r--r--ShiftOS.WinForms/Applications/ShiftLotto.Designer.cs231
-rw-r--r--ShiftOS.WinForms/Applications/ShiftLotto.cs134
-rw-r--r--ShiftOS.WinForms/Applications/ShiftLotto.resx128
-rw-r--r--ShiftOS.WinForms/Applications/ShiftSweeper.cs1
-rw-r--r--ShiftOS.WinForms/Applications/Shifter.cs28
-rw-r--r--ShiftOS.WinForms/Applications/Shiftnet.cs8
-rw-r--r--ShiftOS.WinForms/Applications/ShiftoriumFrontend.cs1
-rw-r--r--ShiftOS.WinForms/Applications/Terminal.cs29
-rw-r--r--ShiftOS.WinForms/Applications/TutorialBox.cs3
19 files changed, 564 insertions, 19 deletions
diff --git a/ShiftOS.WinForms/Applications/Artpad.cs b/ShiftOS.WinForms/Applications/Artpad.cs
index 6c1bc1c..71f7afb 100644
--- a/ShiftOS.WinForms/Applications/Artpad.cs
+++ b/ShiftOS.WinForms/Applications/Artpad.cs
@@ -41,6 +41,7 @@ using ShiftOS.Engine;
namespace ShiftOS.WinForms.Applications
{
+ [MultiplayerOnly]
[Launcher("Artpad", true, "al_artpad", "Graphics")]
[RequiresUpgrade("artpad")]
[WinOpen("artpad")]
diff --git a/ShiftOS.WinForms/Applications/Chat.cs b/ShiftOS.WinForms/Applications/Chat.cs
index 06a7873..caf8cd2 100644
--- a/ShiftOS.WinForms/Applications/Chat.cs
+++ b/ShiftOS.WinForms/Applications/Chat.cs
@@ -36,6 +36,7 @@ using ShiftOS.Engine;
namespace ShiftOS.WinForms.Applications
{
+ [MultiplayerOnly]
public partial class Chat : UserControl, IShiftOSWindow
{
public Chat(string chatId)
diff --git a/ShiftOS.WinForms/Applications/Dialog.cs b/ShiftOS.WinForms/Applications/Dialog.cs
index 26e3040..11fbf1e 100644
--- a/ShiftOS.WinForms/Applications/Dialog.cs
+++ b/ShiftOS.WinForms/Applications/Dialog.cs
@@ -76,12 +76,16 @@ namespace ShiftOS.WinForms.Applications
btnok.Click += (o, a) =>
{
AppearanceManager.Close(this);
+ OpenCallback?.Invoke();
};
}
- public void Open(string title, string msg)
+ private Action OpenCallback = null;
+
+ public void Open(string title, string msg, Action c = null)
{
+ OpenCallback = c;
new Dialog().OpenInternal(title, msg);
}
diff --git a/ShiftOS.WinForms/Applications/Downloader.cs b/ShiftOS.WinForms/Applications/Downloader.cs
index da90c6d..1f240bf 100644
--- a/ShiftOS.WinForms/Applications/Downloader.cs
+++ b/ShiftOS.WinForms/Applications/Downloader.cs
@@ -41,6 +41,7 @@ using System.IO.Compression;
namespace ShiftOS.WinForms.Applications
{
+ [MultiplayerOnly]
[Launcher("Downloader", false, null, "Networking")]
[DefaultIcon("iconDownloader")]
public partial class Downloader : UserControl, IShiftOSWindow
diff --git a/ShiftOS.WinForms/Applications/FormatEditor.cs b/ShiftOS.WinForms/Applications/FormatEditor.cs
index bf5e78c..c5afc02 100644
--- a/ShiftOS.WinForms/Applications/FormatEditor.cs
+++ b/ShiftOS.WinForms/Applications/FormatEditor.cs
@@ -34,6 +34,7 @@ using System.Windows.Forms;
using ShiftOS.Engine;
namespace ShiftOS.WinForms.Applications {
+ [MultiplayerOnly]
[Launcher("FormatEditor", true, "al_format_editor", "Games")]
[RequiresUpgrade("format_editor")]
[WinOpen("formateditor")]
diff --git a/ShiftOS.WinForms/Applications/GraphicPicker.cs b/ShiftOS.WinForms/Applications/GraphicPicker.cs
index 2dfe7ec..b3dd8bf 100644
--- a/ShiftOS.WinForms/Applications/GraphicPicker.cs
+++ b/ShiftOS.WinForms/Applications/GraphicPicker.cs
@@ -37,6 +37,7 @@ using ShiftOS.WinForms.Tools;
namespace ShiftOS.WinForms.Applications
{
+ [MultiplayerOnly]
[DefaultTitle("Choose graphic")] [DefaultIcon("icongraphicpicker")]
public partial class GraphicPicker : UserControl, IShiftOSWindow
{
diff --git a/ShiftOS.WinForms/Applications/MUDControlCentre.cs b/ShiftOS.WinForms/Applications/MUDControlCentre.cs
index 02fe868..e2668bd 100644
--- a/ShiftOS.WinForms/Applications/MUDControlCentre.cs
+++ b/ShiftOS.WinForms/Applications/MUDControlCentre.cs
@@ -38,6 +38,7 @@ using ShiftOS.WinForms.Tools;
namespace ShiftOS.WinForms.Applications
{
+ [MultiplayerOnly]
[RequiresUpgrade("mud_fundamentals")]
[Launcher("MUD Control Centre", true, "al_mud_control_centre", "Networking")]
[WinOpen("mud_control_centre")]
diff --git a/ShiftOS.WinForms/Applications/NameChanger.cs b/ShiftOS.WinForms/Applications/NameChanger.cs
index ca76e57..d7c99f7 100644
--- a/ShiftOS.WinForms/Applications/NameChanger.cs
+++ b/ShiftOS.WinForms/Applications/NameChanger.cs
@@ -38,6 +38,7 @@ using ShiftOS.WinForms.Tools;
namespace ShiftOS.WinForms.Applications {
+ [MultiplayerOnly]
[Launcher("Name Changer", true, "al_name_changer", "Customization")]
[RequiresUpgrade("name_changer")]
[WinOpen("name_changer")]
diff --git a/ShiftOS.WinForms/Applications/Pong.cs b/ShiftOS.WinForms/Applications/Pong.cs
index af1e156..157ce8c 100644
--- a/ShiftOS.WinForms/Applications/Pong.cs
+++ b/ShiftOS.WinForms/Applications/Pong.cs
@@ -37,6 +37,7 @@ using ShiftOS.Objects;
namespace ShiftOS.WinForms.Applications
{
+ [MultiplayerOnly]
[Launcher("Pong", true, "al_pong", "Games")]
[WinOpen("pong")]
[DefaultIcon("iconPong")]
diff --git a/ShiftOS.WinForms/Applications/ShiftLetters.cs b/ShiftOS.WinForms/Applications/ShiftLetters.cs
index f1c1d22..b5e9aa4 100644
--- a/ShiftOS.WinForms/Applications/ShiftLetters.cs
+++ b/ShiftOS.WinForms/Applications/ShiftLetters.cs
@@ -36,6 +36,7 @@ using System.Windows.Forms;
namespace ShiftOS.WinForms.Applications
{
+ [MultiplayerOnly]
[Launcher("ShiftLetters", false, null, "Games")]
[RequiresUpgrade("shiftletters")]
[WinOpen("shiftletters")]
@@ -50,7 +51,7 @@ namespace ShiftOS.WinForms.Applications
"shiftorium", "codepoints", "shiftletters", "shops", "mud", "notification", "namechanger",
"skinning", "skinloader", "calculator", "fileskimmer", "lua", "shiftnet", "terminal", "textpad"};
List<String> contributorsWordlist = new List<string> { "philipadams", "carverh", "computelinux", "lempamo",
- "wowmom", "michaeltheshifter", "arencclc", "therandommelon", "pfg", "craftxbox"};
+ "wowmom", "michaeltheshifter", "arencllc", "therandommelon", "pfg", "craftxbox", "ashifter"};
List<string> osWordlist = new List<string>
{
@@ -90,7 +91,8 @@ namespace ShiftOS.WinForms.Applications
"vienna",
"whistler",
"windowsxp",
- "windowsforworkgroups"
+ "windowsforworkgroups",
+ "shiftos"
};
public ShiftLetters()
diff --git a/ShiftOS.WinForms/Applications/ShiftLotto.Designer.cs b/ShiftOS.WinForms/Applications/ShiftLotto.Designer.cs
new file mode 100644
index 0000000..8b43636
--- /dev/null
+++ b/ShiftOS.WinForms/Applications/ShiftLotto.Designer.cs
@@ -0,0 +1,231 @@
+/*
+ * MIT License
+ *
+ * Copyright (c) 2017 Michael VanOverbeek and ShiftOS devs
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+namespace ShiftOS.WinForms.Applications
+{
+ partial class ShiftLotto
+ {
+ /// <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.components = new System.ComponentModel.Container();
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ShiftLotto));
+ this.label2 = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.label4 = new System.Windows.Forms.Label();
+ this.button1 = new System.Windows.Forms.Button();
+ this.label5 = new System.Windows.Forms.Label();
+ this.label6 = new System.Windows.Forms.Label();
+ this.cpUpDown = new System.Windows.Forms.NumericUpDown();
+ this.difUpDown = new System.Windows.Forms.NumericUpDown();
+ this.label1 = new System.Windows.Forms.Label();
+ this.timer1 = new System.Windows.Forms.Timer(this.components);
+ this.label7 = new System.Windows.Forms.Label();
+ ((System.ComponentModel.ISupportInitialize)(this.cpUpDown)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.difUpDown)).BeginInit();
+ this.SuspendLayout();
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.Location = new System.Drawing.Point(19, 49);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(376, 39);
+ this.label2.TabIndex = 2;
+ this.label2.Text = resources.GetString("label2.Text");
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(35, 122);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(60, 13);
+ this.label3.TabIndex = 3;
+ this.label3.Text = "Codepoints\r\n";
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.Location = new System.Drawing.Point(319, 122);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(47, 13);
+ this.label4.TabIndex = 4;
+ this.label4.Text = "Difficulty";
+ //
+ // button1
+ //
+ this.button1.Location = new System.Drawing.Point(22, 164);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(369, 23);
+ this.button1.TabIndex = 6;
+ this.button1.Text = "Go!";
+ this.button1.UseVisualStyleBackColor = true;
+ this.button1.Click += new System.EventHandler(this.button1_Click);
+ //
+ // label5
+ //
+ this.label5.Location = new System.Drawing.Point(120, 136);
+ this.label5.Name = "label5";
+ this.label5.RightToLeft = System.Windows.Forms.RightToLeft.No;
+ this.label5.Size = new System.Drawing.Size(173, 23);
+ this.label5.TabIndex = 7;
+ this.label5.Text = "0 CP";
+ this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
+ // label6
+ //
+ this.label6.AutoSize = true;
+ this.label6.Location = new System.Drawing.Point(173, 122);
+ this.label6.Name = "label6";
+ this.label6.Size = new System.Drawing.Size(74, 13);
+ this.label6.TabIndex = 8;
+ this.label6.Text = "You could win";
+ //
+ // cpUpDown
+ //
+ this.cpUpDown.Location = new System.Drawing.Point(22, 138);
+ this.cpUpDown.Maximum = new decimal(new int[] {
+ 1000000,
+ 0,
+ 0,
+ 0});
+ this.cpUpDown.Minimum = new decimal(new int[] {
+ 1,
+ 0,
+ 0,
+ 0});
+ this.cpUpDown.Name = "cpUpDown";
+ this.cpUpDown.Size = new System.Drawing.Size(92, 20);
+ this.cpUpDown.TabIndex = 9;
+ this.cpUpDown.Value = new decimal(new int[] {
+ 1,
+ 0,
+ 0,
+ 0});
+ //
+ // difUpDown
+ //
+ this.difUpDown.Location = new System.Drawing.Point(299, 138);
+ this.difUpDown.Maximum = new decimal(new int[] {
+ 1000,
+ 0,
+ 0,
+ 0});
+ this.difUpDown.Minimum = new decimal(new int[] {
+ 10,
+ 0,
+ 0,
+ 0});
+ this.difUpDown.Name = "difUpDown";
+ this.difUpDown.Size = new System.Drawing.Size(92, 20);
+ this.difUpDown.TabIndex = 10;
+ this.difUpDown.Value = new decimal(new int[] {
+ 10,
+ 0,
+ 0,
+ 0});
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(147, 20);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(115, 13);
+ this.label1.TabIndex = 11;
+ this.label1.Text = "Welcome to ShiftLotto!";
+ //
+ // timer1
+ //
+ this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
+ //
+ // label7
+ //
+ this.label7.Location = new System.Drawing.Point(22, 190);
+ this.label7.Name = "label7";
+ this.label7.RightToLeft = System.Windows.Forms.RightToLeft.No;
+ this.label7.Size = new System.Drawing.Size(369, 23);
+ this.label7.TabIndex = 12;
+ this.label7.Text = "Current CP: 0 CP";
+ this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
+ // ShiftLotto
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.label7);
+ this.Controls.Add(this.label1);
+ this.Controls.Add(this.difUpDown);
+ this.Controls.Add(this.cpUpDown);
+ this.Controls.Add(this.label6);
+ this.Controls.Add(this.label5);
+ this.Controls.Add(this.button1);
+ this.Controls.Add(this.label4);
+ this.Controls.Add(this.label3);
+ this.Controls.Add(this.label2);
+ this.Name = "ShiftLotto";
+ this.Size = new System.Drawing.Size(419, 252);
+ ((System.ComponentModel.ISupportInitialize)(this.cpUpDown)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.difUpDown)).EndInit();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+ private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.Label label4;
+ private System.Windows.Forms.Button button1;
+ private System.Windows.Forms.Label label5;
+ private System.Windows.Forms.Label label6;
+ private System.Windows.Forms.NumericUpDown cpUpDown;
+ private System.Windows.Forms.NumericUpDown difUpDown;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Timer timer1;
+ private System.Windows.Forms.Label label7;
+ }
+}
diff --git a/ShiftOS.WinForms/Applications/ShiftLotto.cs b/ShiftOS.WinForms/Applications/ShiftLotto.cs
new file mode 100644
index 0000000..5ab8154
--- /dev/null
+++ b/ShiftOS.WinForms/Applications/ShiftLotto.cs
@@ -0,0 +1,134 @@
+/*
+ * MIT License
+ *
+ * Copyright (c) 2017 Michael VanOverbeek and ShiftOS devs
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+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("ShiftLotto", true, "al_shiftlotto", "Games")]
+ [MultiplayerOnly]
+ [DefaultIcon("iconShiftLotto")]
+ [RequiresUpgrade("shiftlotto")]
+ [WinOpen("shiftlotto")]
+ public partial class ShiftLotto : UserControl, IShiftOSWindow
+ {
+ public ShiftLotto()
+ {
+ InitializeComponent();
+ }
+
+ public void OnLoad()
+ {
+ timer1.Start();
+ }
+
+
+ public void OnSkinLoad()
+ {
+
+ }
+
+ public bool OnUnload()
+ {
+ return true;
+ }
+
+ public void OnUpgrade()
+ {
+
+ }
+
+ // The Dynamic Display
+ private void timer1_Tick(object sender, EventArgs e)
+ {
+ int codePoints = Convert.ToInt32(Math.Round(cpUpDown.Value, 0));
+ int difficulty = Convert.ToInt32(Math.Round(difUpDown.Value, 0));
+ label5.Text = codePoints * difficulty + " CP";
+ label7.Text = "Current CP: " + SaveSystem.CurrentSave.Codepoints.ToString() + " CP";
+ }
+
+ private void button1_Click(object sender, EventArgs e)
+ {
+ // Make codePoints and difficulty in this function
+ int codePoints = Convert.ToInt32(Math.Round(cpUpDown.Value, 0));
+ int difficulty = Convert.ToInt32(Math.Round(difUpDown.Value, 0));
+
+ if (SaveSystem.CurrentSave.Codepoints <= 9)
+ {
+ Infobox.Show("Not enough Codepoints", "You do not have enough Codepoints to use ShiftLotto!");
+ }
+ else
+ {
+ if (SaveSystem.CurrentSave.Codepoints - (codePoints * difficulty) <= 0)
+ {
+ Infobox.Show("Not enough Codepoints", "You do not have enough Codepoints to gamble this amount!");
+ }
+ else
+ {
+ // Create Random Ints
+ Random rnd = new Random();
+
+ // Set their highest possible number to Difficulty
+ int guessedNumber = rnd.Next(0, difficulty);
+ int winningNumber = rnd.Next(0, difficulty);
+
+ // Multiply CodePoints * Difficulty
+ int jackpot = codePoints * difficulty;
+
+ // Test the random ints
+ if (guessedNumber == winningNumber)
+ {
+ // If you win
+
+ // Add Codepoints
+ SaveSystem.TransferCodepointsFrom("shiftlotto", jackpot);
+
+ // Infobox
+ Infobox.Show("YOU WON!", "Good Job! " + jackpot.ToString() + " CP has been added to your account. ");
+ }
+ else
+ {
+ // If you fail
+
+ // Remove Codepoints
+ SaveSystem.TransferCodepointsToVoid(jackpot);
+
+
+
+ // Infobox
+ Infobox.Show("YOU FAILED!", "Sorry! " + jackpot.ToString() + " CP has been removed from your account.");
+ }
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/ShiftOS.WinForms/Applications/ShiftLotto.resx b/ShiftOS.WinForms/Applications/ShiftLotto.resx
new file mode 100644
index 0000000..4664613
--- /dev/null
+++ b/ShiftOS.WinForms/Applications/ShiftLotto.resx
@@ -0,0 +1,128 @@
+<?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>
+ <data name="label2.Text" xml:space="preserve">
+ <value>ShiftLotto lets you to turn a few codepoints into a FOURTUNE! All you need to
+do is bet a certain amount of codepoints, set a difficulty, and try your luck.
+ There have been many winners - Will you be one too?</value>
+ </data>
+ <metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 17</value>
+ </metadata>
+</root> \ No newline at end of file
diff --git a/ShiftOS.WinForms/Applications/ShiftSweeper.cs b/ShiftOS.WinForms/Applications/ShiftSweeper.cs
index b13880f..cf6d331 100644
--- a/ShiftOS.WinForms/Applications/ShiftSweeper.cs
+++ b/ShiftOS.WinForms/Applications/ShiftSweeper.cs
@@ -36,6 +36,7 @@ using ShiftOS.Engine;
namespace ShiftOS.WinForms.Applications {
[Launcher("ShiftSweeper", true, "al_shiftsweeper", "Games")]
[RequiresUpgrade("shiftsweeper")]
+ [MultiplayerOnly]
[WinOpen("shiftsweeper")]
[DefaultIcon("iconShiftSweeper")]
public partial class ShiftSweeper : UserControl, IShiftOSWindow {
diff --git a/ShiftOS.WinForms/Applications/Shifter.cs b/ShiftOS.WinForms/Applications/Shifter.cs
index 9a9b4ad..02e2d0a 100644
--- a/ShiftOS.WinForms/Applications/Shifter.cs
+++ b/ShiftOS.WinForms/Applications/Shifter.cs
@@ -32,7 +32,9 @@ using System.Windows.Forms;
using ShiftOS.Engine;
using ShiftOS.WinForms.Tools;
-namespace ShiftOS.WinForms.Applications {
+namespace ShiftOS.WinForms.Applications
+{
+ [MultiplayerOnly]
[Launcher("Shifter", true, "al_shifter", "Customization")]
[RequiresUpgrade("shifter")]
[WinOpen("shifter")]
@@ -439,6 +441,30 @@ namespace ShiftOS.WinForms.Applications {
flbody.Controls.Add(color);
color.Show();
}
+ else if(c.Field.FieldType.IsEnum == true)
+ {
+ var cBox = new ComboBox();
+ cBox.Width = 150;
+ ControlManager.SetupControl(cBox);
+
+ foreach(var itm in Enum.GetNames(c.Field.FieldType))
+ {
+ cBox.Items.Add(itm);
+ }
+
+ cBox.Text = c.Field.GetValue(LoadedSkin).ToString();
+
+ cBox.SelectedIndexChanged += (o, a) =>
+ {
+ c.Field.SetValue(LoadedSkin, Enum.Parse(c.Field.FieldType, cBox.Text));
+ };
+
+ labelHeight = cBox.Height;
+
+ flbody.Controls.Add(cBox);
+ cBox.Show();
+ flbody.SetFlowBreak(cBox, true);
+ }
else if(c.Field.FieldType == typeof(int))
{
if (c.Field.HasShifterEnumMask())
diff --git a/ShiftOS.WinForms/Applications/Shiftnet.cs b/ShiftOS.WinForms/Applications/Shiftnet.cs
index 9540794..c1c81d5 100644
--- a/ShiftOS.WinForms/Applications/Shiftnet.cs
+++ b/ShiftOS.WinForms/Applications/Shiftnet.cs
@@ -34,9 +34,11 @@ using System.Windows.Forms;
using ShiftOS.Engine;
using Newtonsoft.Json;
using static ShiftOS.Engine.SkinEngine;
+using ShiftOS.WinForms.Tools;
namespace ShiftOS.WinForms.Applications {
[Launcher("Shiftnet", false, null, "Networking")]
+ [MultiplayerOnly]
[DefaultIcon("iconShiftnet")]
public partial class Shiftnet : UserControl, IShiftOSWindow {
public Shiftnet() {
@@ -62,6 +64,8 @@ namespace ShiftOS.WinForms.Applications {
}
public string ConstructHtml(string markdown) {
+ var TerminalForeColor = ControlManager.ConvertColor(SkinEngine.LoadedSkin.TerminalForeColorCC);
+ var TerminalBackColor = ControlManager.ConvertColor(SkinEngine.LoadedSkin.TerminalBackColorCC);
string html = $@"<html>
<head>
<style>
@@ -90,8 +94,8 @@ namespace ShiftOS.WinForms.Applications {
pre, code {{
font-family: ""{LoadedSkin.TerminalFont.Name}"";
font-size: {LoadedSkin.TerminalFont.SizeInPoints}pt;
- color: rgb({LoadedSkin.TerminalForeColor.R}, {LoadedSkin.TerminalForeColor.G}, {LoadedSkin.TerminalForeColor.B});
- background-color: rgb({LoadedSkin.TerminalBackColor.R}, {LoadedSkin.TerminalBackColor.G}, {LoadedSkin.TerminalBackColor.B});
+ color: rgb({TerminalForeColor.R}, {TerminalForeColor.G}, {TerminalForeColor.B});
+ background-color: rgb({TerminalBackColor.R}, {TerminalBackColor.G}, {TerminalBackColor.B});
}}
</style>
</head>
diff --git a/ShiftOS.WinForms/Applications/ShiftoriumFrontend.cs b/ShiftOS.WinForms/Applications/ShiftoriumFrontend.cs
index b3724ae..0580b47 100644
--- a/ShiftOS.WinForms/Applications/ShiftoriumFrontend.cs
+++ b/ShiftOS.WinForms/Applications/ShiftoriumFrontend.cs
@@ -39,6 +39,7 @@ namespace ShiftOS.WinForms.Applications
{
[Launcher("Shiftorium", true, "al_shiftorium", "Utilities")]
[RequiresUpgrade("shiftorium_gui")]
+ [MultiplayerOnly]
[WinOpen("shiftorium")]
[DefaultTitle("Shiftorium")]
[DefaultIcon("iconShiftorium")]
diff --git a/ShiftOS.WinForms/Applications/Terminal.cs b/ShiftOS.WinForms/Applications/Terminal.cs
index 9bd9f3c..c0fdf01 100644
--- a/ShiftOS.WinForms/Applications/Terminal.cs
+++ b/ShiftOS.WinForms/Applications/Terminal.cs
@@ -43,6 +43,7 @@ using System.Collections;
using static ShiftOS.Engine.SkinEngine;
using ShiftOS.Engine;
using ShiftOS.Objects;
+using ShiftOS.WinForms.Tools;
namespace ShiftOS.WinForms.Applications {
[Launcher("Terminal", false, null, "Utilities")]
@@ -115,8 +116,9 @@ namespace ShiftOS.WinForms.Applications {
rtbterm.Text = "";
TerminalBackend.PrefixEnabled = true;
TerminalBackend.InStory = false;
- Console.Write($"{SaveSystem.CurrentSave.Username}@{SaveSystem.CurrentSave.SystemName}:~$ ");
- if (Shiftorium.UpgradeInstalled("wm_free_placement")) {
+ TerminalBackend.PrintPrompt();
+ if (Shiftorium.UpgradeInstalled("wm_free_placement"))
+ {
this.ParentForm.Width = 640;
this.ParentForm.Height = 480;
this.ParentForm.Left = (Screen.PrimaryScreen.Bounds.Width - 640) / 2;
@@ -235,8 +237,9 @@ namespace ShiftOS.WinForms.Applications {
}
}
}
- if (TerminalBackend.PrefixEnabled) {
- Console.Write($"{SaveSystem.CurrentSave.Username}@{SaveSystem.CurrentSave.SystemName}:~$ ");
+ if (TerminalBackend.PrefixEnabled)
+ {
+ TerminalBackend.PrintPrompt();
}
}
} catch {
@@ -289,8 +292,8 @@ namespace ShiftOS.WinForms.Applications {
txt.Focus();
txt.Font = LoadedSkin.TerminalFont;
- txt.ForeColor = LoadedSkin.TerminalForeColor;
- txt.BackColor = LoadedSkin.TerminalBackColor;
+ txt.ForeColor = ControlManager.ConvertColor(LoadedSkin.TerminalForeColorCC);
+ txt.BackColor = ControlManager.ConvertColor(LoadedSkin.TerminalBackColorCC);
}
@@ -321,8 +324,7 @@ namespace ShiftOS.WinForms.Applications {
rtbterm.Text = AppearanceManager.LastTerminalText;
rtbterm.Select(rtbterm.TextLength, 0);
}
- Console.Write($"{SaveSystem.CurrentSave.Username}@{SaveSystem.CurrentSave.SystemName}:~$ ");
-
+ TerminalBackend.PrintPrompt();
}
@@ -331,9 +333,11 @@ namespace ShiftOS.WinForms.Applications {
public void OnSkinLoad() {
try {
rtbterm.Font = LoadedSkin.TerminalFont;
- rtbterm.ForeColor = LoadedSkin.TerminalForeColor;
- rtbterm.BackColor = LoadedSkin.TerminalBackColor;
- } catch {
+ rtbterm.ForeColor = ControlManager.ConvertColor(LoadedSkin.TerminalForeColorCC);
+ rtbterm.BackColor = ControlManager.ConvertColor(LoadedSkin.TerminalBackColorCC);
+ }
+ catch
+ {
}
@@ -369,5 +373,4 @@ namespace ShiftOS.WinForms.Applications {
}
}
-}
-//lol you found this comment i made so i chould push a change to make a point. \ No newline at end of file
+} \ No newline at end of file
diff --git a/ShiftOS.WinForms/Applications/TutorialBox.cs b/ShiftOS.WinForms/Applications/TutorialBox.cs
index 25921e1..3c74443 100644
--- a/ShiftOS.WinForms/Applications/TutorialBox.cs
+++ b/ShiftOS.WinForms/Applications/TutorialBox.cs
@@ -21,6 +21,8 @@ namespace ShiftOS.WinForms.Applications
InitializeComponent();
IsComplete = false;
lbltuttext.Text = "";
+ lbltuttext.Padding = new Padding(15);
+ lbltuttext.Margin = lbltuttext.Padding;
}
bool stillTyping = false;
@@ -47,6 +49,7 @@ namespace ShiftOS.WinForms.Applications
}));
Thread.Sleep(75);
}
+ Thread.Sleep(5000);
stillTyping = false;
}).Start();
}