aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ShiftOS.Engine/ShiftOS.Engine.csproj2
-rw-r--r--ShiftOS.Engine/UI/ShiftStripRenderer.cs30
-rw-r--r--ShiftOS.Engine/UI/ShiftToolStrip.cs26
-rw-r--r--ShiftOS.Main/Apps/FileSkimmer.Designer.cs (renamed from ShiftOS.Main/MainGame/Apps/FileSkimmer.Designer.cs)2
-rw-r--r--ShiftOS.Main/Apps/FileSkimmer.cs (renamed from ShiftOS.Main/MainGame/Apps/FileSkimmer.cs)2
-rw-r--r--ShiftOS.Main/Apps/FileSkimmer.resx (renamed from ShiftOS.Main/MainGame/Apps/FileSkimmer.resx)0
-rw-r--r--ShiftOS.Main/Apps/Pong.Designer.cs100
-rw-r--r--ShiftOS.Main/Apps/Pong.cs72
-rw-r--r--ShiftOS.Main/Apps/Pong.resx123
-rw-r--r--ShiftOS.Main/Apps/ShiftDemo.Designer.cs (renamed from ShiftOS.Main/MainGame/Apps/ShiftDemo.Designer.cs)0
-rw-r--r--ShiftOS.Main/Apps/ShiftDemo.cs (renamed from ShiftOS.Main/MainGame/Apps/ShiftDemo.cs)0
-rw-r--r--ShiftOS.Main/Apps/ShiftDemo.resx (renamed from ShiftOS.Main/MainGame/Apps/ShiftDemo.resx)0
-rw-r--r--ShiftOS.Main/Apps/ShifterStuff/SelectColor.Designer.cs (renamed from ShiftOS.Main/MainGame/Apps/ShifterStuff/SelectColor.Designer.cs)0
-rw-r--r--ShiftOS.Main/Apps/ShifterStuff/SelectColor.cs (renamed from ShiftOS.Main/MainGame/Apps/ShifterStuff/SelectColor.cs)0
-rw-r--r--ShiftOS.Main/Apps/ShifterStuff/SelectColor.resx (renamed from ShiftOS.Main/MainGame/Apps/ShifterStuff/SelectColor.resx)0
-rw-r--r--ShiftOS.Main/Apps/ShifterStuff/Shifter.Designer.cs (renamed from ShiftOS.Main/MainGame/Apps/ShifterStuff/Shifter.Designer.cs)0
-rw-r--r--ShiftOS.Main/Apps/ShifterStuff/Shifter.cs (renamed from ShiftOS.Main/MainGame/Apps/ShifterStuff/Shifter.cs)0
-rw-r--r--ShiftOS.Main/Apps/ShifterStuff/Shifter.resx (renamed from ShiftOS.Main/MainGame/Apps/ShifterStuff/Shifter.resx)0
-rw-r--r--ShiftOS.Main/Apps/Terminal.Designer.cs (renamed from ShiftOS.Main/MainGame/Apps/Terminal.Designer.cs)2
-rw-r--r--ShiftOS.Main/Apps/Terminal.cs (renamed from ShiftOS.Main/MainGame/Apps/Terminal.cs)2
-rw-r--r--ShiftOS.Main/Apps/Terminal.resx (renamed from ShiftOS.Main/MainGame/Apps/Terminal.resx)0
-rw-r--r--ShiftOS.Main/Apps/TestForm.Designer.cs (renamed from ShiftOS.Main/MainGame/Apps/TestForm.Designer.cs)0
-rw-r--r--ShiftOS.Main/Apps/TestForm.cs (renamed from ShiftOS.Main/MainGame/Apps/TestForm.cs)0
-rw-r--r--ShiftOS.Main/Apps/TestForm.resx (renamed from ShiftOS.Main/MainGame/Apps/TestForm.resx)0
-rw-r--r--ShiftOS.Main/Apps/TextPad.Designer.cs (renamed from ShiftOS.Main/MainGame/Apps/TextPad.Designer.cs)2
-rw-r--r--ShiftOS.Main/Apps/TextPad.cs (renamed from ShiftOS.Main/MainGame/Apps/TextPad.cs)2
-rw-r--r--ShiftOS.Main/Apps/TextPad.resx (renamed from ShiftOS.Main/MainGame/Apps/TextPad.resx)0
-rw-r--r--ShiftOS.Main/Desktop.Designer.cs138
-rw-r--r--ShiftOS.Main/Desktop.cs51
-rw-r--r--ShiftOS.Main/Desktop.resx (renamed from ShiftOS.Main/MainGame/Desktop.resx)8
-rw-r--r--ShiftOS.Main/MainGame/Desktop.Designer.cs186
-rw-r--r--ShiftOS.Main/MainGame/Desktop.cs72
-rw-r--r--ShiftOS.Main/Program.cs3
-rw-r--r--ShiftOS.Main/ShiftOS.Main.csproj61
-rw-r--r--ShiftOS.Main/Terminal/Commands/startx.cs16
-rw-r--r--ShiftOS.Main/Terminal/TerminalBackend.cs3
-rw-r--r--ShiftOS.Main/Terminal/TerminalCommand.cs6
37 files changed, 571 insertions, 338 deletions
diff --git a/ShiftOS.Engine/ShiftOS.Engine.csproj b/ShiftOS.Engine/ShiftOS.Engine.csproj
index d63258a..de69248 100644
--- a/ShiftOS.Engine/ShiftOS.Engine.csproj
+++ b/ShiftOS.Engine/ShiftOS.Engine.csproj
@@ -84,7 +84,7 @@
<Compile Include="UI\ShiftButton.Designer.cs">
<DependentUpon>ShiftButton.cs</DependentUpon>
</Compile>
- <Compile Include="UI\ShiftStripRenderer.cs" />
+ <Compile Include="UI\ShiftToolStrip.cs" />
<Compile Include="WindowManager\InfoboxTemplate.cs">
<SubType>UserControl</SubType>
</Compile>
diff --git a/ShiftOS.Engine/UI/ShiftStripRenderer.cs b/ShiftOS.Engine/UI/ShiftStripRenderer.cs
deleted file mode 100644
index fe64ff9..0000000
--- a/ShiftOS.Engine/UI/ShiftStripRenderer.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Drawing;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Forms;
-
-namespace ShiftOS.Engine.UI
-{
- public class ShiftStripRenderer : ToolStripRenderer
- {
- SolidBrush sb;
-
- protected override void OnRenderButtonBackground(ToolStripItemRenderEventArgs e)
- {
- if (!e.Item.Selected)
- {
- base.OnRenderButtonBackground(e);
- }
- else
- {
- sb = new SolidBrush(Color.FromArgb(64, 64, 64));
- Rectangle rectangle = new Rectangle(0, 0, e.Item.Size.Width - 1, e.Item.Size.Height - 1);
- e.Graphics.FillRectangle(new SolidBrush(Color.FromArgb(64,64,64)), rectangle);
- e.Graphics.DrawRectangle(new Pen(sb, 1F), rectangle);
- }
- }
- }
-} \ No newline at end of file
diff --git a/ShiftOS.Engine/UI/ShiftToolStrip.cs b/ShiftOS.Engine/UI/ShiftToolStrip.cs
new file mode 100644
index 0000000..853e79c
--- /dev/null
+++ b/ShiftOS.Engine/UI/ShiftToolStrip.cs
@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace ShiftOS.Engine.UI
+{
+ public partial class ShiftToolStrip : ToolStripProfessionalRenderer
+ {
+ protected override void OnRenderMenuItemBackground(ToolStripItemRenderEventArgs e)
+ {
+ if (!e.Item.Selected) base.OnRenderMenuItemBackground(e);
+ else
+ {
+ var rc = new Rectangle(Point.Empty, e.Item.Size);
+ e.Graphics.FillRectangle(Brushes.Gray, rc);
+ e.Graphics.DrawRectangle(Pens.White, 1, 0, rc.Width - 2, rc.Height - 1);
+ }
+ }
+ }
+}
diff --git a/ShiftOS.Main/MainGame/Apps/FileSkimmer.Designer.cs b/ShiftOS.Main/Apps/FileSkimmer.Designer.cs
index 5a23ec7..36fe4e5 100644
--- a/ShiftOS.Main/MainGame/Apps/FileSkimmer.Designer.cs
+++ b/ShiftOS.Main/Apps/FileSkimmer.Designer.cs
@@ -1,6 +1,6 @@
using System.Windows.Forms;
-namespace ShiftOS.Main.ShiftOS.Apps
+namespace ShiftOS.Main.Apps
{
partial class FileSkimmer
{
diff --git a/ShiftOS.Main/MainGame/Apps/FileSkimmer.cs b/ShiftOS.Main/Apps/FileSkimmer.cs
index 58cc126..e749d21 100644
--- a/ShiftOS.Main/MainGame/Apps/FileSkimmer.cs
+++ b/ShiftOS.Main/Apps/FileSkimmer.cs
@@ -8,7 +8,7 @@ using ShiftOS.Engine.WindowManager;
using System.Linq;
using ShiftOS.Engine.UI;
-namespace ShiftOS.Main.ShiftOS.Apps
+namespace ShiftOS.Main.Apps
{
public partial class FileSkimmer : UserControl, IShiftWindowExtensions
{
diff --git a/ShiftOS.Main/MainGame/Apps/FileSkimmer.resx b/ShiftOS.Main/Apps/FileSkimmer.resx
index aeeea08..aeeea08 100644
--- a/ShiftOS.Main/MainGame/Apps/FileSkimmer.resx
+++ b/ShiftOS.Main/Apps/FileSkimmer.resx
diff --git a/ShiftOS.Main/Apps/Pong.Designer.cs b/ShiftOS.Main/Apps/Pong.Designer.cs
new file mode 100644
index 0000000..4b9bd01
--- /dev/null
+++ b/ShiftOS.Main/Apps/Pong.Designer.cs
@@ -0,0 +1,100 @@
+namespace ShiftOS.Main.Apps
+{
+ partial class Pong
+ {
+ /// <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();
+ this.playerPaddle = new System.Windows.Forms.PictureBox();
+ this.cpuPaddle = new System.Windows.Forms.PictureBox();
+ this.ball = new System.Windows.Forms.PictureBox();
+ this.gameTimer = new System.Windows.Forms.Timer(this.components);
+ ((System.ComponentModel.ISupportInitialize)(this.playerPaddle)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.cpuPaddle)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.ball)).BeginInit();
+ this.SuspendLayout();
+ //
+ // playerPaddle
+ //
+ this.playerPaddle.BackColor = System.Drawing.Color.White;
+ this.playerPaddle.Location = new System.Drawing.Point(27, 153);
+ this.playerPaddle.Name = "playerPaddle";
+ this.playerPaddle.Size = new System.Drawing.Size(22, 103);
+ this.playerPaddle.TabIndex = 0;
+ this.playerPaddle.TabStop = false;
+ //
+ // cpuPaddle
+ //
+ this.cpuPaddle.BackColor = System.Drawing.Color.White;
+ this.cpuPaddle.Location = new System.Drawing.Point(751, 153);
+ this.cpuPaddle.Name = "cpuPaddle";
+ this.cpuPaddle.Size = new System.Drawing.Size(22, 103);
+ this.cpuPaddle.TabIndex = 1;
+ this.cpuPaddle.TabStop = false;
+ //
+ // ball
+ //
+ this.ball.BackColor = System.Drawing.Color.White;
+ this.ball.Location = new System.Drawing.Point(390, 201);
+ this.ball.Name = "ball";
+ this.ball.Size = new System.Drawing.Size(18, 18);
+ this.ball.TabIndex = 2;
+ this.ball.TabStop = false;
+ //
+ // gameTimer
+ //
+ this.gameTimer.Interval = 20;
+ this.gameTimer.Tick += new System.EventHandler(this.gameTimer_Tick);
+ //
+ // Pong
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.BackColor = System.Drawing.Color.Black;
+ this.Controls.Add(this.ball);
+ this.Controls.Add(this.cpuPaddle);
+ this.Controls.Add(this.playerPaddle);
+ this.ForeColor = System.Drawing.Color.White;
+ this.Name = "Pong";
+ this.Size = new System.Drawing.Size(801, 470);
+ this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Pong_KeyDown);
+ this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.Pong_KeyUp);
+ ((System.ComponentModel.ISupportInitialize)(this.playerPaddle)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.cpuPaddle)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.ball)).EndInit();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.PictureBox playerPaddle;
+ private System.Windows.Forms.PictureBox cpuPaddle;
+ private System.Windows.Forms.PictureBox ball;
+ private System.Windows.Forms.Timer gameTimer;
+ }
+}
diff --git a/ShiftOS.Main/Apps/Pong.cs b/ShiftOS.Main/Apps/Pong.cs
new file mode 100644
index 0000000..aa0c792
--- /dev/null
+++ b/ShiftOS.Main/Apps/Pong.cs
@@ -0,0 +1,72 @@
+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;
+
+namespace ShiftOS.Main.Apps
+{
+ public partial class Pong : UserControl
+ {
+ bool goUp = false;
+ bool goDown = false;
+ int speed = 5;
+ float ballX = 5;
+ float ballY = 5;
+ public Pong()
+ {
+ InitializeComponent();
+ gameTimer.Start();
+ ResetToRest();
+ }
+ void ResetToRest()
+ {
+ ball.Location = new Point((int)Math.Round(this.Width / 2d, 0), (int)Math.Round(this.Height / 2d, 0));
+ playerPaddle.Location = new Point(playerPaddle.Location.X, (int)Math.Round(this.Height / 2d, 0));
+ cpuPaddle.Location = new Point(cpuPaddle.Location.X, (int)Math.Round(this.Height / 2d, 0));
+ }
+
+ private void Pong_KeyDown(object sender, KeyEventArgs e)
+ {
+ if (e.KeyCode == Keys.W) goUp = true;
+ if (e.KeyCode == Keys.S) goDown = true;
+ }
+
+ private void Pong_KeyUp(object sender, KeyEventArgs e)
+ {
+ if (e.KeyCode == Keys.W) goUp = false;
+ if (e.KeyCode == Keys.S) goDown = false;
+ }
+
+ private void gameTimer_Tick(object sender, EventArgs e)
+ {
+ ball.Top -= (int)ballY;
+ ball.Left -= (int)ballX;
+
+ cpuPaddle.Top += speed;
+
+ if (cpuPaddle.Top < 0 || cpuPaddle.Top > this.Height) speed = -speed;
+
+ if (ball.Left < 0)
+ {
+ ResetToRest();
+ ballX = -ballX;
+ }
+ if (ball.Left + ball.Width > this.Height)
+ {
+ ResetToRest();
+ ballX = -ballX;
+ }
+ if (ball.Top < 0 || ball.Top + ball.Height > this.Height) ballY = -ballY;
+ if (ball.Bounds.IntersectsWith(playerPaddle.Bounds) || ball.Bounds.IntersectsWith(cpuPaddle.Bounds)) ballX = -ballX;
+
+ if (goUp && playerPaddle.Top > 0) playerPaddle.Top -= 8;
+ if (goDown && playerPaddle.Top < this.Height) playerPaddle.Top += 8;
+
+ }
+ }
+}
diff --git a/ShiftOS.Main/Apps/Pong.resx b/ShiftOS.Main/Apps/Pong.resx
new file mode 100644
index 0000000..a0e8b0d
--- /dev/null
+++ b/ShiftOS.Main/Apps/Pong.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="gameTimer.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.Main/MainGame/Apps/ShiftDemo.Designer.cs b/ShiftOS.Main/Apps/ShiftDemo.Designer.cs
index f8ee8e3..f8ee8e3 100644
--- a/ShiftOS.Main/MainGame/Apps/ShiftDemo.Designer.cs
+++ b/ShiftOS.Main/Apps/ShiftDemo.Designer.cs
diff --git a/ShiftOS.Main/MainGame/Apps/ShiftDemo.cs b/ShiftOS.Main/Apps/ShiftDemo.cs
index ced10d2..ced10d2 100644
--- a/ShiftOS.Main/MainGame/Apps/ShiftDemo.cs
+++ b/ShiftOS.Main/Apps/ShiftDemo.cs
diff --git a/ShiftOS.Main/MainGame/Apps/ShiftDemo.resx b/ShiftOS.Main/Apps/ShiftDemo.resx
index 1af7de1..1af7de1 100644
--- a/ShiftOS.Main/MainGame/Apps/ShiftDemo.resx
+++ b/ShiftOS.Main/Apps/ShiftDemo.resx
diff --git a/ShiftOS.Main/MainGame/Apps/ShifterStuff/SelectColor.Designer.cs b/ShiftOS.Main/Apps/ShifterStuff/SelectColor.Designer.cs
index 5e617cb..5e617cb 100644
--- a/ShiftOS.Main/MainGame/Apps/ShifterStuff/SelectColor.Designer.cs
+++ b/ShiftOS.Main/Apps/ShifterStuff/SelectColor.Designer.cs
diff --git a/ShiftOS.Main/MainGame/Apps/ShifterStuff/SelectColor.cs b/ShiftOS.Main/Apps/ShifterStuff/SelectColor.cs
index 3da3b98..3da3b98 100644
--- a/ShiftOS.Main/MainGame/Apps/ShifterStuff/SelectColor.cs
+++ b/ShiftOS.Main/Apps/ShifterStuff/SelectColor.cs
diff --git a/ShiftOS.Main/MainGame/Apps/ShifterStuff/SelectColor.resx b/ShiftOS.Main/Apps/ShifterStuff/SelectColor.resx
index 1af7de1..1af7de1 100644
--- a/ShiftOS.Main/MainGame/Apps/ShifterStuff/SelectColor.resx
+++ b/ShiftOS.Main/Apps/ShifterStuff/SelectColor.resx
diff --git a/ShiftOS.Main/MainGame/Apps/ShifterStuff/Shifter.Designer.cs b/ShiftOS.Main/Apps/ShifterStuff/Shifter.Designer.cs
index fc0d417..fc0d417 100644
--- a/ShiftOS.Main/MainGame/Apps/ShifterStuff/Shifter.Designer.cs
+++ b/ShiftOS.Main/Apps/ShifterStuff/Shifter.Designer.cs
diff --git a/ShiftOS.Main/MainGame/Apps/ShifterStuff/Shifter.cs b/ShiftOS.Main/Apps/ShifterStuff/Shifter.cs
index 529e603..529e603 100644
--- a/ShiftOS.Main/MainGame/Apps/ShifterStuff/Shifter.cs
+++ b/ShiftOS.Main/Apps/ShifterStuff/Shifter.cs
diff --git a/ShiftOS.Main/MainGame/Apps/ShifterStuff/Shifter.resx b/ShiftOS.Main/Apps/ShifterStuff/Shifter.resx
index 1af7de1..1af7de1 100644
--- a/ShiftOS.Main/MainGame/Apps/ShifterStuff/Shifter.resx
+++ b/ShiftOS.Main/Apps/ShifterStuff/Shifter.resx
diff --git a/ShiftOS.Main/MainGame/Apps/Terminal.Designer.cs b/ShiftOS.Main/Apps/Terminal.Designer.cs
index a746456..2ad4398 100644
--- a/ShiftOS.Main/MainGame/Apps/Terminal.Designer.cs
+++ b/ShiftOS.Main/Apps/Terminal.Designer.cs
@@ -1,4 +1,4 @@
-namespace ShiftOS.Main.ShiftOS.Apps
+namespace ShiftOS.Main.Apps
{
partial class Terminal
{
diff --git a/ShiftOS.Main/MainGame/Apps/Terminal.cs b/ShiftOS.Main/Apps/Terminal.cs
index f0efec0..6a76d19 100644
--- a/ShiftOS.Main/MainGame/Apps/Terminal.cs
+++ b/ShiftOS.Main/Apps/Terminal.cs
@@ -9,7 +9,7 @@ using System.IO;
using ShiftOS.Main.Properties;
using Whoa;
-namespace ShiftOS.Main.ShiftOS.Apps
+namespace ShiftOS.Main.Apps
{
public partial class Terminal : UserControl
{
diff --git a/ShiftOS.Main/MainGame/Apps/Terminal.resx b/ShiftOS.Main/Apps/Terminal.resx
index 1af7de1..1af7de1 100644
--- a/ShiftOS.Main/MainGame/Apps/Terminal.resx
+++ b/ShiftOS.Main/Apps/Terminal.resx
diff --git a/ShiftOS.Main/MainGame/Apps/TestForm.Designer.cs b/ShiftOS.Main/Apps/TestForm.Designer.cs
index b49924e..b49924e 100644
--- a/ShiftOS.Main/MainGame/Apps/TestForm.Designer.cs
+++ b/ShiftOS.Main/Apps/TestForm.Designer.cs
diff --git a/ShiftOS.Main/MainGame/Apps/TestForm.cs b/ShiftOS.Main/Apps/TestForm.cs
index a0c12c0..a0c12c0 100644
--- a/ShiftOS.Main/MainGame/Apps/TestForm.cs
+++ b/ShiftOS.Main/Apps/TestForm.cs
diff --git a/ShiftOS.Main/MainGame/Apps/TestForm.resx b/ShiftOS.Main/Apps/TestForm.resx
index 6dba9d3..6dba9d3 100644
--- a/ShiftOS.Main/MainGame/Apps/TestForm.resx
+++ b/ShiftOS.Main/Apps/TestForm.resx
diff --git a/ShiftOS.Main/MainGame/Apps/TextPad.Designer.cs b/ShiftOS.Main/Apps/TextPad.Designer.cs
index 7d83c68..3842fbf 100644
--- a/ShiftOS.Main/MainGame/Apps/TextPad.Designer.cs
+++ b/ShiftOS.Main/Apps/TextPad.Designer.cs
@@ -1,4 +1,4 @@
-namespace ShiftOS.Main.ShiftOS.Apps
+namespace ShiftOS.Main.Apps
{
partial class TextPad
{
diff --git a/ShiftOS.Main/MainGame/Apps/TextPad.cs b/ShiftOS.Main/Apps/TextPad.cs
index 66863cf..ee4a379 100644
--- a/ShiftOS.Main/MainGame/Apps/TextPad.cs
+++ b/ShiftOS.Main/Apps/TextPad.cs
@@ -4,7 +4,7 @@ using System;
using System.IO;
using System.Windows.Forms;
-namespace ShiftOS.Main.ShiftOS.Apps
+namespace ShiftOS.Main.Apps
{
public partial class TextPad : UserControl
{
diff --git a/ShiftOS.Main/MainGame/Apps/TextPad.resx b/ShiftOS.Main/Apps/TextPad.resx
index 53f75e1..53f75e1 100644
--- a/ShiftOS.Main/MainGame/Apps/TextPad.resx
+++ b/ShiftOS.Main/Apps/TextPad.resx
diff --git a/ShiftOS.Main/Desktop.Designer.cs b/ShiftOS.Main/Desktop.Designer.cs
new file mode 100644
index 0000000..e82c63e
--- /dev/null
+++ b/ShiftOS.Main/Desktop.Designer.cs
@@ -0,0 +1,138 @@
+namespace ShiftOS.Main
+{
+ partial class Desktop
+ {
+ /// <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 Windows Form 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();
+ this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.menuStrip1 = new System.Windows.Forms.MenuStrip();
+ this.applicationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.terminalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.fileSkimmerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.textPadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.pongToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.shifterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.menuStrip1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // contextMenuStrip1
+ //
+ this.contextMenuStrip1.Name = "contextMenuStrip1";
+ this.contextMenuStrip1.Size = new System.Drawing.Size(61, 4);
+ //
+ // menuStrip1
+ //
+ this.menuStrip1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
+ this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.applicationsToolStripMenuItem});
+ this.menuStrip1.Location = new System.Drawing.Point(0, 0);
+ this.menuStrip1.Name = "menuStrip1";
+ this.menuStrip1.Size = new System.Drawing.Size(933, 24);
+ this.menuStrip1.TabIndex = 1;
+ this.menuStrip1.Text = "menuStrip1";
+ //
+ // applicationsToolStripMenuItem
+ //
+ this.applicationsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.terminalToolStripMenuItem,
+ this.fileSkimmerToolStripMenuItem,
+ this.textPadToolStripMenuItem,
+ this.pongToolStripMenuItem,
+ this.shifterToolStripMenuItem});
+ this.applicationsToolStripMenuItem.Font = new System.Drawing.Font("Courier New", 9F);
+ this.applicationsToolStripMenuItem.ForeColor = System.Drawing.Color.White;
+ this.applicationsToolStripMenuItem.Name = "applicationsToolStripMenuItem";
+ this.applicationsToolStripMenuItem.Size = new System.Drawing.Size(103, 20);
+ this.applicationsToolStripMenuItem.Text = "Applications";
+ //
+ // terminalToolStripMenuItem
+ //
+ this.terminalToolStripMenuItem.Name = "terminalToolStripMenuItem";
+ this.terminalToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
+ this.terminalToolStripMenuItem.Text = "Terminal";
+ this.terminalToolStripMenuItem.Click += new System.EventHandler(this.terminalToolStripMenuItem_Click);
+ //
+ // fileSkimmerToolStripMenuItem
+ //
+ this.fileSkimmerToolStripMenuItem.Name = "fileSkimmerToolStripMenuItem";
+ this.fileSkimmerToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
+ this.fileSkimmerToolStripMenuItem.Text = "File Skimmer";
+ this.fileSkimmerToolStripMenuItem.Click += new System.EventHandler(this.fileSkimmerToolStripMenuItem_Click);
+ //
+ // textPadToolStripMenuItem
+ //
+ this.textPadToolStripMenuItem.Name = "textPadToolStripMenuItem";
+ this.textPadToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
+ this.textPadToolStripMenuItem.Text = "TextPad";
+ this.textPadToolStripMenuItem.Click += new System.EventHandler(this.textPadToolStripMenuItem_Click);
+ //
+ // pongToolStripMenuItem
+ //
+ this.pongToolStripMenuItem.Name = "pongToolStripMenuItem";
+ this.pongToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
+ this.pongToolStripMenuItem.Text = "Pong";
+ this.pongToolStripMenuItem.Click += new System.EventHandler(this.pongToolStripMenuItem_Click);
+ //
+ // shifterToolStripMenuItem
+ //
+ this.shifterToolStripMenuItem.Name = "shifterToolStripMenuItem";
+ this.shifterToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
+ this.shifterToolStripMenuItem.Text = "Shifter";
+ //
+ // Desktop
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.BackColor = System.Drawing.Color.Black;
+ this.ClientSize = new System.Drawing.Size(933, 485);
+ this.Controls.Add(this.menuStrip1);
+ this.Font = new System.Drawing.Font("Courier New", 8.25F);
+ this.ForeColor = System.Drawing.Color.White;
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+ this.Name = "Desktop";
+ this.Text = "Desktop";
+ this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
+ this.menuStrip1.ResumeLayout(false);
+ this.menuStrip1.PerformLayout();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
+ private System.Windows.Forms.MenuStrip menuStrip1;
+ private System.Windows.Forms.ToolStripMenuItem applicationsToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem terminalToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem fileSkimmerToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem textPadToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem pongToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem shifterToolStripMenuItem;
+ }
+} \ No newline at end of file
diff --git a/ShiftOS.Main/Desktop.cs b/ShiftOS.Main/Desktop.cs
new file mode 100644
index 0000000..41e0873
--- /dev/null
+++ b/ShiftOS.Main/Desktop.cs
@@ -0,0 +1,51 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using ShiftOS.Engine.UI;
+using ShiftOS.Engine.WindowManager;
+
+namespace ShiftOS.Main
+{
+ public partial class Desktop : Form
+ {
+ public Desktop()
+ {
+ InitializeComponent();
+ foreach (var menuItem in applicationsToolStripMenuItem.DropDownItems.OfType<ToolStripMenuItem>())
+ {
+ menuItem.BackColor = Color.FromArgb(64,64,64);
+ menuItem.ForeColor = Color.White;
+ }
+ menuStrip1.RenderMode = ToolStripRenderMode.ManagerRenderMode;
+ ToolStripManager.Renderer = new ShiftToolStrip();
+ this.FormClosed += (o, a) => Application.Exit();
+ }
+
+ private void terminalToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ ShiftWM.Init(new Apps.Terminal(), "Terminal", Properties.Resources.iconTerminal);
+ }
+
+ private void fileSkimmerToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ ShiftWM.Init(new Apps.FileSkimmer(), "FileSkimmer", Properties.Resources.iconFileSkimmer);
+ }
+
+ private void textPadToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ ShiftWM.Init(new Apps.TextPad(), "TextPad", Properties.Resources.iconTextPad);
+ }
+
+ private void pongToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ ShiftWM.Init(new Apps.Pong(), "Pong", null);
+ }
+
+ }
+}
diff --git a/ShiftOS.Main/MainGame/Desktop.resx b/ShiftOS.Main/Desktop.resx
index f706e8f..37c49b6 100644
--- a/ShiftOS.Main/MainGame/Desktop.resx
+++ b/ShiftOS.Main/Desktop.resx
@@ -117,10 +117,10 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
- <metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>219, 17</value>
+ <metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 17</value>
</metadata>
- <metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>132, 17</value>
+ <metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>172, 17</value>
</metadata>
</root> \ No newline at end of file
diff --git a/ShiftOS.Main/MainGame/Desktop.Designer.cs b/ShiftOS.Main/MainGame/Desktop.Designer.cs
deleted file mode 100644
index 5378aac..0000000
--- a/ShiftOS.Main/MainGame/Desktop.Designer.cs
+++ /dev/null
@@ -1,186 +0,0 @@
-namespace ShiftOS.Main.ShiftOS
-{
- partial class Desktop
- {
- /// <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 Windows Form 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();
- this.taskbar = new System.Windows.Forms.Panel();
- this.clockPanel = new System.Windows.Forms.Panel();
- this.lblClock = new System.Windows.Forms.Label();
- this.panel2 = new System.Windows.Forms.Panel();
- this.menuStrip1 = new System.Windows.Forms.MenuStrip();
- this.applicationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.shifterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.terminalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.textPadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.fileSkimmerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.timer1 = new System.Windows.Forms.Timer(this.components);
- this.taskbar.SuspendLayout();
- this.clockPanel.SuspendLayout();
- this.panel2.SuspendLayout();
- this.menuStrip1.SuspendLayout();
- this.SuspendLayout();
- //
- // taskbar
- //
- this.taskbar.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
- this.taskbar.Controls.Add(this.clockPanel);
- this.taskbar.Controls.Add(this.panel2);
- this.taskbar.Dock = System.Windows.Forms.DockStyle.Top;
- this.taskbar.Location = new System.Drawing.Point(0, 0);
- this.taskbar.Name = "taskbar";
- this.taskbar.Size = new System.Drawing.Size(640, 24);
- this.taskbar.TabIndex = 0;
- //
- // clockPanel
- //
- this.clockPanel.Controls.Add(this.lblClock);
- this.clockPanel.Dock = System.Windows.Forms.DockStyle.Right;
- this.clockPanel.Location = new System.Drawing.Point(574, 0);
- this.clockPanel.Name = "clockPanel";
- this.clockPanel.Size = new System.Drawing.Size(66, 24);
- this.clockPanel.TabIndex = 1;
- //
- // lblClock
- //
- this.lblClock.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
- this.lblClock.Dock = System.Windows.Forms.DockStyle.Fill;
- this.lblClock.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.lblClock.ForeColor = System.Drawing.Color.White;
- this.lblClock.Location = new System.Drawing.Point(0, 0);
- this.lblClock.Name = "lblClock";
- this.lblClock.Size = new System.Drawing.Size(66, 24);
- this.lblClock.TabIndex = 1;
- this.lblClock.Text = "00:00:00";
- this.lblClock.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
- //
- // panel2
- //
- this.panel2.Controls.Add(this.menuStrip1);
- this.panel2.Dock = System.Windows.Forms.DockStyle.Left;
- this.panel2.Location = new System.Drawing.Point(0, 0);
- this.panel2.Name = "panel2";
- this.panel2.Size = new System.Drawing.Size(102, 24);
- this.panel2.TabIndex = 0;
- //
- // menuStrip1
- //
- this.menuStrip1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
- this.menuStrip1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.menuStrip1.Dock = System.Windows.Forms.DockStyle.None;
- this.menuStrip1.Font = new System.Drawing.Font("Consolas", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.applicationsToolStripMenuItem});
- this.menuStrip1.Location = new System.Drawing.Point(0, 0);
- this.menuStrip1.Name = "menuStrip1";
- this.menuStrip1.Size = new System.Drawing.Size(231, 24);
- this.menuStrip1.TabIndex = 2;
- this.menuStrip1.Text = "Applications";
- this.menuStrip1.MenuActivate += new System.EventHandler(this.menuStrip1_MenuActivate);
- //
- // applicationsToolStripMenuItem
- //
- this.applicationsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.shifterToolStripMenuItem,
- this.terminalToolStripMenuItem,
- this.textPadToolStripMenuItem,
- this.fileSkimmerToolStripMenuItem});
- this.applicationsToolStripMenuItem.ForeColor = System.Drawing.Color.White;
- this.applicationsToolStripMenuItem.Name = "applicationsToolStripMenuItem";
- this.applicationsToolStripMenuItem.Size = new System.Drawing.Size(103, 20);
- this.applicationsToolStripMenuItem.Text = "Applications";
- //
- // shifterToolStripMenuItem
- //
- this.shifterToolStripMenuItem.Name = "shifterToolStripMenuItem";
- this.shifterToolStripMenuItem.Size = new System.Drawing.Size(158, 22);
- this.shifterToolStripMenuItem.Text = "Shifter";
- this.shifterToolStripMenuItem.Click += new System.EventHandler(this.shifterToolStripMenuItem_Click);
- //
- // terminalToolStripMenuItem
- //
- this.terminalToolStripMenuItem.Name = "terminalToolStripMenuItem";
- this.terminalToolStripMenuItem.Size = new System.Drawing.Size(158, 22);
- this.terminalToolStripMenuItem.Text = "Terminal";
- this.terminalToolStripMenuItem.Click += new System.EventHandler(this.terminalToolStripMenuItem_Click);
- //
- // textPadToolStripMenuItem
- //
- this.textPadToolStripMenuItem.Name = "textPadToolStripMenuItem";
- this.textPadToolStripMenuItem.Size = new System.Drawing.Size(158, 22);
- this.textPadToolStripMenuItem.Text = "TextPad";
- this.textPadToolStripMenuItem.Click += new System.EventHandler(this.textPadToolStripMenuItem_Click);
- //
- // fileSkimmerToolStripMenuItem
- //
- this.fileSkimmerToolStripMenuItem.Name = "fileSkimmerToolStripMenuItem";
- this.fileSkimmerToolStripMenuItem.Size = new System.Drawing.Size(158, 22);
- this.fileSkimmerToolStripMenuItem.Text = "File Skimmer";
- this.fileSkimmerToolStripMenuItem.Click += new System.EventHandler(this.fileSkimmerToolStripMenuItem_Click);
- //
- // timer1
- //
- this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
- //
- // Desktop
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.BackColor = System.Drawing.Color.Black;
- this.ClientSize = new System.Drawing.Size(640, 480);
- this.Controls.Add(this.taskbar);
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
- this.Margin = new System.Windows.Forms.Padding(2);
- this.Name = "Desktop";
- this.Text = "Desktop";
- this.Load += new System.EventHandler(this.Desktop_Load);
- this.taskbar.ResumeLayout(false);
- this.clockPanel.ResumeLayout(false);
- this.panel2.ResumeLayout(false);
- this.panel2.PerformLayout();
- this.menuStrip1.ResumeLayout(false);
- this.menuStrip1.PerformLayout();
- this.ResumeLayout(false);
-
- }
-
- #endregion
-
- private System.Windows.Forms.Panel taskbar;
- private System.Windows.Forms.Panel panel2;
- private System.Windows.Forms.Panel clockPanel;
- private System.Windows.Forms.Label lblClock;
- private System.Windows.Forms.Timer timer1;
- private System.Windows.Forms.MenuStrip menuStrip1;
- private System.Windows.Forms.ToolStripMenuItem applicationsToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem shifterToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem terminalToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem textPadToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem fileSkimmerToolStripMenuItem;
- }
-} \ No newline at end of file
diff --git a/ShiftOS.Main/MainGame/Desktop.cs b/ShiftOS.Main/MainGame/Desktop.cs
deleted file mode 100644
index 0cb3583..0000000
--- a/ShiftOS.Main/MainGame/Desktop.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-using System;
-using System.Windows.Forms;
-using ShiftOS.Engine.WindowManager;
-using ShiftOS.Main.Properties;
-using ShiftOS.Main.ShiftOS.Apps;
-using System.IO;
-using ShiftOS.Engine;
-using System.Drawing;
-using ShiftOS.Engine.UI;
-
-namespace ShiftOS.Main.ShiftOS
-{
- // testing github because git hates me
- public partial class Desktop : Form
- {
-
- public Desktop()
- {
- InitializeComponent();
- foreach (object t in applicationsToolStripMenuItem.DropDownItems)
- {
- var appList = t as ToolStripItem;
- if (t == null) continue;
- appList.BackColor = Color.FromArgb(64, 64, 64);
- appList.ForeColor = Color.White;
- }
- timer1.Start();
- Closed += (sender, args) => { Application.Exit(); };
-
- }
-
- private void shifterToolStripMenuItem_Click(object sender, EventArgs e)
- {
- Apps.ShifterStuff.Shifter app = new Apps.ShifterStuff.Shifter();
- ShiftWM.Init(app, "Shifter", Resources.iconShifter);
- }
-
- private void Desktop_Load(object sender, EventArgs e)
- {
- this.WindowState = FormWindowState.Maximized;
- }
-
- private void terminalToolStripMenuItem_Click(object sender, EventArgs e)
- {
- var t = new Apps.Terminal();
- ShiftWM.Init(t, "Terminal", Resources.iconTerminal, false);
-
- }
-
- private void textPadToolStripMenuItem_Click(object sender, EventArgs e)
- {
- var t = new TextPad();
- ShiftWM.Init(t, "TextPad", Resources.iconTextPad);
- }
-
- private void fileSkimmerToolStripMenuItem_Click(object sender, EventArgs e)
- {
- var fs = new FileSkimmer();
- ShiftWM.Init(fs, "File Skimmer", Resources.iconFileSkimmer);
- }
-
- private void timer1_Tick(object sender, EventArgs e)
- {
- lblClock.Text = DateTime.Now.ToString("hh:mm:ss");
- }
-
- private void menuStrip1_MenuActivate(object sender, EventArgs e)
- {
- menuStrip1.BackColor = Color.FromArgb(64, 64, 64);
- }
- }
-}
diff --git a/ShiftOS.Main/Program.cs b/ShiftOS.Main/Program.cs
index acce816..17aaffc 100644
--- a/ShiftOS.Main/Program.cs
+++ b/ShiftOS.Main/Program.cs
@@ -1,6 +1,5 @@
using System;
using System.Windows.Forms;
-using ShiftOS.Main.ShiftOS;
namespace ShiftOS.Main
{
@@ -21,7 +20,7 @@ namespace ShiftOS.Main
if (terminalMode)
{
Form terminalForm = new Form();
- ShiftOS.Apps.Terminal term = new ShiftOS.Apps.Terminal();
+ Main.Apps.Terminal term = new Main.Apps.Terminal();
terminalForm.Controls.Add(term);
terminalForm.FormBorderStyle = FormBorderStyle.None;
terminalForm.WindowState = FormWindowState.Maximized;
diff --git a/ShiftOS.Main/ShiftOS.Main.csproj b/ShiftOS.Main/ShiftOS.Main.csproj
index 86746dd..2bfc058 100644
--- a/ShiftOS.Main/ShiftOS.Main.csproj
+++ b/ShiftOS.Main/ShiftOS.Main.csproj
@@ -52,44 +52,50 @@
</Reference>
</ItemGroup>
<ItemGroup>
+ <Compile Include="Apps\Pong.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="Apps\Pong.Designer.cs">
+ <DependentUpon>Pong.cs</DependentUpon>
+ </Compile>
+ <Compile Include="Desktop.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="Desktop.Designer.cs">
+ <DependentUpon>Desktop.cs</DependentUpon>
+ </Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="MainGame\Apps\FileSkimmer.cs">
+ <Compile Include="Apps\FileSkimmer.cs">
<SubType>UserControl</SubType>
</Compile>
- <Compile Include="MainGame\Apps\FileSkimmer.Designer.cs">
+ <Compile Include="Apps\FileSkimmer.Designer.cs">
<DependentUpon>FileSkimmer.cs</DependentUpon>
</Compile>
- <Compile Include="MainGame\Apps\ShifterStuff\SelectColor.cs">
+ <Compile Include="Apps\ShifterStuff\SelectColor.cs">
<SubType>UserControl</SubType>
</Compile>
- <Compile Include="MainGame\Apps\ShifterStuff\SelectColor.Designer.cs">
+ <Compile Include="Apps\ShifterStuff\SelectColor.Designer.cs">
<DependentUpon>SelectColor.cs</DependentUpon>
</Compile>
- <Compile Include="MainGame\Apps\ShifterStuff\Shifter.cs">
+ <Compile Include="Apps\ShifterStuff\Shifter.cs">
<SubType>UserControl</SubType>
</Compile>
- <Compile Include="MainGame\Apps\ShifterStuff\Shifter.Designer.cs">
+ <Compile Include="Apps\ShifterStuff\Shifter.Designer.cs">
<DependentUpon>Shifter.cs</DependentUpon>
</Compile>
- <Compile Include="MainGame\Apps\Terminal.cs">
+ <Compile Include="Apps\Terminal.cs">
<SubType>UserControl</SubType>
</Compile>
- <Compile Include="MainGame\Apps\Terminal.Designer.cs">
+ <Compile Include="Apps\Terminal.Designer.cs">
<DependentUpon>Terminal.cs</DependentUpon>
</Compile>
- <Compile Include="MainGame\Apps\TextPad.cs">
+ <Compile Include="Apps\TextPad.cs">
<SubType>UserControl</SubType>
</Compile>
- <Compile Include="MainGame\Apps\TextPad.Designer.cs">
+ <Compile Include="Apps\TextPad.Designer.cs">
<DependentUpon>TextPad.cs</DependentUpon>
</Compile>
- <Compile Include="MainGame\Desktop.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="MainGame\Desktop.Designer.cs">
- <DependentUpon>Desktop.cs</DependentUpon>
- </Compile>
<Compile Include="Terminal\Commands\codepoints.cs" />
<Compile Include="Terminal\Commands\startx.cs" />
<Compile Include="Terminal\Commands\Clear.cs" />
@@ -101,6 +107,12 @@
<Compile Include="Terminal\Commands\upgrade.cs" />
<Compile Include="Terminal\TerminalBackend.cs" />
<Compile Include="Terminal\TerminalCommand.cs" />
+ <EmbeddedResource Include="Apps\Pong.resx">
+ <DependentUpon>Pong.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Desktop.resx">
+ <DependentUpon>Desktop.cs</DependentUpon>
+ </EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
@@ -111,24 +123,21 @@
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
- <EmbeddedResource Include="MainGame\Apps\FileSkimmer.resx">
+ <EmbeddedResource Include="Apps\FileSkimmer.resx">
<DependentUpon>FileSkimmer.cs</DependentUpon>
</EmbeddedResource>
- <EmbeddedResource Include="MainGame\Apps\ShifterStuff\SelectColor.resx">
+ <EmbeddedResource Include="Apps\ShifterStuff\SelectColor.resx">
<DependentUpon>SelectColor.cs</DependentUpon>
</EmbeddedResource>
- <EmbeddedResource Include="MainGame\Apps\ShifterStuff\Shifter.resx">
+ <EmbeddedResource Include="Apps\ShifterStuff\Shifter.resx">
<DependentUpon>Shifter.cs</DependentUpon>
</EmbeddedResource>
- <EmbeddedResource Include="MainGame\Apps\Terminal.resx">
+ <EmbeddedResource Include="Apps\Terminal.resx">
<DependentUpon>Terminal.cs</DependentUpon>
</EmbeddedResource>
- <EmbeddedResource Include="MainGame\Apps\TextPad.resx">
+ <EmbeddedResource Include="Apps\TextPad.resx">
<DependentUpon>TextPad.cs</DependentUpon>
</EmbeddedResource>
- <EmbeddedResource Include="MainGame\Desktop.resx">
- <DependentUpon>Desktop.cs</DependentUpon>
- </EmbeddedResource>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
@@ -152,9 +161,7 @@
<Name>ShiftOS.Engine</Name>
</ProjectReference>
</ItemGroup>
- <ItemGroup>
- <Folder Include="MainGame\Upgrades\" />
- </ItemGroup>
+ <ItemGroup />
<ItemGroup>
<Content Include="Resources\Apps\Artpad\ArtPadsave.png" />
<Content Include="Resources\Audio\infobox.wav" />
diff --git a/ShiftOS.Main/Terminal/Commands/startx.cs b/ShiftOS.Main/Terminal/Commands/startx.cs
index 38a8fdf..5b2feb4 100644
--- a/ShiftOS.Main/Terminal/Commands/startx.cs
+++ b/ShiftOS.Main/Terminal/Commands/startx.cs
@@ -7,7 +7,8 @@ using System.Threading.Tasks;
using ShiftOS.Engine;
using static ShiftOS.Engine.CodepointUpgrade;
using static ShiftOS.Engine.SaveSystem;
-
+using ShiftOS.Main;
+using System.Windows.Forms;
namespace ShiftOS.Main.Terminal.Commands
{
@@ -15,12 +16,12 @@ namespace ShiftOS.Main.Terminal.Commands
{
private bool hasGUI = false;
private bool autostart = false;
+ private Timer timer = new Timer();
public override string Name { get; } = "startx";
public override string Summary { get; } = "Starts the ShiftX driver.";
public override string Usage { get; } = "startx";
public override bool Unlocked { get; set; } = false;
public int codePoints { get; set; } = 150;
-
public override void Run(params string[] args)
{
if (args.Length > 0)
@@ -43,13 +44,16 @@ namespace ShiftOS.Main.Terminal.Commands
}
if (!hasGUI)
{
- var d = new Desktop();
- d.Show();
+ WriteLine("[startx] starting driver...");
+ new System.Threading.ManualResetEvent(false).WaitOne(1500);
+
+ new Desktop().Show();
hasGUI = true;
+ return;
}
- if (hasGUI == true)
+ if (hasGUI)
{
- WriteLine("The ShiftX driver has already been intialized.");
+ WriteLine("startx: the ShiftX driver has already been intialized.");
return;
}
}
diff --git a/ShiftOS.Main/Terminal/TerminalBackend.cs b/ShiftOS.Main/Terminal/TerminalBackend.cs
index 36d4036..bb3faaa 100644
--- a/ShiftOS.Main/Terminal/TerminalBackend.cs
+++ b/ShiftOS.Main/Terminal/TerminalBackend.cs
@@ -5,6 +5,7 @@ using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
+using ShiftOS.Main.Apps;
namespace ShiftOS.Main.Terminal
{
@@ -15,7 +16,7 @@ namespace ShiftOS.Main.Terminal
.Where(t => t.IsSubclassOf(typeof(TerminalCommand)) && t.GetConstructor(Type.EmptyTypes) != null)
.Select(t => Activator.CreateInstance(t) as TerminalCommand);
- public static List<ShiftOS.Apps.Terminal> trm = new List<ShiftOS.Apps.Terminal>();
+ public static List<Main.Apps.Terminal> trm = new List<Main.Apps.Terminal>();
public static int trmTopID = 0;
public static Stack<string> commandBuffer = new Stack<string>();
/// <summary>
diff --git a/ShiftOS.Main/Terminal/TerminalCommand.cs b/ShiftOS.Main/Terminal/TerminalCommand.cs
index 1aeb845..6e4b81b 100644
--- a/ShiftOS.Main/Terminal/TerminalCommand.cs
+++ b/ShiftOS.Main/Terminal/TerminalCommand.cs
@@ -43,7 +43,7 @@ namespace ShiftOS.Main.Terminal
/// <param name="textClr"><summary>The color the text is written in.</summary></param>
public virtual void WriteLine(string value, Color textClr)
{
- ShiftOS.Apps.Terminal trm = Array.Find(TerminalBackend.trm.ToArray(), w => w.TerminalID == TermID);
+ Main.Apps.Terminal trm = Array.Find(TerminalBackend.trm.ToArray(), w => w.TerminalID == TermID);
int startPoint = trm.termmain.Text.Length;
trm.termmain.AppendText($" {value} \n");
@@ -59,7 +59,7 @@ namespace ShiftOS.Main.Terminal
public virtual void Write(string value, Color textClr)
{
- ShiftOS.Apps.Terminal trm = Array.Find(TerminalBackend.trm.ToArray(), w => w.TerminalID == TermID);
+ Main.Apps.Terminal trm = Array.Find(TerminalBackend.trm.ToArray(), w => w.TerminalID == TermID);
int startPoint = trm.termmain.Text.Length;
trm.termmain.AppendText($" {value}");
@@ -94,7 +94,7 @@ namespace ShiftOS.Main.Terminal
/// </summary>
public virtual void Clear()
{
- ShiftOS.Apps.Terminal trm = Array.Find(TerminalBackend.trm.ToArray(), w => w.TerminalID == TermID);
+ Main.Apps.Terminal trm = Array.Find(TerminalBackend.trm.ToArray(), w => w.TerminalID == TermID);
trm.Clear();
}