aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAShifter <[email protected]>2017-11-25 08:59:48 -0700
committerAShifter <[email protected]>2017-11-25 08:59:48 -0700
commitc81573594f509177214bbc9b64427c8aabdc30a6 (patch)
tree0f16be1fffc1e1557adafbd1baa9ff7aa16a3381
parent90b1bdca5f8f2bf634a0b83ed9b623843ada5661 (diff)
downloadshiftos-rewind-c81573594f509177214bbc9b64427c8aabdc30a6.tar.gz
shiftos-rewind-c81573594f509177214bbc9b64427c8aabdc30a6.tar.bz2
shiftos-rewind-c81573594f509177214bbc9b64427c8aabdc30a6.zip
Add SaveSystem, FullScreen Terminal and stuff
Git had a horrible seizure and removed our repo but Alex-TIMEHACK helped us get it back.
-rw-r--r--README.md5
-rw-r--r--ShiftOS.Engine/CodepointUpgrade.cs17
-rw-r--r--ShiftOS.Engine/SaveSystem.cs75
-rw-r--r--ShiftOS.Engine/ShiftOS.Engine.csproj7
-rw-r--r--ShiftOS.Engine/UI/ShiftButton.Designer.cs11
-rw-r--r--ShiftOS.Engine/UI/ShiftButton.cs60
-rw-r--r--ShiftOS.Engine/UI/ShiftButton.resx123
-rw-r--r--ShiftOS.Engine/UI/ShiftStripRenderer.cs21
-rw-r--r--ShiftOS.Engine/WindowManager/InfoboxTemplate.Designer.cs90
-rw-r--r--ShiftOS.Engine/WindowManager/InfoboxTemplate.cs39
-rw-r--r--ShiftOS.Engine/WindowManager/ShiftSkinData.cs47
-rw-r--r--ShiftOS.Engine/WindowManager/ShiftWM.cs54
-rw-r--r--ShiftOS.Engine/WindowManager/ShiftWindow.cs12
-rw-r--r--ShiftOS.Main/Program.cs21
-rw-r--r--ShiftOS.Main/ShiftOS.Main.csproj22
-rw-r--r--ShiftOS.Main/ShiftOS/Apps/FileSkimmer.Designer.cs375
-rw-r--r--ShiftOS.Main/ShiftOS/Apps/FileSkimmer.cs2
-rw-r--r--ShiftOS.Main/ShiftOS/Apps/FileSkimmer.resx4
-rw-r--r--ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.Designer.cs1
-rw-r--r--ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.cs11
-rw-r--r--ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.Designer.cs72
-rw-r--r--ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.cs193
-rw-r--r--ShiftOS.Main/ShiftOS/Desktop.Designer.cs11
-rw-r--r--ShiftOS.Main/ShiftOS/Desktop.cs20
-rw-r--r--ShiftOS.Main/ShiftOS/Desktop.resx3
-rw-r--r--ShiftOS.Main/Terminal/Commands/Echo.cs37
-rw-r--r--ShiftOS.Main/Terminal/Commands/Hello.cs2
-rw-r--r--ShiftOS.Main/Terminal/Commands/Help.cs8
-rw-r--r--ShiftOS.Main/Terminal/Commands/TestStory.cs14
-rw-r--r--ShiftOS.Main/Terminal/Commands/codepoints.cs33
-rw-r--r--ShiftOS.Main/Terminal/Commands/shutdown.cs23
-rw-r--r--ShiftOS.Main/Terminal/Commands/startx.cs57
-rw-r--r--ShiftOS.Main/Terminal/TerminalBackend.cs10
-rw-r--r--shiftos.main/shiftos/apps/terminal.cs32
34 files changed, 1054 insertions, 458 deletions
diff --git a/README.md b/README.md
index 6f8b58c..56c3a3b 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,2 @@
# ShiftOS
-
-The all-new, rewritten ShiftOS repository modeled after 0.0.9!
-
-
+My continuation of the ShiftOS: Rewind Project using WinForms.
diff --git a/ShiftOS.Engine/CodepointUpgrade.cs b/ShiftOS.Engine/CodepointUpgrade.cs
new file mode 100644
index 0000000..9f4f0f1
--- /dev/null
+++ b/ShiftOS.Engine/CodepointUpgrade.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using ShiftOS.Engine;
+
+namespace ShiftOS.Engine
+{
+ public class CodepointUpgrade
+ {
+ public interface ICodepointUpgrade
+ {
+ int codePoints { get; set; }
+ }
+ }
+}
diff --git a/ShiftOS.Engine/SaveSystem.cs b/ShiftOS.Engine/SaveSystem.cs
index 59ddf4b..51924d0 100644
--- a/ShiftOS.Engine/SaveSystem.cs
+++ b/ShiftOS.Engine/SaveSystem.cs
@@ -16,6 +16,13 @@ namespace ShiftOS.Engine
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "ShiftOS-Rewind");
}
}
+ public static string dataDir
+ {
+ get
+ {
+ return gameDir + "\\Data";
+ }
+ }
public static string fontDir
{
get
@@ -23,5 +30,73 @@ namespace ShiftOS.Engine
return gameDir + "\\Fonts";
}
}
+ public static string baseGameDir
+ {
+ get
+ {
+ return gameDir + "\\GameData";
+ }
+ }
+ public static string homeDir
+ {
+ get
+ {
+ return baseGameDir + "\\Home";
+ }
+ }
+ public static string desktopDir
+ {
+ get
+ {
+ return homeDir + "\\Desktop";
+ }
+ }
+ public static string docDir
+ {
+ get
+ {
+ return homeDir + "\\Documents";
+ }
+ }
+ public static string downloadsDir
+ {
+ get
+ {
+ return homeDir + "\\Downloads";
+ }
+ }
+ public static string musicDir
+ {
+ get
+ {
+ return homeDir + "\\Music";
+ }
+ }
+ public static string picDir
+ {
+ get { return homeDir + "\\Pictures"; }
+ }
+ public static class User
+ {
+ public static int codePoints
+ {
+ get
+ {
+ return 0;
+ }
+ set
+ {
+
+ }
+ }
+ public static void AddToCodePoints(int amountToAdd)
+ {
+ codePoints += amountToAdd;
+ using (var fs = File.OpenWrite(dataDir + "\\userCodePoints.whoa"))
+ {
+ Whoa.Whoa.SerialiseObject(fs, codePoints);
+ }
+ }
+ }
}
}
diff --git a/ShiftOS.Engine/ShiftOS.Engine.csproj b/ShiftOS.Engine/ShiftOS.Engine.csproj
index faff407..fe4a06e 100644
--- a/ShiftOS.Engine/ShiftOS.Engine.csproj
+++ b/ShiftOS.Engine/ShiftOS.Engine.csproj
@@ -55,6 +55,7 @@
</Reference>
</ItemGroup>
<ItemGroup>
+ <Compile Include="CodepointUpgrade.cs" />
<Compile Include="Misc\EventList.cs" />
<Compile Include="Misc\IniFile.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
@@ -78,11 +79,12 @@
<Compile Include="ShiftFS\IShiftNode.cs" />
<Compile Include="Misc\Tools.cs" />
<Compile Include="UI\ShiftButton.cs">
- <SubType>UserControl</SubType>
+ <SubType>Component</SubType>
</Compile>
<Compile Include="UI\ShiftButton.Designer.cs">
<DependentUpon>ShiftButton.cs</DependentUpon>
</Compile>
+ <Compile Include="UI\ShiftStripRenderer.cs" />
<Compile Include="WindowManager\InfoboxTemplate.cs">
<SubType>UserControl</SubType>
</Compile>
@@ -107,6 +109,9 @@
<EmbeddedResource Include="ShiftFS\FileGUI\FileOpener.resx">
<DependentUpon>FileOpener.cs</DependentUpon>
</EmbeddedResource>
+ <EmbeddedResource Include="UI\ShiftButton.resx">
+ <DependentUpon>ShiftButton.cs</DependentUpon>
+ </EmbeddedResource>
<EmbeddedResource Include="WindowManager\InfoboxTemplate.resx">
<DependentUpon>InfoboxTemplate.cs</DependentUpon>
</EmbeddedResource>
diff --git a/ShiftOS.Engine/UI/ShiftButton.Designer.cs b/ShiftOS.Engine/UI/ShiftButton.Designer.cs
index a84ba4a..c746a5e 100644
--- a/ShiftOS.Engine/UI/ShiftButton.Designer.cs
+++ b/ShiftOS.Engine/UI/ShiftButton.Designer.cs
@@ -2,7 +2,7 @@
{
partial class ShiftButton
{
- /// <summary>
+ /// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
@@ -22,14 +22,15 @@
#region Component Designer generated code
- /// <summary>
- /// Required method for Designer support - do not modify
+ /// <summary>
+ /// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
- components = new System.ComponentModel.Container();
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.SuspendLayout();
+ this.ResumeLayout(false);
+
}
#endregion
diff --git a/ShiftOS.Engine/UI/ShiftButton.cs b/ShiftOS.Engine/UI/ShiftButton.cs
index ebf6e2b..8e4104d 100644
--- a/ShiftOS.Engine/UI/ShiftButton.cs
+++ b/ShiftOS.Engine/UI/ShiftButton.cs
@@ -1,8 +1,6 @@
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;
@@ -10,11 +8,63 @@ using System.Windows.Forms;
namespace ShiftOS.Engine.UI
{
- public partial class ShiftButton : UserControl
+ public partial class ShiftButton : Button
{
- public ShiftButton()
+ private static Font _normalFont = new Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+
+ private static Color _back = System.Drawing.Color.Black;
+ private static Color _border = System.Drawing.Color.White;
+ private static Color _activeBorder = System.Drawing.Color.Black;
+ private static Color _fore = System.Drawing.Color.Black;
+ private static Padding _margin = new System.Windows.Forms.Padding(0, 0, 0, 0);
+ private static Padding _padding = new System.Windows.Forms.Padding(3, 3, 3, 3);
+
+ private static Size _minSize = new System.Drawing.Size(75, 23);
+
+ private bool _active;
+
+ public ShiftButton(): base()
+ {
+ base.Font = _normalFont;
+ base.BackColor = _border;
+ base.ForeColor = _fore;
+ base.FlatAppearance.BorderColor = _back;
+ base.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ base.Margin = _margin;
+ base.Padding = _padding;
+ base.MinimumSize = _minSize;
+ }
+
+ protected override void OnControlAdded(ControlEventArgs e)
+ {
+ base.OnControlAdded(e);
+ UseVisualStyleBackColor = false;
+ }
+
+ protected override void OnMouseEnter(System.EventArgs e)
+ {
+ base.OnMouseEnter(e);
+ if (!_active)
+ base.FlatAppearance.BorderColor = _activeBorder;
+ }
+
+ protected override void OnMouseLeave(System.EventArgs e)
+ {
+ base.OnMouseLeave(e);
+ if (!_active)
+ base.FlatAppearance.BorderColor = _border;
+ }
+
+ public void SetStateActive()
+ {
+ _active = true;
+ base.FlatAppearance.BorderColor = _activeBorder;
+ }
+
+ public void SetStateNormal()
{
- InitializeComponent();
+ _active = false;
+ base.FlatAppearance.BorderColor = _border;
}
}
}
diff --git a/ShiftOS.Engine/UI/ShiftButton.resx b/ShiftOS.Engine/UI/ShiftButton.resx
new file mode 100644
index 0000000..e5858cc
--- /dev/null
+++ b/ShiftOS.Engine/UI/ShiftButton.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.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>False</value>
+ </metadata>
+</root> \ No newline at end of file
diff --git a/ShiftOS.Engine/UI/ShiftStripRenderer.cs b/ShiftOS.Engine/UI/ShiftStripRenderer.cs
new file mode 100644
index 0000000..7b8498f
--- /dev/null
+++ b/ShiftOS.Engine/UI/ShiftStripRenderer.cs
@@ -0,0 +1,21 @@
+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 : ToolStripProfessionalRenderer
+ {
+ protected override void OnRenderLabelBackground(ToolStripItemRenderEventArgs e)
+ {
+ using (var b = new SolidBrush(e.Item.BackColor))
+ {
+ e.Graphics.FillRectangle(b, new Rectangle(Point.Empty, e.Item.Size));
+ }
+ }
+ }
+}
diff --git a/ShiftOS.Engine/WindowManager/InfoboxTemplate.Designer.cs b/ShiftOS.Engine/WindowManager/InfoboxTemplate.Designer.cs
index 58c191e..3279179 100644
--- a/ShiftOS.Engine/WindowManager/InfoboxTemplate.Designer.cs
+++ b/ShiftOS.Engine/WindowManager/InfoboxTemplate.Designer.cs
@@ -29,42 +29,14 @@
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
- this.btnOpt1 = new System.Windows.Forms.Button();
- this.btnOpt2 = new System.Windows.Forms.Button();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.changeSize = new System.Windows.Forms.Timer(this.components);
- this.label1 = new System.Windows.Forms.Label();
+ this.label1 = new System.Windows.Forms.TextBox();
+ this.btnOpt2 = new ShiftOS.Engine.UI.ShiftButton();
+ this.btnOpt1 = new ShiftOS.Engine.UI.ShiftButton();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
- // btnOpt1
- //
- this.btnOpt1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.btnOpt1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btnOpt1.Font = new System.Drawing.Font("Lucida Console", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.btnOpt1.Location = new System.Drawing.Point(73, 170);
- this.btnOpt1.Name = "btnOpt1";
- this.btnOpt1.Size = new System.Drawing.Size(117, 23);
- this.btnOpt1.TabIndex = 0;
- this.btnOpt1.Text = "button1";
- this.btnOpt1.UseVisualStyleBackColor = true;
- this.btnOpt1.Click += new System.EventHandler(this.btnOpt1_Click);
- //
- // btnOpt2
- //
- this.btnOpt2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.btnOpt2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btnOpt2.Font = new System.Drawing.Font("Lucida Console", 9F);
- this.btnOpt2.Location = new System.Drawing.Point(243, 170);
- this.btnOpt2.Name = "btnOpt2";
- this.btnOpt2.Size = new System.Drawing.Size(117, 23);
- this.btnOpt2.TabIndex = 1;
- this.btnOpt2.Text = "button2";
- this.btnOpt2.UseVisualStyleBackColor = true;
- this.btnOpt2.Click += new System.EventHandler(this.btnOpt2_Click);
- //
// pictureBox1
//
this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
@@ -83,22 +55,57 @@
//
// label1
//
- this.label1.AutoSize = true;
- this.label1.Font = new System.Drawing.Font("Lucida Console", 9.25F);
- this.label1.Location = new System.Drawing.Point(107, 48);
+ this.label1.BackColor = System.Drawing.Color.White;
+ this.label1.BorderStyle = System.Windows.Forms.BorderStyle.None;
+ this.label1.Font = new System.Drawing.Font("Lucida Console", 8.25F);
+ this.label1.Location = new System.Drawing.Point(90, 35);
+ this.label1.Multiline = true;
this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(55, 13);
- this.label1.TabIndex = 3;
- this.label1.Text = "label1";
+ this.label1.Size = new System.Drawing.Size(256, 125);
+ this.label1.TabIndex = 6;
+ //
+ // btnOpt2
+ //
+ this.btnOpt2.BackColor = System.Drawing.SystemColors.Control;
+ this.btnOpt2.FlatAppearance.BorderColor = System.Drawing.Color.Black;
+ this.btnOpt2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnOpt2.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.btnOpt2.ForeColor = System.Drawing.Color.Black;
+ this.btnOpt2.Location = new System.Drawing.Point(229, 163);
+ this.btnOpt2.Margin = new System.Windows.Forms.Padding(0);
+ this.btnOpt2.MinimumSize = new System.Drawing.Size(75, 23);
+ this.btnOpt2.Name = "btnOpt2";
+ this.btnOpt2.Padding = new System.Windows.Forms.Padding(3);
+ this.btnOpt2.Size = new System.Drawing.Size(117, 31);
+ this.btnOpt2.TabIndex = 5;
+ this.btnOpt2.Text = "shiftButton2";
+ this.btnOpt2.UseVisualStyleBackColor = false;
+ //
+ // btnOpt1
+ //
+ this.btnOpt1.BackColor = System.Drawing.SystemColors.Control;
+ this.btnOpt1.FlatAppearance.BorderColor = System.Drawing.Color.Black;
+ this.btnOpt1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnOpt1.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.btnOpt1.ForeColor = System.Drawing.Color.Black;
+ this.btnOpt1.Location = new System.Drawing.Point(90, 163);
+ this.btnOpt1.Margin = new System.Windows.Forms.Padding(0);
+ this.btnOpt1.MinimumSize = new System.Drawing.Size(75, 23);
+ this.btnOpt1.Name = "btnOpt1";
+ this.btnOpt1.Padding = new System.Windows.Forms.Padding(3);
+ this.btnOpt1.Size = new System.Drawing.Size(117, 31);
+ this.btnOpt1.TabIndex = 4;
+ this.btnOpt1.Text = "shiftButton1";
+ this.btnOpt1.UseVisualStyleBackColor = false;
//
// InfoboxTemplate
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.label1);
- this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.btnOpt2);
this.Controls.Add(this.btnOpt1);
+ this.Controls.Add(this.pictureBox1);
this.Name = "InfoboxTemplate";
this.Size = new System.Drawing.Size(438, 210);
this.Load += new System.EventHandler(this.InfoboxTemplate_Load);
@@ -109,11 +116,10 @@
}
#endregion
-
- public System.Windows.Forms.Button btnOpt1;
- public System.Windows.Forms.Button btnOpt2;
public System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Timer changeSize;
- public System.Windows.Forms.Label label1;
+ private UI.ShiftButton btnOpt1;
+ private UI.ShiftButton btnOpt2;
+ public System.Windows.Forms.TextBox label1;
}
}
diff --git a/ShiftOS.Engine/WindowManager/InfoboxTemplate.cs b/ShiftOS.Engine/WindowManager/InfoboxTemplate.cs
index 5d55cf2..72bb530 100644
--- a/ShiftOS.Engine/WindowManager/InfoboxTemplate.cs
+++ b/ShiftOS.Engine/WindowManager/InfoboxTemplate.cs
@@ -23,32 +23,25 @@ namespace ShiftOS.Engine.WindowManager
Cancel,
Ok
}
-
- int _buttonChoice;
- int _buttonSelected;
Stream _str;
public InfoboxTemplate(ButtonType type)
{
InitializeComponent();
-
switch (type)
{
case ButtonType.Ok:
btnOpt1.Text = "OK";
btnOpt2.Hide();
- btnOpt1.Location = new Point(109, 134);
- _buttonChoice = 1;
+ btnOpt1.Location = new Point(156, 163);
break;
case ButtonType.OkCancel:
btnOpt1.Text = "OK";
btnOpt2.Text = "Cancel";
- _buttonChoice = 2;
break;
case ButtonType.YesNo:
btnOpt1.Text = "Yes";
btnOpt2.Text = "No";
- _buttonChoice = 3;
break;
}
}
@@ -58,11 +51,12 @@ namespace ShiftOS.Engine.WindowManager
switch (btnOpt1.Text)
{
case "OK":
- ParentForm?.Close();
+ btnOpt1.DialogResult = System.Windows.Forms.DialogResult.OK;
+ ParentForm?.Close();
break;
case "Yes":
- _buttonSelected = 2;
- ParentForm?.Close();
+ btnOpt1.DialogResult = System.Windows.Forms.DialogResult.Yes;
+ ParentForm?.Close();
break;
}
}
@@ -72,11 +66,12 @@ namespace ShiftOS.Engine.WindowManager
switch (btnOpt2.Text)
{
case "No":
- _buttonSelected = 3;
- break;
+ btnOpt2.DialogResult = System.Windows.Forms.DialogResult.No;
+ ParentForm?.Close();
+ break;
case "Cancel":
- _buttonSelected = 4;
- break;
+ btnOpt2.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ break;
}
}
@@ -89,6 +84,16 @@ namespace ShiftOS.Engine.WindowManager
}
void InfoboxTemplate_Load(object sender, EventArgs e)
- => Play();
- }
+ {
+ Play();
+ SizeAndLoad(label1.Size.Width, label1.Size.Width);
+ }
+ private Size SizeAndLoad(int x, int y)
+ {
+ this.Size = new Size(x, y);
+ Left = (Screen.PrimaryScreen.Bounds.Width - Width) / 2;
+ Top = (Screen.PrimaryScreen.Bounds.Top - Height) / 2;
+ return Size;
+ }
+ }
} \ No newline at end of file
diff --git a/ShiftOS.Engine/WindowManager/ShiftSkinData.cs b/ShiftOS.Engine/WindowManager/ShiftSkinData.cs
index 165f5bb..cfaf4be 100644
--- a/ShiftOS.Engine/WindowManager/ShiftSkinData.cs
+++ b/ShiftOS.Engine/WindowManager/ShiftSkinData.cs
@@ -5,19 +5,36 @@ namespace ShiftOS.Engine.WindowManager
public abstract class ShiftSkinData
{
// ColorData
- public static Color LeftTopCornerColor = Color.Empty;
- public static Color TitleBarColor = Color.Empty;
- public static Color RightTopCornerColor = Color.Empty;
- public static Color BtnCloseColor = Color.Empty;
- public static Color BtnMaxColor = Color.Empty;
- public static Color BtnMinColor = Color.Empty;
- public static Color BtnCloseHoverColor = Color.Empty;
- public static Color BtnMaxHoverColor = Color.Empty;
- public static Color BtnMinHoverColor = Color.Empty;
- public static Color LeftSideColor = Color.Empty;
- public static Color RightSideColor = Color.Empty;
- public static Color LeftBottomCornerColor = Color.Empty;
- public static Color BottomSideColor = Color.Empty;
- public static Color RightBottomCornerColor = Color.Empty;
- }
+ public static skinColors Colors = new skinColors();
+ public static skinTextures Images = new skinTextures();
+ }
+
+ public class skinTextures
+ {
+ public skinTextures()
+ {
+
+ }
+ }
+}
+
+namespace ShiftOS.Engine.WindowManager
+{
+ public class skinColors
+ {
+ public Color LeftTopCornerColor;
+ public Color TitleBarColor;
+ public Color RightTopCornerColor;
+ public Color BtnCloseColor;
+ public Color BtnMaxColor;
+ public Color BtnMinColor;
+ public Color BtnCloseHoverColor;
+ public Color BtnMaxHoverColor;
+ public Color BtnMinHoverColor;
+ public Color LeftSideColor;
+ public Color RightSideColor;
+ public Color LeftBottomCornerColor;
+ public Color BottomSideColor;
+ public Color RightBottomCornerColor;
+ }
} \ No newline at end of file
diff --git a/ShiftOS.Engine/WindowManager/ShiftWM.cs b/ShiftOS.Engine/WindowManager/ShiftWM.cs
index 4b57961..a910c0c 100644
--- a/ShiftOS.Engine/WindowManager/ShiftWM.cs
+++ b/ShiftOS.Engine/WindowManager/ShiftWM.cs
@@ -43,36 +43,36 @@ namespace ShiftOS.Engine.WindowManager
app.Width = content.Width + app.leftSide.Width + app.rightSide.Width;
app.Height = content.Height + app.bottomSide.Height + app.titleBar.Height;
- if (ShiftSkinData.TitleBarColor == Color.Empty)
+ if (ShiftSkinData.Colors.TitleBarColor == Color.Empty)
{
- var borderColor = Color.FromArgb(64, 64, 64);
- ShiftSkinData.BtnCloseColor = Color.Black;
- ShiftSkinData.BtnCloseHoverColor = Color.FromArgb(40, 40, 40);
- ShiftSkinData.BtnMaxColor = Color.Black;
- ShiftSkinData.BtnMaxHoverColor = Color.FromArgb(40, 40, 40);
- ShiftSkinData.BtnMinColor = Color.Black;
- ShiftSkinData.BtnMinHoverColor = Color.FromArgb(40, 40, 40);
- ShiftSkinData.LeftTopCornerColor = borderColor;
- ShiftSkinData.TitleBarColor = borderColor;
- ShiftSkinData.RightTopCornerColor = borderColor;
- ShiftSkinData.LeftSideColor = borderColor;
- ShiftSkinData.RightSideColor = borderColor;
- ShiftSkinData.LeftBottomCornerColor = borderColor;
- ShiftSkinData.BottomSideColor = borderColor;
- ShiftSkinData.RightBottomCornerColor = borderColor;
+ Color borderColor = Color.FromArgb(64, 64, 64);
+ ShiftSkinData.Colors.BtnCloseColor = Color.Black;
+ ShiftSkinData.Colors.BtnCloseHoverColor = Color.FromArgb(40, 40, 40);
+ ShiftSkinData.Colors.BtnMaxColor = Color.Black;
+ ShiftSkinData.Colors.BtnMaxHoverColor = Color.FromArgb(40, 40, 40);
+ ShiftSkinData.Colors.BtnMinColor = Color.Black;
+ ShiftSkinData.Colors.BtnMinHoverColor = Color.FromArgb(40, 40, 40);
+ ShiftSkinData.Colors.LeftTopCornerColor = borderColor;
+ ShiftSkinData.Colors.TitleBarColor = borderColor;
+ ShiftSkinData.Colors.RightTopCornerColor = borderColor;
+ ShiftSkinData.Colors.LeftSideColor = borderColor;
+ ShiftSkinData.Colors.RightSideColor = borderColor;
+ ShiftSkinData.Colors.LeftBottomCornerColor = borderColor;
+ ShiftSkinData.Colors.BottomSideColor = borderColor;
+ ShiftSkinData.Colors.RightBottomCornerColor = borderColor;
}
- app.btnClose.BackColor = ShiftSkinData.BtnCloseColor;
- app.btnMax.BackColor = ShiftSkinData.BtnMaxColor;
- app.btnMin.BackColor = ShiftSkinData.BtnMinColor;
- app.leftTopCorner.BackColor = ShiftSkinData.LeftTopCornerColor;
- app.titleBar.BackColor = ShiftSkinData.TitleBarColor;
- app.rightTopCorner.BackColor = ShiftSkinData.RightTopCornerColor;
- app.leftSide.BackColor = ShiftSkinData.LeftSideColor;
- app.rightSide.BackColor = ShiftSkinData.RightSideColor;
- app.leftBottomCorner.BackColor = ShiftSkinData.LeftBottomCornerColor;
- app.bottomSide.BackColor = ShiftSkinData.BottomSideColor;
- app.rightBottomCorner.BackColor = ShiftSkinData.RightBottomCornerColor;
+ app.btnClose.BackColor = ShiftSkinData.Colors.BtnCloseColor;
+ app.btnMax.BackColor = ShiftSkinData.Colors.BtnMaxColor;
+ app.btnMin.BackColor = ShiftSkinData.Colors.BtnMinColor;
+ app.leftTopCorner.BackColor = ShiftSkinData.Colors.LeftTopCornerColor;
+ app.titleBar.BackColor = ShiftSkinData.Colors.TitleBarColor;
+ app.rightTopCorner.BackColor = ShiftSkinData.Colors.RightTopCornerColor;
+ app.leftSide.BackColor = ShiftSkinData.Colors.LeftSideColor;
+ app.rightSide.BackColor = ShiftSkinData.Colors.RightSideColor;
+ app.leftBottomCorner.BackColor = ShiftSkinData.Colors.LeftBottomCornerColor;
+ app.bottomSide.BackColor = ShiftSkinData.Colors.BottomSideColor;
+ app.rightBottomCorner.BackColor = ShiftSkinData.Colors.RightBottomCornerColor;
// Icon Setup
diff --git a/ShiftOS.Engine/WindowManager/ShiftWindow.cs b/ShiftOS.Engine/WindowManager/ShiftWindow.cs
index e407e33..95ae4a9 100644
--- a/ShiftOS.Engine/WindowManager/ShiftWindow.cs
+++ b/ShiftOS.Engine/WindowManager/ShiftWindow.cs
@@ -52,23 +52,23 @@ namespace ShiftOS.Engine.WindowManager
=> Close();
void closebutton_MouseEnter(object sender, EventArgs e)
- => btnClose.BackColor = ShiftSkinData.BtnCloseHoverColor;
+ => btnClose.BackColor = ShiftSkinData.Colors.BtnCloseHoverColor;
void closebutton_MouseLeave(object sender, EventArgs e)
- => btnClose.BackColor = ShiftSkinData.BtnCloseColor;
+ => btnClose.BackColor = ShiftSkinData.Colors.BtnCloseColor;
void maximizebutton_MouseEnter(object sender, EventArgs e)
- => btnMax.BackColor = ShiftSkinData.BtnMaxHoverColor;
+ => btnMax.BackColor = ShiftSkinData.Colors.BtnMaxHoverColor;
void maximizebutton_MouseLeave(object sender, EventArgs e)
- => btnMax.BackColor = ShiftSkinData.BtnMaxColor;
+ => btnMax.BackColor = ShiftSkinData.Colors.BtnMaxColor;
void minimizebutton_MouseEnter(object sender, EventArgs e)
- => btnMin.BackColor = ShiftSkinData.BtnMinHoverColor;
+ => btnMin.BackColor = ShiftSkinData.Colors.BtnMinHoverColor;
void minimizebutton_MouseLeave(object sender, EventArgs e)
- => btnMin.BackColor = ShiftSkinData.BtnMinColor;
+ => btnMin.BackColor = ShiftSkinData.Colors.BtnMinColor;
/*
private void closebutton_MouseDown(object sender, MouseEventArgs e)
diff --git a/ShiftOS.Main/Program.cs b/ShiftOS.Main/Program.cs
index f7c00eb..acce816 100644
--- a/ShiftOS.Main/Program.cs
+++ b/ShiftOS.Main/Program.cs
@@ -15,7 +15,24 @@ namespace ShiftOS.Main
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
- Application.Run(new Desktop());
- }
+
+
+ bool terminalMode = true;
+ if (terminalMode)
+ {
+ Form terminalForm = new Form();
+ ShiftOS.Apps.Terminal term = new ShiftOS.Apps.Terminal();
+ terminalForm.Controls.Add(term);
+ terminalForm.FormBorderStyle = FormBorderStyle.None;
+ terminalForm.WindowState = FormWindowState.Maximized;
+ term.Dock = DockStyle.Fill;
+ //terminalForm.Show();
+ Application.Run(terminalForm);
+ }
+ else
+ {
+ Application.Run(new Desktop());
+ }
+ }
}
} \ No newline at end of file
diff --git a/ShiftOS.Main/ShiftOS.Main.csproj b/ShiftOS.Main/ShiftOS.Main.csproj
index 4098fc9..ad01ba0 100644
--- a/ShiftOS.Main/ShiftOS.Main.csproj
+++ b/ShiftOS.Main/ShiftOS.Main.csproj
@@ -63,12 +63,6 @@
<Compile Include="ShiftOS\Apps\ShifterStuff\SelectColor.Designer.cs">
<DependentUpon>SelectColor.cs</DependentUpon>
</Compile>
- <Compile Include="ShiftOS\Apps\ShiftDemo.cs">
- <SubType>UserControl</SubType>
- </Compile>
- <Compile Include="ShiftOS\Apps\ShiftDemo.Designer.cs">
- <DependentUpon>ShiftDemo.cs</DependentUpon>
- </Compile>
<Compile Include="ShiftOS\Apps\ShifterStuff\Shifter.cs">
<SubType>UserControl</SubType>
</Compile>
@@ -81,12 +75,6 @@
<Compile Include="ShiftOS\Apps\Terminal.Designer.cs">
<DependentUpon>Terminal.cs</DependentUpon>
</Compile>
- <Compile Include="ShiftOS\Apps\TestForm.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="ShiftOS\Apps\TestForm.Designer.cs">
- <DependentUpon>TestForm.cs</DependentUpon>
- </Compile>
<Compile Include="ShiftOS\Apps\TextPad.cs">
<SubType>UserControl</SubType>
</Compile>
@@ -99,10 +87,14 @@
<Compile Include="ShiftOS\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" />
+ <Compile Include="Terminal\Commands\Echo.cs" />
<Compile Include="Terminal\Commands\Hello.cs" />
<Compile Include="Terminal\Commands\Help.cs" />
<Compile Include="Terminal\Commands\sftp.cs" />
+ <Compile Include="Terminal\Commands\shutdown.cs" />
<Compile Include="Terminal\Commands\tcpip.cs" />
<Compile Include="Terminal\Commands\TestStory.cs" />
<Compile Include="Terminal\TerminalBackend.cs" />
@@ -123,18 +115,12 @@
<EmbeddedResource Include="ShiftOS\Apps\ShifterStuff\SelectColor.resx">
<DependentUpon>SelectColor.cs</DependentUpon>
</EmbeddedResource>
- <EmbeddedResource Include="ShiftOS\Apps\ShiftDemo.resx">
- <DependentUpon>ShiftDemo.cs</DependentUpon>
- </EmbeddedResource>
<EmbeddedResource Include="ShiftOS\Apps\ShifterStuff\Shifter.resx">
<DependentUpon>Shifter.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="ShiftOS\Apps\Terminal.resx">
<DependentUpon>Terminal.cs</DependentUpon>
</EmbeddedResource>
- <EmbeddedResource Include="ShiftOS\Apps\TestForm.resx">
- <DependentUpon>TestForm.cs</DependentUpon>
- </EmbeddedResource>
<EmbeddedResource Include="ShiftOS\Apps\TextPad.resx">
<DependentUpon>TextPad.cs</DependentUpon>
</EmbeddedResource>
diff --git a/ShiftOS.Main/ShiftOS/Apps/FileSkimmer.Designer.cs b/ShiftOS.Main/ShiftOS/Apps/FileSkimmer.Designer.cs
index f2e0d76..5a23ec7 100644
--- a/ShiftOS.Main/ShiftOS/Apps/FileSkimmer.Designer.cs
+++ b/ShiftOS.Main/ShiftOS/Apps/FileSkimmer.Designer.cs
@@ -30,206 +30,209 @@ namespace ShiftOS.Main.ShiftOS.Apps
/// </summary>
private void InitializeComponent()
{
- this.components = new System.ComponentModel.Container();
- System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FileSkimmer));
- this.menuStrip1 = new System.Windows.Forms.MenuStrip();
- this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.newFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.newFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.breadcrumbsBar = new System.Windows.Forms.ToolStrip();
- this.toolStrip2 = new System.Windows.Forms.ToolStrip();
- this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
- this.toolStripDropDownButton1 = new System.Windows.Forms.ToolStripDropDownButton();
- this.largeIconsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.smallIconsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.detailsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.listToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.tilesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.listView1 = new System.Windows.Forms.ListView();
- this.textFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
- this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.renameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.deleteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.menuStrip1.SuspendLayout();
- this.toolStrip2.SuspendLayout();
- this.contextMenuStrip1.SuspendLayout();
- this.SuspendLayout();
- //
- // menuStrip1
- //
- this.menuStrip1.ImageScalingSize = new System.Drawing.Size(24, 24);
- this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.components = new System.ComponentModel.Container();
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FileSkimmer));
+ this.menuStrip1 = new System.Windows.Forms.MenuStrip();
+ this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.newFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.textFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.newFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.breadcrumbsBar = new System.Windows.Forms.ToolStrip();
+ this.toolStrip2 = new System.Windows.Forms.ToolStrip();
+ this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
+ this.toolStripDropDownButton1 = new System.Windows.Forms.ToolStripDropDownButton();
+ this.largeIconsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.smallIconsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.detailsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.listToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.tilesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.listView1 = new System.Windows.Forms.ListView();
+ this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.renameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.deleteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.menuStrip1.SuspendLayout();
+ this.toolStrip2.SuspendLayout();
+ this.contextMenuStrip1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // menuStrip1
+ //
+ this.menuStrip1.ImageScalingSize = new System.Drawing.Size(24, 24);
+ this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.fileToolStripMenuItem});
- this.menuStrip1.Location = new System.Drawing.Point(0, 0);
- this.menuStrip1.Name = "menuStrip1";
- this.menuStrip1.Size = new System.Drawing.Size(1541, 33);
- this.menuStrip1.TabIndex = 1;
- this.menuStrip1.Text = "menuStrip1";
- //
- // fileToolStripMenuItem
- //
- this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.menuStrip1.Location = new System.Drawing.Point(0, 0);
+ this.menuStrip1.Name = "menuStrip1";
+ this.menuStrip1.Padding = new System.Windows.Forms.Padding(4, 1, 0, 1);
+ this.menuStrip1.Size = new System.Drawing.Size(1027, 24);
+ this.menuStrip1.TabIndex = 1;
+ this.menuStrip1.Text = "menuStrip1";
+ //
+ // fileToolStripMenuItem
+ //
+ this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.newFileToolStripMenuItem,
this.newFolderToolStripMenuItem});
- this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
- this.fileToolStripMenuItem.Size = new System.Drawing.Size(50, 29);
- this.fileToolStripMenuItem.Text = "File";
- //
- // newFileToolStripMenuItem
- //
- this.newFileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
+ this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 22);
+ this.fileToolStripMenuItem.Text = "File";
+ //
+ // newFileToolStripMenuItem
+ //
+ this.newFileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.textFileToolStripMenuItem});
- this.newFileToolStripMenuItem.Name = "newFileToolStripMenuItem";
- this.newFileToolStripMenuItem.Size = new System.Drawing.Size(210, 30);
- this.newFileToolStripMenuItem.Text = "New File";
- //
- // newFolderToolStripMenuItem
- //
- this.newFolderToolStripMenuItem.Name = "newFolderToolStripMenuItem";
- this.newFolderToolStripMenuItem.Size = new System.Drawing.Size(210, 30);
- this.newFolderToolStripMenuItem.Text = "New Folder";
- //
- // breadcrumbsBar
- //
- this.breadcrumbsBar.ImageScalingSize = new System.Drawing.Size(24, 24);
- this.breadcrumbsBar.Location = new System.Drawing.Point(0, 33);
- this.breadcrumbsBar.Name = "breadcrumbsBar";
- this.breadcrumbsBar.Size = new System.Drawing.Size(1541, 25);
- this.breadcrumbsBar.TabIndex = 2;
- this.breadcrumbsBar.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.breadcrumbsBar_ItemClicked);
- //
- // toolStrip2
- //
- this.toolStrip2.ImageScalingSize = new System.Drawing.Size(24, 24);
- this.toolStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.newFileToolStripMenuItem.Name = "newFileToolStripMenuItem";
+ this.newFileToolStripMenuItem.Size = new System.Drawing.Size(134, 22);
+ this.newFileToolStripMenuItem.Text = "New File";
+ //
+ // textFileToolStripMenuItem
+ //
+ this.textFileToolStripMenuItem.Name = "textFileToolStripMenuItem";
+ this.textFileToolStripMenuItem.Size = new System.Drawing.Size(114, 22);
+ this.textFileToolStripMenuItem.Text = "Text file";
+ this.textFileToolStripMenuItem.Click += new System.EventHandler(this.textFileToolStripMenuItem_Click);
+ //
+ // newFolderToolStripMenuItem
+ //
+ this.newFolderToolStripMenuItem.Name = "newFolderToolStripMenuItem";
+ this.newFolderToolStripMenuItem.Size = new System.Drawing.Size(134, 22);
+ this.newFolderToolStripMenuItem.Text = "New Folder";
+ //
+ // breadcrumbsBar
+ //
+ this.breadcrumbsBar.ImageScalingSize = new System.Drawing.Size(24, 24);
+ this.breadcrumbsBar.Location = new System.Drawing.Point(0, 24);
+ this.breadcrumbsBar.Name = "breadcrumbsBar";
+ this.breadcrumbsBar.Size = new System.Drawing.Size(1027, 25);
+ this.breadcrumbsBar.TabIndex = 2;
+ this.breadcrumbsBar.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.breadcrumbsBar_ItemClicked);
+ //
+ // toolStrip2
+ //
+ this.toolStrip2.ImageScalingSize = new System.Drawing.Size(24, 24);
+ this.toolStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripButton1,
this.toolStripDropDownButton1});
- this.toolStrip2.Location = new System.Drawing.Point(0, 58);
- this.toolStrip2.Name = "toolStrip2";
- this.toolStrip2.Size = new System.Drawing.Size(1541, 32);
- this.toolStrip2.TabIndex = 3;
- this.toolStrip2.Text = "toolbar";
- //
- // toolStripButton1
- //
- this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
- this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
- this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.toolStripButton1.Name = "toolStripButton1";
- this.toolStripButton1.Size = new System.Drawing.Size(28, 29);
- this.toolStripButton1.Text = "^";
- this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click);
- //
- // toolStripDropDownButton1
- //
- this.toolStripDropDownButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
- this.toolStripDropDownButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.toolStrip2.Location = new System.Drawing.Point(0, 49);
+ this.toolStrip2.Name = "toolStrip2";
+ this.toolStrip2.Size = new System.Drawing.Size(1027, 25);
+ this.toolStrip2.TabIndex = 3;
+ this.toolStrip2.Text = "toolbar";
+ //
+ // toolStripButton1
+ //
+ this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
+ this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
+ this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.toolStripButton1.Name = "toolStripButton1";
+ this.toolStripButton1.Size = new System.Drawing.Size(23, 22);
+ this.toolStripButton1.Text = "^";
+ this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click);
+ //
+ // toolStripDropDownButton1
+ //
+ this.toolStripDropDownButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
+ this.toolStripDropDownButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.largeIconsToolStripMenuItem,
this.smallIconsToolStripMenuItem,
this.detailsToolStripMenuItem,
this.listToolStripMenuItem,
this.tilesToolStripMenuItem});
- this.toolStripDropDownButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButton1.Image")));
- this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.toolStripDropDownButton1.Name = "toolStripDropDownButton1";
- this.toolStripDropDownButton1.Size = new System.Drawing.Size(119, 29);
- this.toolStripDropDownButton1.Text = "View Mode";
- this.toolStripDropDownButton1.DropDownItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.toolStripDropDownButton1_DropDownItemClicked);
- //
- // largeIconsToolStripMenuItem
- //
- this.largeIconsToolStripMenuItem.Name = "largeIconsToolStripMenuItem";
- this.largeIconsToolStripMenuItem.Size = new System.Drawing.Size(186, 30);
- this.largeIconsToolStripMenuItem.Text = "Large Icons";
- //
- // smallIconsToolStripMenuItem
- //
- this.smallIconsToolStripMenuItem.Name = "smallIconsToolStripMenuItem";
- this.smallIconsToolStripMenuItem.Size = new System.Drawing.Size(186, 30);
- this.smallIconsToolStripMenuItem.Text = "Small Icons";
- //
- // detailsToolStripMenuItem
- //
- this.detailsToolStripMenuItem.Name = "detailsToolStripMenuItem";
- this.detailsToolStripMenuItem.Size = new System.Drawing.Size(186, 30);
- this.detailsToolStripMenuItem.Text = "Details";
- //
- // listToolStripMenuItem
- //
- this.listToolStripMenuItem.Name = "listToolStripMenuItem";
- this.listToolStripMenuItem.Size = new System.Drawing.Size(186, 30);
- this.listToolStripMenuItem.Text = "List";
- //
- // tilesToolStripMenuItem
- //
- this.tilesToolStripMenuItem.Name = "tilesToolStripMenuItem";
- this.tilesToolStripMenuItem.Size = new System.Drawing.Size(186, 30);
- this.tilesToolStripMenuItem.Text = "Tiles";
- //
- // listView1
- //
- this.listView1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.listView1.Location = new System.Drawing.Point(0, 90);
- this.listView1.Name = "listView1";
- this.listView1.Size = new System.Drawing.Size(1541, 696);
- this.listView1.TabIndex = 4;
- this.listView1.UseCompatibleStateImageBehavior = false;
- this.listView1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.listView1_MouseClick);
- this.listView1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.listView1_MouseDoubleClick);
- //
- // textFileToolStripMenuItem
- //
- this.textFileToolStripMenuItem.Name = "textFileToolStripMenuItem";
- this.textFileToolStripMenuItem.Size = new System.Drawing.Size(210, 30);
- this.textFileToolStripMenuItem.Text = "Text file";
- this.textFileToolStripMenuItem.Click += new System.EventHandler(this.textFileToolStripMenuItem_Click);
- //
- // contextMenuStrip1
- //
- this.contextMenuStrip1.ImageScalingSize = new System.Drawing.Size(24, 24);
- this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.toolStripDropDownButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButton1.Image")));
+ this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.toolStripDropDownButton1.Name = "toolStripDropDownButton1";
+ this.toolStripDropDownButton1.Size = new System.Drawing.Size(79, 22);
+ this.toolStripDropDownButton1.Text = "View Mode";
+ this.toolStripDropDownButton1.DropDownItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.toolStripDropDownButton1_DropDownItemClicked);
+ //
+ // largeIconsToolStripMenuItem
+ //
+ this.largeIconsToolStripMenuItem.Name = "largeIconsToolStripMenuItem";
+ this.largeIconsToolStripMenuItem.Size = new System.Drawing.Size(134, 22);
+ this.largeIconsToolStripMenuItem.Text = "Large Icons";
+ //
+ // smallIconsToolStripMenuItem
+ //
+ this.smallIconsToolStripMenuItem.Name = "smallIconsToolStripMenuItem";
+ this.smallIconsToolStripMenuItem.Size = new System.Drawing.Size(134, 22);
+ this.smallIconsToolStripMenuItem.Text = "Small Icons";
+ //
+ // detailsToolStripMenuItem
+ //
+ this.detailsToolStripMenuItem.Name = "detailsToolStripMenuItem";
+ this.detailsToolStripMenuItem.Size = new System.Drawing.Size(134, 22);
+ this.detailsToolStripMenuItem.Text = "Details";
+ //
+ // listToolStripMenuItem
+ //
+ this.listToolStripMenuItem.Name = "listToolStripMenuItem";
+ this.listToolStripMenuItem.Size = new System.Drawing.Size(134, 22);
+ this.listToolStripMenuItem.Text = "List";
+ //
+ // tilesToolStripMenuItem
+ //
+ this.tilesToolStripMenuItem.Name = "tilesToolStripMenuItem";
+ this.tilesToolStripMenuItem.Size = new System.Drawing.Size(134, 22);
+ this.tilesToolStripMenuItem.Text = "Tiles";
+ //
+ // listView1
+ //
+ this.listView1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.listView1.Location = new System.Drawing.Point(0, 74);
+ this.listView1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+ this.listView1.Name = "listView1";
+ this.listView1.Size = new System.Drawing.Size(1027, 437);
+ this.listView1.TabIndex = 4;
+ this.listView1.UseCompatibleStateImageBehavior = false;
+ this.listView1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.listView1_MouseClick);
+ this.listView1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.listView1_MouseDoubleClick);
+ //
+ // contextMenuStrip1
+ //
+ this.contextMenuStrip1.ImageScalingSize = new System.Drawing.Size(24, 24);
+ this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.openToolStripMenuItem,
this.renameToolStripMenuItem,
this.deleteToolStripMenuItem});
- this.contextMenuStrip1.Name = "contextMenuStrip1";
- this.contextMenuStrip1.Size = new System.Drawing.Size(148, 94);
- //
- // openToolStripMenuItem
- //
- this.openToolStripMenuItem.Name = "openToolStripMenuItem";
- this.openToolStripMenuItem.Size = new System.Drawing.Size(147, 30);
- this.openToolStripMenuItem.Text = "Open";
- //
- // renameToolStripMenuItem
- //
- this.renameToolStripMenuItem.Name = "renameToolStripMenuItem";
- this.renameToolStripMenuItem.Size = new System.Drawing.Size(147, 30);
- this.renameToolStripMenuItem.Text = "Rename";
- //
- // deleteToolStripMenuItem
- //
- this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem";
- this.deleteToolStripMenuItem.Size = new System.Drawing.Size(147, 30);
- this.deleteToolStripMenuItem.Text = "Delete";
- //
- // FileSkimmer
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.Controls.Add(this.listView1);
- this.Controls.Add(this.toolStrip2);
- this.Controls.Add(this.breadcrumbsBar);
- this.Controls.Add(this.menuStrip1);
- this.Name = "FileSkimmer";
- this.Size = new System.Drawing.Size(1541, 786);
- this.menuStrip1.ResumeLayout(false);
- this.menuStrip1.PerformLayout();
- this.toolStrip2.ResumeLayout(false);
- this.toolStrip2.PerformLayout();
- this.contextMenuStrip1.ResumeLayout(false);
- this.ResumeLayout(false);
- this.PerformLayout();
+ this.contextMenuStrip1.Name = "contextMenuStrip1";
+ this.contextMenuStrip1.Size = new System.Drawing.Size(118, 70);
+ //
+ // openToolStripMenuItem
+ //
+ this.openToolStripMenuItem.Name = "openToolStripMenuItem";
+ this.openToolStripMenuItem.Size = new System.Drawing.Size(117, 22);
+ this.openToolStripMenuItem.Text = "Open";
+ //
+ // renameToolStripMenuItem
+ //
+ this.renameToolStripMenuItem.Name = "renameToolStripMenuItem";
+ this.renameToolStripMenuItem.Size = new System.Drawing.Size(117, 22);
+ this.renameToolStripMenuItem.Text = "Rename";
+ //
+ // deleteToolStripMenuItem
+ //
+ this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem";
+ this.deleteToolStripMenuItem.Size = new System.Drawing.Size(117, 22);
+ this.deleteToolStripMenuItem.Text = "Delete";
+ //
+ // FileSkimmer
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.listView1);
+ this.Controls.Add(this.toolStrip2);
+ this.Controls.Add(this.breadcrumbsBar);
+ this.Controls.Add(this.menuStrip1);
+ this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+ this.Name = "FileSkimmer";
+ this.Size = new System.Drawing.Size(1027, 511);
+ this.menuStrip1.ResumeLayout(false);
+ this.menuStrip1.PerformLayout();
+ this.toolStrip2.ResumeLayout(false);
+ this.toolStrip2.PerformLayout();
+ this.contextMenuStrip1.ResumeLayout(false);
+ this.ResumeLayout(false);
+ this.PerformLayout();
}
diff --git a/ShiftOS.Main/ShiftOS/Apps/FileSkimmer.cs b/ShiftOS.Main/ShiftOS/Apps/FileSkimmer.cs
index ae26b2d..58cc126 100644
--- a/ShiftOS.Main/ShiftOS/Apps/FileSkimmer.cs
+++ b/ShiftOS.Main/ShiftOS/Apps/FileSkimmer.cs
@@ -6,6 +6,7 @@ using ShiftOS.Engine.Misc;
using ShiftOS.Engine.ShiftFS;
using ShiftOS.Engine.WindowManager;
using System.Linq;
+using ShiftOS.Engine.UI;
namespace ShiftOS.Main.ShiftOS.Apps
{
@@ -16,6 +17,7 @@ namespace ShiftOS.Main.ShiftOS.Apps
public FileSkimmer()
{
InitializeComponent();
+
}
public void OnLoaded(ShiftWindow window)
diff --git a/ShiftOS.Main/ShiftOS/Apps/FileSkimmer.resx b/ShiftOS.Main/ShiftOS/Apps/FileSkimmer.resx
index 97a52d3..aeeea08 100644
--- a/ShiftOS.Main/ShiftOS/Apps/FileSkimmer.resx
+++ b/ShiftOS.Main/ShiftOS/Apps/FileSkimmer.resx
@@ -130,7 +130,7 @@
<data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
- YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
+ YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
@@ -145,7 +145,7 @@
<data name="toolStripDropDownButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
- YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
+ YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
diff --git a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.Designer.cs b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.Designer.cs
index 5d50bc0..5e617cb 100644
--- a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.Designer.cs
+++ b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.Designer.cs
@@ -128,6 +128,7 @@
this.Font = new System.Drawing.Font("Lucida Console", 9.25F);
this.Name = "SelectColor";
this.Size = new System.Drawing.Size(317, 158);
+ this.Load += new System.EventHandler(this.SelectColor_Load);
((System.ComponentModel.ISupportInitialize)(this.redUpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.greenUpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.blueUpDown)).EndInit();
diff --git a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.cs b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.cs
index 5e335b0..3da3b98 100644
--- a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.cs
+++ b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.cs
@@ -3,6 +3,7 @@ using System.Drawing;
using System.Globalization;
using System.Windows.Forms;
using ShiftOS.Engine.WindowManager;
+using ShiftOS.Engine.UI;
namespace ShiftOS.Main.ShiftOS.Apps.ShifterStuff
{
@@ -50,5 +51,13 @@ namespace ShiftOS.Main.ShiftOS.Apps.ShifterStuff
{
SetColor();
}
- }
+
+ private void SelectColor_Load(object sender, EventArgs e)
+ {
+ var s = new ShiftButton();
+ s.Location = new System.Drawing.Point(211, 48);
+ s.Text = "test";
+ Controls.Add(s);
+ }
+ }
} \ No newline at end of file
diff --git a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.Designer.cs b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.Designer.cs
index 8bbbac2..d94aebe 100644
--- a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.Designer.cs
+++ b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.Designer.cs
@@ -30,6 +30,8 @@
{
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
+ this.button6 = new System.Windows.Forms.Button();
+ this.btnLoad = new System.Windows.Forms.Button();
this.btnSave = new System.Windows.Forms.Button();
this.button5 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button();
@@ -38,7 +40,8 @@
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.button1 = new System.Windows.Forms.Button();
this.tabPage2 = new System.Windows.Forms.TabPage();
- this.btnLoad = new System.Windows.Forms.Button();
+ this.shiftButton1 = new Engine.UI.ShiftButton();
+ this.button7 = new System.Windows.Forms.Button();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.groupBox1.SuspendLayout();
@@ -59,6 +62,9 @@
//
// tabPage1
//
+ this.tabPage1.Controls.Add(this.button7);
+ this.tabPage1.Controls.Add(this.shiftButton1);
+ this.tabPage1.Controls.Add(this.button6);
this.tabPage1.Controls.Add(this.btnLoad);
this.tabPage1.Controls.Add(this.btnSave);
this.tabPage1.Controls.Add(this.button5);
@@ -74,6 +80,30 @@
this.tabPage1.Text = "Titlebar";
this.tabPage1.UseVisualStyleBackColor = true;
//
+ // button6
+ //
+ this.button6.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.button6.Font = new System.Drawing.Font("Lucida Console", 8.25F);
+ this.button6.Location = new System.Drawing.Point(6, 152);
+ this.button6.Name = "button6";
+ this.button6.Size = new System.Drawing.Size(314, 23);
+ this.button6.TabIndex = 8;
+ this.button6.Text = "Set Midnight Skin";
+ this.button6.UseVisualStyleBackColor = true;
+ this.button6.Click += new System.EventHandler(this.button6_Click);
+ //
+ // btnLoad
+ //
+ this.btnLoad.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnLoad.Font = new System.Drawing.Font("Lucida Console", 8.25F);
+ this.btnLoad.Location = new System.Drawing.Point(165, 267);
+ this.btnLoad.Name = "btnLoad";
+ this.btnLoad.Size = new System.Drawing.Size(155, 23);
+ this.btnLoad.TabIndex = 7;
+ this.btnLoad.Text = "Load Skin";
+ this.btnLoad.UseVisualStyleBackColor = true;
+ this.btnLoad.Click += new System.EventHandler(this.btnLoad_Click);
+ //
// btnSave
//
this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
@@ -96,7 +126,6 @@
this.button5.TabIndex = 5;
this.button5.Text = "Apply";
this.button5.UseVisualStyleBackColor = true;
- this.button5.Click += new System.EventHandler(this.button5_Click);
//
// button4
//
@@ -166,17 +195,33 @@
this.tabPage2.Text = "tabPage2";
this.tabPage2.UseVisualStyleBackColor = true;
//
- // btnLoad
+ // shiftButton1
//
- this.btnLoad.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btnLoad.Font = new System.Drawing.Font("Lucida Console", 8.25F);
- this.btnLoad.Location = new System.Drawing.Point(165, 267);
- this.btnLoad.Name = "btnLoad";
- this.btnLoad.Size = new System.Drawing.Size(155, 23);
- this.btnLoad.TabIndex = 7;
- this.btnLoad.Text = "Load Skin";
- this.btnLoad.UseVisualStyleBackColor = true;
- this.btnLoad.Click += new System.EventHandler(this.btnLoad_Click);
+ this.shiftButton1.BackColor = System.Drawing.Color.White;
+ this.shiftButton1.FlatAppearance.BorderColor = System.Drawing.Color.Gray;
+ this.shiftButton1.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+ this.shiftButton1.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.shiftButton1.ForeColor = System.Drawing.Color.Black;
+ this.shiftButton1.Location = new System.Drawing.Point(205, 25);
+ this.shiftButton1.Margin = new System.Windows.Forms.Padding(0);
+ this.shiftButton1.MinimumSize = new System.Drawing.Size(75, 23);
+ this.shiftButton1.Name = "shiftButton1";
+ this.shiftButton1.Padding = new System.Windows.Forms.Padding(3);
+ this.shiftButton1.Size = new System.Drawing.Size(100, 23);
+ this.shiftButton1.TabIndex = 9;
+ this.shiftButton1.Text = "ShiftButton";
+ this.shiftButton1.UseVisualStyleBackColor = false;
+ //
+ // button7
+ //
+ this.button7.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.button7.Font = new System.Drawing.Font("Lucida Console", 8.25F);
+ this.button7.Location = new System.Drawing.Point(205, 51);
+ this.button7.Name = "button7";
+ this.button7.Size = new System.Drawing.Size(100, 23);
+ this.button7.TabIndex = 10;
+ this.button7.Text = "NormalBtn";
+ this.button7.UseVisualStyleBackColor = true;
//
// Shifter
//
@@ -205,5 +250,8 @@
private System.Windows.Forms.Button button5;
private System.Windows.Forms.Button btnSave;
private System.Windows.Forms.Button btnLoad;
+ private System.Windows.Forms.Button button6;
+ private System.Windows.Forms.Button button7;
+ private Engine.UI.ShiftButton shiftButton1;
}
}
diff --git a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.cs b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.cs
index bf116e9..2c3cd8e 100644
--- a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.cs
+++ b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.cs
@@ -12,7 +12,6 @@ namespace ShiftOS.Main.ShiftOS.Apps.ShifterStuff
public partial class Shifter : UserControl
{
public int ColorType; //This is a check to see what option was chosen.
-
public Shifter()
{
InitializeComponent();
@@ -24,95 +23,106 @@ namespace ShiftOS.Main.ShiftOS.Apps.ShifterStuff
ShiftWM.Init(new SelectColor(), "Select a color", Resources.iconColourPicker_fw);
}
- void SetDefaultSkin(object sender, EventArgs e)
+ /// <summary>
+ /// Modifies the values in ShiftShiftSkinData.Colors.
+ /// </summary>
+ /// <param name="borderColor">The border color of the window.</param>
+ /// <param name="btnClose">The close button color of the window.</param>
+ /// <param name="btnCloseHover">The close button color of the window while hovering.</param>
+ /// <param name="btnMax">The maximize button color of the window.</param>
+ /// <param name="btnMaxHover">The maximize button color of the window while hovering.</param>
+ /// <param name="btnMin">The minimize button color of the window.</param>
+ /// <param name="btnMinHover">The minimize button color of the window while hovering.</param>
+ void ModifyData(Color borderColor, Color btnClose, Color btnCloseHover, Color btnMax, Color btnMaxHover, Color btnMin, Color btnMinHover)
+ {
+ SetBorderColor(borderColor);
+ ShiftSkinData.Colors.BtnCloseColor = btnClose;
+ ShiftSkinData.Colors.BtnCloseHoverColor = btnCloseHover;
+ ShiftSkinData.Colors.BtnMaxColor = btnMax;
+ ShiftSkinData.Colors.BtnMaxHoverColor = btnMaxHover;
+ ShiftSkinData.Colors.BtnMinColor = btnMin;
+ ShiftSkinData.Colors.BtnMinHoverColor = btnMinHover;
+ }
+
+ // SetBorderColor
+ public void SetBorderColor(Color borderColor)
+ {
+ ShiftSkinData.Colors.LeftTopCornerColor = borderColor;
+ ShiftSkinData.Colors.TitleBarColor = borderColor;
+ ShiftSkinData.Colors.RightTopCornerColor = borderColor;
+ ShiftSkinData.Colors.LeftSideColor = borderColor;
+ ShiftSkinData.Colors.RightSideColor = borderColor;
+ ShiftSkinData.Colors.LeftBottomCornerColor = borderColor;
+ ShiftSkinData.Colors.BottomSideColor = borderColor;
+ ShiftSkinData.Colors.RightBottomCornerColor = borderColor;
+ }
+
+ void SetDefaultSkin(object sender, EventArgs e)
{
- int offset = 30;
- SetBorderColor(Color.FromArgb(64, 64, 64));
- ShiftSkinData.BtnCloseColor = Color.Black;
- ShiftSkinData.BtnCloseHoverColor = Color.FromArgb(40, 40, 40);
- ShiftSkinData.BtnMaxColor = Color.Black;
- ShiftSkinData.BtnMaxHoverColor = Color.FromArgb(40, 40, 40);
- ShiftSkinData.BtnMinColor = Color.Black;
- ShiftSkinData.BtnMinHoverColor = Color.FromArgb(40, 40, 40);
- button5_Click(sender, e);
+ ModifyData(Color.FromArgb(64, 64, 64), Color.Black, Color.FromArgb(40, 40, 40), Color.Black, Color.FromArgb(40, 40, 40), Color.Black, Color.FromArgb(40, 40, 40));
+ ApplySkin();
}
void SetColorSkin(object sender, EventArgs e)
{
- SetBorderColor(Color.Blue);
- ShiftSkinData.BtnCloseColor = Color.Red;
- ShiftSkinData.BtnMaxColor = Color.Yellow;
- ShiftSkinData.BtnMinColor = Color.Green;
- ShiftSkinData.BtnCloseHoverColor = Color.FromArgb(255, 102, 102);
- ShiftSkinData.BtnMaxHoverColor = Color.FromArgb(255, 255, 153);
- ShiftSkinData.BtnMinColor = Color.FromArgb(102, 255, 102);
- button5_Click(sender, e);
+ ModifyData(Color.Blue, Color.Red, Color.FromArgb(255, 102, 102), Color.Yellow, Color.FromArgb(255, 255, 153), Color.Green, Color.FromArgb(102, 255, 102));
+ ApplySkin();
}
void SetRandomSkin(object sender, EventArgs e)
{
var rnd = new Random();
- SetBorderColor(Color.FromArgb(rnd.Next(255), rnd.Next(255), rnd.Next(255)));
- ShiftSkinData.BtnCloseColor = Color.FromArgb(rnd.Next(255), rnd.Next(255), rnd.Next(255));
- ShiftSkinData.BtnMaxColor = Color.FromArgb(rnd.Next(255), rnd.Next(255), rnd.Next(255));
- ShiftSkinData.BtnMinColor = Color.FromArgb(rnd.Next(255), rnd.Next(255), rnd.Next(255));
- ShiftSkinData.BtnCloseHoverColor = Color.FromArgb(rnd.Next(255), rnd.Next(255), rnd.Next(255));
- ShiftSkinData.BtnMaxHoverColor = Color.FromArgb(rnd.Next(255), rnd.Next(255), rnd.Next(255));
- ShiftSkinData.BtnMinHoverColor = Color.FromArgb(rnd.Next(255), rnd.Next(255), rnd.Next(255));
- button5_Click(sender, e);
+ ModifyData(
+ Color.FromArgb(rnd.Next(255), rnd.Next(255), rnd.Next(255)), // Border Color
+ Color.FromArgb(rnd.Next(255), rnd.Next(255), rnd.Next(255)), // Close Button Color
+ Color.FromArgb(rnd.Next(255), rnd.Next(255), rnd.Next(255)), // Close Hover Color
+ Color.FromArgb(rnd.Next(255), rnd.Next(255), rnd.Next(255)), // Maximize Button Color
+ Color.FromArgb(rnd.Next(255), rnd.Next(255), rnd.Next(255)), // Maximize Hover Color
+ Color.FromArgb(rnd.Next(255), rnd.Next(255), rnd.Next(255)), // Minimize Button Color
+ Color.FromArgb(rnd.Next(255), rnd.Next(255), rnd.Next(255))); // Minimize Hover Color
+ ApplySkin();
}
- // SetBorderColor
- public void SetBorderColor(Color borderColor)
- {
- ShiftSkinData.LeftTopCornerColor = borderColor;
- ShiftSkinData.TitleBarColor = borderColor;
- ShiftSkinData.RightTopCornerColor = borderColor;
- ShiftSkinData.LeftSideColor = borderColor;
- ShiftSkinData.RightSideColor = borderColor;
- ShiftSkinData.LeftBottomCornerColor = borderColor;
- ShiftSkinData.BottomSideColor = borderColor;
- ShiftSkinData.RightBottomCornerColor = borderColor;
- }
-
- void button5_Click(object sender, EventArgs e)
+ void ApplySkin()
{
foreach (var window in ShiftWM.Windows)
{
- window.Invoke(new Action(() => window.titleBar.BackColor = ShiftSkinData.TitleBarColor));
- window.Invoke(new Action(() => window.leftTopCorner.BackColor = ShiftSkinData.LeftTopCornerColor));
- window.Invoke(new Action(() => window.rightTopCorner.BackColor = ShiftSkinData.RightTopCornerColor));
- window.Invoke(new Action(() => window.leftSide.BackColor = ShiftSkinData.LeftSideColor));
- window.Invoke(new Action(() => window.rightSide.BackColor = ShiftSkinData.RightSideColor));
- window.Invoke(new Action(() => window.leftBottomCorner.BackColor = ShiftSkinData.LeftBottomCornerColor));
- window.Invoke(new Action(() => window.bottomSide.BackColor = ShiftSkinData.BottomSideColor));
- window.Invoke(new Action(() => window.rightBottomCorner.BackColor = ShiftSkinData.RightBottomCornerColor));
- window.Invoke(new Action(() => window.btnClose.BackColor = ShiftSkinData.BtnCloseColor));
- window.Invoke(new Action(() => window.btnMax.BackColor = ShiftSkinData.BtnMaxColor));
- window.Invoke(new Action(() => window.btnMin.BackColor = ShiftSkinData.BtnMinColor));
+ window.Invoke(new Action(() => window.titleBar.BackColor = ShiftSkinData.Colors.TitleBarColor));
+ window.Invoke(new Action(() => window.leftTopCorner.BackColor = ShiftSkinData.Colors.LeftTopCornerColor));
+ window.Invoke(new Action(() => window.rightTopCorner.BackColor = ShiftSkinData.Colors.RightTopCornerColor));
+ window.Invoke(new Action(() => window.leftSide.BackColor = ShiftSkinData.Colors.LeftSideColor));
+ window.Invoke(new Action(() => window.rightSide.BackColor = ShiftSkinData.Colors.RightSideColor));
+ window.Invoke(new Action(() => window.leftBottomCorner.BackColor = ShiftSkinData.Colors.LeftBottomCornerColor));
+ window.Invoke(new Action(() => window.bottomSide.BackColor = ShiftSkinData.Colors.BottomSideColor));
+ window.Invoke(new Action(() => window.rightBottomCorner.BackColor = ShiftSkinData.Colors.RightBottomCornerColor));
+ window.Invoke(new Action(() => window.btnClose.BackColor = ShiftSkinData.Colors.BtnCloseColor));
+ window.Invoke(new Action(() => window.btnMax.BackColor = ShiftSkinData.Colors.BtnMaxColor));
+ window.Invoke(new Action(() => window.btnMin.BackColor = ShiftSkinData.Colors.BtnMinColor));
}
}
void btnSave_Click(object sender, EventArgs e)
{
- var shiftColors = new Color[14];
- shiftColors[0] = ShiftSkinData.LeftTopCornerColor;
- shiftColors[1] = ShiftSkinData.TitleBarColor;
- shiftColors[2] = ShiftSkinData.RightTopCornerColor;
- shiftColors[3] = ShiftSkinData.LeftSideColor;
- shiftColors[4] = ShiftSkinData.RightSideColor;
- shiftColors[5] = ShiftSkinData.LeftBottomCornerColor;
- shiftColors[6] = ShiftSkinData.BottomSideColor;
- shiftColors[7] = ShiftSkinData.RightBottomCornerColor;
- shiftColors[8] = ShiftSkinData.BtnCloseColor;
- shiftColors[9] = ShiftSkinData.BtnMaxColor;
- shiftColors[10] = ShiftSkinData.BtnMinColor;
- shiftColors[11] = ShiftSkinData.BtnCloseHoverColor;
- shiftColors[12] = ShiftSkinData.BtnMaxHoverColor;
- shiftColors[13] = ShiftSkinData.BtnMinHoverColor;
+ Color[] shiftSkinColors = new Color[14];
+ int i = 0;
+
+ shiftSkinColors[0] = ShiftSkinData.Colors.LeftTopCornerColor;
+ shiftSkinColors[1] = ShiftSkinData.Colors.TitleBarColor;
+ shiftSkinColors[2] = ShiftSkinData.Colors.RightTopCornerColor;
+ shiftSkinColors[3] = ShiftSkinData.Colors.LeftSideColor;
+ shiftSkinColors[4] = ShiftSkinData.Colors.RightSideColor;
+ shiftSkinColors[5] = ShiftSkinData.Colors.LeftBottomCornerColor;
+ shiftSkinColors[6] = ShiftSkinData.Colors.BottomSideColor;
+ shiftSkinColors[7] = ShiftSkinData.Colors.RightBottomCornerColor;
+ shiftSkinColors[8] = ShiftSkinData.Colors.BtnCloseColor;
+ shiftSkinColors[9] = ShiftSkinData.Colors.BtnCloseHoverColor;
+ shiftSkinColors[10] = ShiftSkinData.Colors.BtnMaxColor;
+ shiftSkinColors[11] = ShiftSkinData.Colors.BtnMaxHoverColor;
+ shiftSkinColors[12] = ShiftSkinData.Colors.BtnMinColor;
+ shiftSkinColors[13] = ShiftSkinData.Colors.BtnMinHoverColor;
using (var fobj = File.OpenWrite(@"C:\Users\Public\Documents\Skin.whoa"))
- Whoa.Whoa.SerialiseObject(fobj, shiftColors);
+ Whoa.Whoa.SerialiseObject(fobj, shiftSkinColors);
ShiftWM.StartInfoboxSession(
"Saved Skin",
@@ -122,30 +132,43 @@ namespace ShiftOS.Main.ShiftOS.Apps.ShifterStuff
private void btnLoad_Click(object sender, EventArgs e)
{
- var shiftColors = new Color[14];
+ Color[] shiftSkinColors = new Color[14];
using (var fobj = File.OpenRead(@"C:\Users\Public\Documents\Skin.whoa"))
- shiftColors = Whoa.Whoa.DeserialiseObject<Color[]>(fobj);
+ shiftSkinColors = Whoa.Whoa.DeserialiseObject<Color[]>(fobj);
- ShiftSkinData.LeftTopCornerColor = shiftColors[0];
- ShiftSkinData.TitleBarColor = shiftColors[1];
- ShiftSkinData.RightTopCornerColor = shiftColors[2];
- ShiftSkinData.LeftSideColor = shiftColors[3];
- ShiftSkinData.RightSideColor = shiftColors[4];
- ShiftSkinData.LeftBottomCornerColor = shiftColors[5];
- ShiftSkinData.BottomSideColor = shiftColors[6];
- ShiftSkinData.RightBottomCornerColor = shiftColors[7];
- ShiftSkinData.BtnCloseColor = shiftColors[8];
- ShiftSkinData.BtnMaxColor = shiftColors[9];
- ShiftSkinData.BtnMinColor = shiftColors[10];
- ShiftSkinData.BtnCloseHoverColor = shiftColors[11];
- ShiftSkinData.BtnMaxHoverColor = shiftColors[12];
- ShiftSkinData.BtnMinHoverColor = shiftColors[13];
+ ShiftSkinData.Colors.LeftTopCornerColor = shiftSkinColors[0];
+ ShiftSkinData.Colors.TitleBarColor = shiftSkinColors[1];
+ ShiftSkinData.Colors.RightTopCornerColor = shiftSkinColors[2];
+ ShiftSkinData.Colors.LeftSideColor = shiftSkinColors[3];
+ ShiftSkinData.Colors.RightSideColor = shiftSkinColors[4];
+ ShiftSkinData.Colors.LeftBottomCornerColor = shiftSkinColors[5];
+ ShiftSkinData.Colors.BottomSideColor = shiftSkinColors[6];
+ ShiftSkinData.Colors.RightBottomCornerColor = shiftSkinColors[7];
+ ShiftSkinData.Colors.BtnCloseColor = shiftSkinColors[8];
+ ShiftSkinData.Colors.BtnCloseHoverColor = shiftSkinColors[9];
+ ShiftSkinData.Colors.BtnMaxColor = shiftSkinColors[10];
+ ShiftSkinData.Colors.BtnMaxHoverColor = shiftSkinColors[11];
+ ShiftSkinData.Colors.BtnMinColor = shiftSkinColors[12];
+ ShiftSkinData.Colors.BtnMinHoverColor = shiftSkinColors[13];
- button5_Click(sender, e);
+ ApplySkin();
ShiftWM.StartInfoboxSession(
"Loaded Skin",
"Loaded Skin from C:\\Users\\Public\\Documents\\Skin.whoa",
InfoboxTemplate.ButtonType.Ok);
}
+
+ private void button6_Click(object sender, EventArgs e)
+ {
+ ModifyData(
+ Color.FromArgb(15, 29, 45),
+ Color.FromArgb(15, 29, 78),
+ Color.FromArgb(15, 29, 100),
+ Color.FromArgb(15, 29, 130),
+ Color.FromArgb(15, 29, 108),
+ Color.FromArgb(15, 29, 130),
+ Color.FromArgb(15, 29, 160));
+ ApplySkin();
+ }
}
} \ No newline at end of file
diff --git a/ShiftOS.Main/ShiftOS/Desktop.Designer.cs b/ShiftOS.Main/ShiftOS/Desktop.Designer.cs
index 9b7bbe3..ca9afb2 100644
--- a/ShiftOS.Main/ShiftOS/Desktop.Designer.cs
+++ b/ShiftOS.Main/ShiftOS/Desktop.Designer.cs
@@ -95,7 +95,8 @@
this.applicationsToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
- this.menuStrip1.Size = new System.Drawing.Size(93, 24);
+ this.menuStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional;
+ this.menuStrip1.Size = new System.Drawing.Size(185, 24);
this.menuStrip1.TabIndex = 2;
this.menuStrip1.Text = "Applications";
//
@@ -113,28 +114,28 @@
// shifterToolStripMenuItem
//
this.shifterToolStripMenuItem.Name = "shifterToolStripMenuItem";
- this.shifterToolStripMenuItem.Size = new System.Drawing.Size(142, 22);
+ this.shifterToolStripMenuItem.Size = new System.Drawing.Size(152, 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(142, 22);
+ this.terminalToolStripMenuItem.Size = new System.Drawing.Size(152, 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(142, 22);
+ this.textPadToolStripMenuItem.Size = new System.Drawing.Size(152, 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(142, 22);
+ this.fileSkimmerToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.fileSkimmerToolStripMenuItem.Text = "File Skimmer";
this.fileSkimmerToolStripMenuItem.Click += new System.EventHandler(this.fileSkimmerToolStripMenuItem_Click);
//
diff --git a/ShiftOS.Main/ShiftOS/Desktop.cs b/ShiftOS.Main/ShiftOS/Desktop.cs
index 7d1a052..64dafdc 100644
--- a/ShiftOS.Main/ShiftOS/Desktop.cs
+++ b/ShiftOS.Main/ShiftOS/Desktop.cs
@@ -5,24 +5,28 @@ 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()
+ Graphics g;
+ public Desktop()
{
InitializeComponent();
timer1.Start();
- Setup();
Closed += (sender, args) => { Application.Exit(); };
- }
+ var s = new ShiftStripRenderer();
+
+ }
private void shifterToolStripMenuItem_Click(object sender, EventArgs e)
{
Apps.ShifterStuff.Shifter app = new Apps.ShifterStuff.Shifter();
- ShiftWM.Init(app, "Shifter", null);
+ ShiftWM.Init(app, "Shifter", Resources.iconShifter);
}
private void Desktop_Load(object sender, EventArgs e)
@@ -53,11 +57,11 @@ namespace ShiftOS.Main.ShiftOS
{
lblClock.Text = DateTime.Now.ToString("hh:mm:ss");
}
- public void Setup()
+
+ private void SetupToolStrip(ToolStripRenderEventArgs e, Graphics g)
{
- if (!Directory.Exists(SaveSystem.gameDir)) Directory.CreateDirectory(SaveSystem.gameDir);
- if (!Directory.Exists(SaveSystem.fontDir)) Directory.CreateDirectory(SaveSystem.fontDir);
- if (!File.Exists(SaveSystem.fontDir + "\\termFont.ttf")) File.WriteAllBytes(SaveSystem.fontDir + "\\termFont.ttf", Resources.UbuntuMono_R);
+ var s = new ShiftStripRenderer();
+ s.DrawToolStripBackground(e);
}
}
}
diff --git a/ShiftOS.Main/ShiftOS/Desktop.resx b/ShiftOS.Main/ShiftOS/Desktop.resx
index ce4e653..f706e8f 100644
--- a/ShiftOS.Main/ShiftOS/Desktop.resx
+++ b/ShiftOS.Main/ShiftOS/Desktop.resx
@@ -120,9 +120,6 @@
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>219, 17</value>
</metadata>
- <metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>219, 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>
diff --git a/ShiftOS.Main/Terminal/Commands/Echo.cs b/ShiftOS.Main/Terminal/Commands/Echo.cs
new file mode 100644
index 0000000..37988b7
--- /dev/null
+++ b/ShiftOS.Main/Terminal/Commands/Echo.cs
@@ -0,0 +1,37 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace ShiftOS.Main.Terminal.Commands
+{
+ public class Echo : TerminalCommand
+ {
+ public override string Name { get; } = "echo";
+ public override string Summary { get; } = "Return a string.";
+ public override string Usage { get; } = "echo <PHRASE>";
+ public override bool Unlocked { get; set; } = true;
+
+ public override void Run(params string[] args)
+ {
+ if (args.Length == 0)
+ {
+ WriteLine("echo: syntax error");
+ return;
+ }
+ switch (args[0])
+ {
+ default:
+ WriteLine(string.Join(" ", args));
+ break;
+ case "off":
+ Array.Find(TerminalBackend.trm.ToArray(), w => w.TerminalID == TermID).defaulttextResult = "";
+ break;
+ case "on":
+ Array.Find(TerminalBackend.trm.ToArray(), w => w.TerminalID == TermID).defaulttextResult = "[user@shiftos ~]$ ";
+ break;
+ }
+ }
+ }
+}
diff --git a/ShiftOS.Main/Terminal/Commands/Hello.cs b/ShiftOS.Main/Terminal/Commands/Hello.cs
index a826532..f4940b5 100644
--- a/ShiftOS.Main/Terminal/Commands/Hello.cs
+++ b/ShiftOS.Main/Terminal/Commands/Hello.cs
@@ -12,7 +12,7 @@ namespace ShiftOS.Main.Terminal.Commands
public override string Name { get; } = "Hello";
public override string Summary { get; } = "Just an example command.";
public override string Usage { get; } = "Hello <NAME>.";
- public override bool Unlocked { get; set; } = false;
+ public override bool Unlocked { get; set; } = true;
public override void Run(params string[] parameters)
{
diff --git a/ShiftOS.Main/Terminal/Commands/Help.cs b/ShiftOS.Main/Terminal/Commands/Help.cs
index 9067551..b252318 100644
--- a/ShiftOS.Main/Terminal/Commands/Help.cs
+++ b/ShiftOS.Main/Terminal/Commands/Help.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -11,7 +12,7 @@ namespace ShiftOS.Main.Terminal.Commands
public override string Name { get; } = "help";
public override string Summary { get; } = "Shows the list of valid commands.";
public override string Usage { get; } = "help <command>";
- public override bool Unlocked { get; set; } = false;
+ public override bool Unlocked { get; set; } = true;
public override void Run(params string[] args)
{
@@ -22,16 +23,17 @@ namespace ShiftOS.Main.Terminal.Commands
bool solved = false;
foreach (var t in TerminalBackend.instances)
{
- if (t.Name == args[0])
+ if (t.Name.ToLower() == args[0].ToLower())
{
solved = true;
WriteLine($"{t.Name}: {t.Summary} \n usage: {t.Usage}");
break;
}
+ if (t.Name.ToLower() == args[0].ToLower() && t.Unlocked == false) return;
}
if (!solved)
{
- WriteLine($"sbash: invalid token: {args[0]}");
+ Write($"sbash: unexpected token: {args[0]}", Color.White);
}
}
}
diff --git a/ShiftOS.Main/Terminal/Commands/TestStory.cs b/ShiftOS.Main/Terminal/Commands/TestStory.cs
index b6f7f9e..b3c0989 100644
--- a/ShiftOS.Main/Terminal/Commands/TestStory.cs
+++ b/ShiftOS.Main/Terminal/Commands/TestStory.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
@@ -18,10 +19,19 @@ namespace ShiftOS.Main.Terminal.Commands
{
var r = new Random();
WriteLine($"Incoming connection from {r.Next(0, 256)}.{r.Next(0, 256)}.{r.Next(0, 256)}.{r.Next(0, 256)}...");
- Task.Delay(2000);
+ WriteLine(); //The various Task.Delay functions are to make the Thread.Sleep function work.
+ Thread.Sleep(r.Next(2000, 4500));
WriteLine("User set alias as \"DevX\".");
- Thread.Sleep(2000);
+ Task.Delay(1);
+ Thread.Sleep(4000);
WriteLine("User <DevX> has connected successfully!");
+ Task.Delay(1);
+ Thread.Sleep(3400);
+ StoryWriteLine("Well, it seems ShiftOS has installed. Congrats.... err... whatever your name is.");
+ }
+ private void StoryWriteLine(string value)
+ {
+ WriteLine($"[devx@master ~]$ {value}");
}
}
}
diff --git a/ShiftOS.Main/Terminal/Commands/codepoints.cs b/ShiftOS.Main/Terminal/Commands/codepoints.cs
new file mode 100644
index 0000000..73dd6c9
--- /dev/null
+++ b/ShiftOS.Main/Terminal/Commands/codepoints.cs
@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using static ShiftOS.Engine.SaveSystem;
+using System.IO;
+
+namespace ShiftOS.Main.Terminal.Commands
+{
+ public class codepoints : TerminalCommand
+ {
+ public override string Name { get; } = "codepoints";
+ public override string Summary { get; } = "Shows your current amount of codepoints.";
+ public override string Usage { get; } = "codepoints";
+ public override bool Unlocked { get; set; } = true;
+
+ public override void Run(params string[] parameters)
+ {
+ if (parameters.Length > 0)
+ {
+ WriteLine($"sbash: unexpected token: {parameters.First()}");
+ }
+
+ using (var fs = File.OpenRead(dataDir + "\\userCodePoints.whoa"))
+ {
+ int codepoints = Whoa.Whoa.DeserialiseObject<int>(fs, Whoa.SerialisationOptions.None);
+ WriteLine($"You currently have {codepoints} codepoints.");
+ }
+ }
+ }
+}
+
diff --git a/ShiftOS.Main/Terminal/Commands/shutdown.cs b/ShiftOS.Main/Terminal/Commands/shutdown.cs
new file mode 100644
index 0000000..880af1e
--- /dev/null
+++ b/ShiftOS.Main/Terminal/Commands/shutdown.cs
@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace ShiftOS.Main.Terminal.Commands
+{
+ class shutdown:TerminalCommand
+ {
+ public override string Name { get; } = "shutdown";
+ public override string Summary { get; } = "Shuts down and saves ShiftOS.";
+ public override string Usage { get; } = "shutdown";
+ public override bool Unlocked { get; set; } = true;
+
+ public override void Run(params string[] parameters)
+ {
+ Application.Exit();
+ }
+ }
+}
diff --git a/ShiftOS.Main/Terminal/Commands/startx.cs b/ShiftOS.Main/Terminal/Commands/startx.cs
new file mode 100644
index 0000000..38a8fdf
--- /dev/null
+++ b/ShiftOS.Main/Terminal/Commands/startx.cs
@@ -0,0 +1,57 @@
+using ShiftOS.Main.ShiftOS;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using ShiftOS.Engine;
+using static ShiftOS.Engine.CodepointUpgrade;
+using static ShiftOS.Engine.SaveSystem;
+
+
+namespace ShiftOS.Main.Terminal.Commands
+{
+ public class startx : TerminalCommand, ICodepointUpgrade
+ {
+ private bool hasGUI = false;
+ private bool autostart = false;
+ 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)
+ {
+ if (args[0] == "autostart")
+ {
+ if (!autostart)
+ {
+ WriteLine("startx: Toggled autostart ON.");
+ return;
+ }
+ else
+ {
+ WriteLine("startx: Toggled autostart OFF.");
+ return;
+ }
+ }
+ WriteLine($"sbash: unexpected token: {args[0]}");
+ return;
+ }
+ if (!hasGUI)
+ {
+ var d = new Desktop();
+ d.Show();
+ hasGUI = true;
+ }
+ if (hasGUI == true)
+ {
+ WriteLine("The ShiftX driver has already been intialized.");
+ return;
+ }
+ }
+ }
+}
diff --git a/ShiftOS.Main/Terminal/TerminalBackend.cs b/ShiftOS.Main/Terminal/TerminalBackend.cs
index c264714..36d4036 100644
--- a/ShiftOS.Main/Terminal/TerminalBackend.cs
+++ b/ShiftOS.Main/Terminal/TerminalBackend.cs
@@ -44,14 +44,18 @@ namespace ShiftOS.Main.Terminal
commandBuffer.Push(command);
return;
}
+ if (instance.Name.ToLower() == name.ToLower() && instance.Unlocked == false)
+ {
+ Array.Find(trm.ToArray(), w => w.TerminalID == TermID).termmain.AppendText($"\n sbash: invalid command: {command.Split(' ').First()}");
+ return;
+ }
}
if (command.Length == 0) return;
if (!complete)
- {
+ {
Array.Find(trm.ToArray(), w => w.TerminalID == TermID).termmain.AppendText($"\n sbash: invalid command: {command.Split(' ').First()}");
return;
- }
- Array.Find(trm.ToArray(), w => w.TerminalID == TermID).termmain.Text += " \n The command cannot be found. \n";
+ }
}
}
}
diff --git a/shiftos.main/shiftos/apps/terminal.cs b/shiftos.main/shiftos/apps/terminal.cs
index f7307cb..04bd6d2 100644
--- a/shiftos.main/shiftos/apps/terminal.cs
+++ b/shiftos.main/shiftos/apps/terminal.cs
@@ -5,6 +5,8 @@ using ShiftOS.Main.Terminal;
using System.Linq;
using System.Collections.Generic;
using System.Drawing.Text;
+using System.IO;
+using ShiftOS.Main.Properties;
namespace ShiftOS.Main.ShiftOS.Apps
{
@@ -19,7 +21,7 @@ namespace ShiftOS.Main.ShiftOS.Apps
public string InputReturnText = "";
public Stack<string> c = TerminalBackend.commandBuffer;
private PrivateFontCollection fontCollection = new PrivateFontCollection();
-
+
// The below variables makes the terminal... a terminal!
string OldText = "";
@@ -33,10 +35,8 @@ namespace ShiftOS.Main.ShiftOS.Apps
TerminalBackend.trm.Add(this);
- fontCollection.AddFontFile(SaveSystem.fontDir + "\\termFont.ttf");
-
- termmain.Font = new System.Drawing.Font(fontCollection.Families[0], 12F, System.Drawing.FontStyle.Regular);
+ Setup();
}
void Print()
@@ -144,5 +144,27 @@ namespace ShiftOS.Main.ShiftOS.Apps
termmain.AppendText(c.Pop());
}
}
- }
+ public void Setup()
+ {
+ if (!Directory.Exists(SaveSystem.gameDir)) Directory.CreateDirectory(SaveSystem.gameDir);
+ if (!Directory.Exists(SaveSystem.fontDir)) Directory.CreateDirectory(SaveSystem.fontDir);
+ if (!Directory.Exists(SaveSystem.dataDir)) Directory.CreateDirectory(SaveSystem.dataDir);
+ if (!File.Exists(SaveSystem.fontDir + "\\termFont.ttf")) File.WriteAllBytes(SaveSystem.fontDir + "\\termFont.ttf", Resources.UbuntuMono_R);
+ if (!File.Exists(SaveSystem.dataDir + "\\userCodePoints.whoa"))
+ {
+ using (var fobj = File.OpenWrite(SaveSystem.dataDir + "\\userCodePoints.whoa"))
+ {
+ Whoa.Whoa.SerialiseObject(fobj, SaveSystem.User.codePoints);
+ }
+ }
+ if (!Directory.Exists(SaveSystem.baseGameDir)) Directory.CreateDirectory(SaveSystem.baseGameDir);
+ if (!Directory.Exists(SaveSystem.desktopDir)) Directory.CreateDirectory(SaveSystem.desktopDir);
+ if (!Directory.Exists(SaveSystem.docDir)) Directory.CreateDirectory(SaveSystem.docDir);
+ if (!Directory.Exists(SaveSystem.downloadsDir)) Directory.CreateDirectory(SaveSystem.downloadsDir);
+ if (!Directory.Exists(SaveSystem.musicDir)) Directory.CreateDirectory(SaveSystem.musicDir);
+ if (!Directory.Exists(SaveSystem.picDir)) Directory.CreateDirectory(SaveSystem.picDir);
+ fontCollection.AddFontFile(SaveSystem.fontDir + "\\termFont.ttf");
+ termmain.Font = new System.Drawing.Font(fontCollection.Families[0], 12F, System.Drawing.FontStyle.Regular);
+ }
+ }
}