mirror of
https://github.com/ShiftOS-Rewind/ShiftOS.git
synced 2025-01-22 11:21:45 -05:00
Add SaveSystem, FullScreen Terminal and stuff
Git had a horrible seizure and removed our repo but Alex-TIMEHACK helped us get it back.
This commit is contained in:
parent
90b1bdca5f
commit
c81573594f
34 changed files with 1054 additions and 458 deletions
|
@ -1,5 +1,2 @@
|
||||||
# ShiftOS
|
# ShiftOS
|
||||||
|
My continuation of the ShiftOS: Rewind Project using WinForms.
|
||||||
The all-new, rewritten ShiftOS repository modeled after 0.0.9!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
17
ShiftOS.Engine/CodepointUpgrade.cs
Normal file
17
ShiftOS.Engine/CodepointUpgrade.cs
Normal file
|
@ -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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -16,6 +16,13 @@ namespace ShiftOS.Engine
|
||||||
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "ShiftOS-Rewind");
|
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "ShiftOS-Rewind");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public static string dataDir
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return gameDir + "\\Data";
|
||||||
|
}
|
||||||
|
}
|
||||||
public static string fontDir
|
public static string fontDir
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -23,5 +30,73 @@ namespace ShiftOS.Engine
|
||||||
return gameDir + "\\Fonts";
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,6 +55,7 @@
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Compile Include="CodepointUpgrade.cs" />
|
||||||
<Compile Include="Misc\EventList.cs" />
|
<Compile Include="Misc\EventList.cs" />
|
||||||
<Compile Include="Misc\IniFile.cs" />
|
<Compile Include="Misc\IniFile.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
@ -78,11 +79,12 @@
|
||||||
<Compile Include="ShiftFS\IShiftNode.cs" />
|
<Compile Include="ShiftFS\IShiftNode.cs" />
|
||||||
<Compile Include="Misc\Tools.cs" />
|
<Compile Include="Misc\Tools.cs" />
|
||||||
<Compile Include="UI\ShiftButton.cs">
|
<Compile Include="UI\ShiftButton.cs">
|
||||||
<SubType>UserControl</SubType>
|
<SubType>Component</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="UI\ShiftButton.Designer.cs">
|
<Compile Include="UI\ShiftButton.Designer.cs">
|
||||||
<DependentUpon>ShiftButton.cs</DependentUpon>
|
<DependentUpon>ShiftButton.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="UI\ShiftStripRenderer.cs" />
|
||||||
<Compile Include="WindowManager\InfoboxTemplate.cs">
|
<Compile Include="WindowManager\InfoboxTemplate.cs">
|
||||||
<SubType>UserControl</SubType>
|
<SubType>UserControl</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
@ -107,6 +109,9 @@
|
||||||
<EmbeddedResource Include="ShiftFS\FileGUI\FileOpener.resx">
|
<EmbeddedResource Include="ShiftFS\FileGUI\FileOpener.resx">
|
||||||
<DependentUpon>FileOpener.cs</DependentUpon>
|
<DependentUpon>FileOpener.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="UI\ShiftButton.resx">
|
||||||
|
<DependentUpon>ShiftButton.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="WindowManager\InfoboxTemplate.resx">
|
<EmbeddedResource Include="WindowManager\InfoboxTemplate.resx">
|
||||||
<DependentUpon>InfoboxTemplate.cs</DependentUpon>
|
<DependentUpon>InfoboxTemplate.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
|
5
ShiftOS.Engine/UI/ShiftButton.Designer.cs
generated
5
ShiftOS.Engine/UI/ShiftButton.Designer.cs
generated
|
@ -28,8 +28,9 @@
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
components = new System.ComponentModel.Container();
|
this.SuspendLayout();
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Data;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
@ -10,11 +8,63 @@ using System.Windows.Forms;
|
||||||
|
|
||||||
namespace ShiftOS.Engine.UI
|
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()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
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()
|
||||||
|
{
|
||||||
|
_active = false;
|
||||||
|
base.FlatAppearance.BorderColor = _border;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
123
ShiftOS.Engine/UI/ShiftButton.resx
Normal file
123
ShiftOS.Engine/UI/ShiftButton.resx
Normal file
|
@ -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>
|
21
ShiftOS.Engine/UI/ShiftStripRenderer.cs
Normal file
21
ShiftOS.Engine/UI/ShiftStripRenderer.cs
Normal file
|
@ -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));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -29,42 +29,14 @@
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.components = new System.ComponentModel.Container();
|
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.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||||
this.changeSize = new System.Windows.Forms.Timer(this.components);
|
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();
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||||
this.SuspendLayout();
|
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
|
// pictureBox1
|
||||||
//
|
//
|
||||||
this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||||
|
@ -83,22 +55,57 @@
|
||||||
//
|
//
|
||||||
// label1
|
// label1
|
||||||
//
|
//
|
||||||
this.label1.AutoSize = true;
|
this.label1.BackColor = System.Drawing.Color.White;
|
||||||
this.label1.Font = new System.Drawing.Font("Lucida Console", 9.25F);
|
this.label1.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||||
this.label1.Location = new System.Drawing.Point(107, 48);
|
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.Name = "label1";
|
||||||
this.label1.Size = new System.Drawing.Size(55, 13);
|
this.label1.Size = new System.Drawing.Size(256, 125);
|
||||||
this.label1.TabIndex = 3;
|
this.label1.TabIndex = 6;
|
||||||
this.label1.Text = "label1";
|
//
|
||||||
|
// 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
|
// InfoboxTemplate
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.Controls.Add(this.label1);
|
this.Controls.Add(this.label1);
|
||||||
this.Controls.Add(this.pictureBox1);
|
|
||||||
this.Controls.Add(this.btnOpt2);
|
this.Controls.Add(this.btnOpt2);
|
||||||
this.Controls.Add(this.btnOpt1);
|
this.Controls.Add(this.btnOpt1);
|
||||||
|
this.Controls.Add(this.pictureBox1);
|
||||||
this.Name = "InfoboxTemplate";
|
this.Name = "InfoboxTemplate";
|
||||||
this.Size = new System.Drawing.Size(438, 210);
|
this.Size = new System.Drawing.Size(438, 210);
|
||||||
this.Load += new System.EventHandler(this.InfoboxTemplate_Load);
|
this.Load += new System.EventHandler(this.InfoboxTemplate_Load);
|
||||||
|
@ -109,11 +116,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public System.Windows.Forms.Button btnOpt1;
|
|
||||||
public System.Windows.Forms.Button btnOpt2;
|
|
||||||
public System.Windows.Forms.PictureBox pictureBox1;
|
public System.Windows.Forms.PictureBox pictureBox1;
|
||||||
private System.Windows.Forms.Timer changeSize;
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,32 +23,25 @@ namespace ShiftOS.Engine.WindowManager
|
||||||
Cancel,
|
Cancel,
|
||||||
Ok
|
Ok
|
||||||
}
|
}
|
||||||
|
|
||||||
int _buttonChoice;
|
|
||||||
int _buttonSelected;
|
|
||||||
Stream _str;
|
Stream _str;
|
||||||
|
|
||||||
public InfoboxTemplate(ButtonType type)
|
public InfoboxTemplate(ButtonType type)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case ButtonType.Ok:
|
case ButtonType.Ok:
|
||||||
btnOpt1.Text = "OK";
|
btnOpt1.Text = "OK";
|
||||||
btnOpt2.Hide();
|
btnOpt2.Hide();
|
||||||
btnOpt1.Location = new Point(109, 134);
|
btnOpt1.Location = new Point(156, 163);
|
||||||
_buttonChoice = 1;
|
|
||||||
break;
|
break;
|
||||||
case ButtonType.OkCancel:
|
case ButtonType.OkCancel:
|
||||||
btnOpt1.Text = "OK";
|
btnOpt1.Text = "OK";
|
||||||
btnOpt2.Text = "Cancel";
|
btnOpt2.Text = "Cancel";
|
||||||
_buttonChoice = 2;
|
|
||||||
break;
|
break;
|
||||||
case ButtonType.YesNo:
|
case ButtonType.YesNo:
|
||||||
btnOpt1.Text = "Yes";
|
btnOpt1.Text = "Yes";
|
||||||
btnOpt2.Text = "No";
|
btnOpt2.Text = "No";
|
||||||
_buttonChoice = 3;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -58,10 +51,11 @@ namespace ShiftOS.Engine.WindowManager
|
||||||
switch (btnOpt1.Text)
|
switch (btnOpt1.Text)
|
||||||
{
|
{
|
||||||
case "OK":
|
case "OK":
|
||||||
|
btnOpt1.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||||
ParentForm?.Close();
|
ParentForm?.Close();
|
||||||
break;
|
break;
|
||||||
case "Yes":
|
case "Yes":
|
||||||
_buttonSelected = 2;
|
btnOpt1.DialogResult = System.Windows.Forms.DialogResult.Yes;
|
||||||
ParentForm?.Close();
|
ParentForm?.Close();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -72,10 +66,11 @@ namespace ShiftOS.Engine.WindowManager
|
||||||
switch (btnOpt2.Text)
|
switch (btnOpt2.Text)
|
||||||
{
|
{
|
||||||
case "No":
|
case "No":
|
||||||
_buttonSelected = 3;
|
btnOpt2.DialogResult = System.Windows.Forms.DialogResult.No;
|
||||||
|
ParentForm?.Close();
|
||||||
break;
|
break;
|
||||||
case "Cancel":
|
case "Cancel":
|
||||||
_buttonSelected = 4;
|
btnOpt2.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -89,6 +84,16 @@ namespace ShiftOS.Engine.WindowManager
|
||||||
}
|
}
|
||||||
|
|
||||||
void InfoboxTemplate_Load(object sender, EventArgs e)
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -5,19 +5,36 @@ namespace ShiftOS.Engine.WindowManager
|
||||||
public abstract class ShiftSkinData
|
public abstract class ShiftSkinData
|
||||||
{
|
{
|
||||||
// ColorData
|
// ColorData
|
||||||
public static Color LeftTopCornerColor = Color.Empty;
|
public static skinColors Colors = new skinColors();
|
||||||
public static Color TitleBarColor = Color.Empty;
|
public static skinTextures Images = new skinTextures();
|
||||||
public static Color RightTopCornerColor = Color.Empty;
|
}
|
||||||
public static Color BtnCloseColor = Color.Empty;
|
|
||||||
public static Color BtnMaxColor = Color.Empty;
|
public class skinTextures
|
||||||
public static Color BtnMinColor = Color.Empty;
|
{
|
||||||
public static Color BtnCloseHoverColor = Color.Empty;
|
public skinTextures()
|
||||||
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;
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -43,36 +43,36 @@ namespace ShiftOS.Engine.WindowManager
|
||||||
app.Width = content.Width + app.leftSide.Width + app.rightSide.Width;
|
app.Width = content.Width + app.leftSide.Width + app.rightSide.Width;
|
||||||
app.Height = content.Height + app.bottomSide.Height + app.titleBar.Height;
|
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);
|
Color borderColor = Color.FromArgb(64, 64, 64);
|
||||||
ShiftSkinData.BtnCloseColor = Color.Black;
|
ShiftSkinData.Colors.BtnCloseColor = Color.Black;
|
||||||
ShiftSkinData.BtnCloseHoverColor = Color.FromArgb(40, 40, 40);
|
ShiftSkinData.Colors.BtnCloseHoverColor = Color.FromArgb(40, 40, 40);
|
||||||
ShiftSkinData.BtnMaxColor = Color.Black;
|
ShiftSkinData.Colors.BtnMaxColor = Color.Black;
|
||||||
ShiftSkinData.BtnMaxHoverColor = Color.FromArgb(40, 40, 40);
|
ShiftSkinData.Colors.BtnMaxHoverColor = Color.FromArgb(40, 40, 40);
|
||||||
ShiftSkinData.BtnMinColor = Color.Black;
|
ShiftSkinData.Colors.BtnMinColor = Color.Black;
|
||||||
ShiftSkinData.BtnMinHoverColor = Color.FromArgb(40, 40, 40);
|
ShiftSkinData.Colors.BtnMinHoverColor = Color.FromArgb(40, 40, 40);
|
||||||
ShiftSkinData.LeftTopCornerColor = borderColor;
|
ShiftSkinData.Colors.LeftTopCornerColor = borderColor;
|
||||||
ShiftSkinData.TitleBarColor = borderColor;
|
ShiftSkinData.Colors.TitleBarColor = borderColor;
|
||||||
ShiftSkinData.RightTopCornerColor = borderColor;
|
ShiftSkinData.Colors.RightTopCornerColor = borderColor;
|
||||||
ShiftSkinData.LeftSideColor = borderColor;
|
ShiftSkinData.Colors.LeftSideColor = borderColor;
|
||||||
ShiftSkinData.RightSideColor = borderColor;
|
ShiftSkinData.Colors.RightSideColor = borderColor;
|
||||||
ShiftSkinData.LeftBottomCornerColor = borderColor;
|
ShiftSkinData.Colors.LeftBottomCornerColor = borderColor;
|
||||||
ShiftSkinData.BottomSideColor = borderColor;
|
ShiftSkinData.Colors.BottomSideColor = borderColor;
|
||||||
ShiftSkinData.RightBottomCornerColor = borderColor;
|
ShiftSkinData.Colors.RightBottomCornerColor = borderColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
app.btnClose.BackColor = ShiftSkinData.BtnCloseColor;
|
app.btnClose.BackColor = ShiftSkinData.Colors.BtnCloseColor;
|
||||||
app.btnMax.BackColor = ShiftSkinData.BtnMaxColor;
|
app.btnMax.BackColor = ShiftSkinData.Colors.BtnMaxColor;
|
||||||
app.btnMin.BackColor = ShiftSkinData.BtnMinColor;
|
app.btnMin.BackColor = ShiftSkinData.Colors.BtnMinColor;
|
||||||
app.leftTopCorner.BackColor = ShiftSkinData.LeftTopCornerColor;
|
app.leftTopCorner.BackColor = ShiftSkinData.Colors.LeftTopCornerColor;
|
||||||
app.titleBar.BackColor = ShiftSkinData.TitleBarColor;
|
app.titleBar.BackColor = ShiftSkinData.Colors.TitleBarColor;
|
||||||
app.rightTopCorner.BackColor = ShiftSkinData.RightTopCornerColor;
|
app.rightTopCorner.BackColor = ShiftSkinData.Colors.RightTopCornerColor;
|
||||||
app.leftSide.BackColor = ShiftSkinData.LeftSideColor;
|
app.leftSide.BackColor = ShiftSkinData.Colors.LeftSideColor;
|
||||||
app.rightSide.BackColor = ShiftSkinData.RightSideColor;
|
app.rightSide.BackColor = ShiftSkinData.Colors.RightSideColor;
|
||||||
app.leftBottomCorner.BackColor = ShiftSkinData.LeftBottomCornerColor;
|
app.leftBottomCorner.BackColor = ShiftSkinData.Colors.LeftBottomCornerColor;
|
||||||
app.bottomSide.BackColor = ShiftSkinData.BottomSideColor;
|
app.bottomSide.BackColor = ShiftSkinData.Colors.BottomSideColor;
|
||||||
app.rightBottomCorner.BackColor = ShiftSkinData.RightBottomCornerColor;
|
app.rightBottomCorner.BackColor = ShiftSkinData.Colors.RightBottomCornerColor;
|
||||||
|
|
||||||
|
|
||||||
// Icon Setup
|
// Icon Setup
|
||||||
|
|
|
@ -52,23 +52,23 @@ namespace ShiftOS.Engine.WindowManager
|
||||||
=> Close();
|
=> Close();
|
||||||
|
|
||||||
void closebutton_MouseEnter(object sender, EventArgs e)
|
void closebutton_MouseEnter(object sender, EventArgs e)
|
||||||
=> btnClose.BackColor = ShiftSkinData.BtnCloseHoverColor;
|
=> btnClose.BackColor = ShiftSkinData.Colors.BtnCloseHoverColor;
|
||||||
|
|
||||||
void closebutton_MouseLeave(object sender, EventArgs e)
|
void closebutton_MouseLeave(object sender, EventArgs e)
|
||||||
=> btnClose.BackColor = ShiftSkinData.BtnCloseColor;
|
=> btnClose.BackColor = ShiftSkinData.Colors.BtnCloseColor;
|
||||||
|
|
||||||
void maximizebutton_MouseEnter(object sender, EventArgs e)
|
void maximizebutton_MouseEnter(object sender, EventArgs e)
|
||||||
=> btnMax.BackColor = ShiftSkinData.BtnMaxHoverColor;
|
=> btnMax.BackColor = ShiftSkinData.Colors.BtnMaxHoverColor;
|
||||||
|
|
||||||
void maximizebutton_MouseLeave(object sender, EventArgs e)
|
void maximizebutton_MouseLeave(object sender, EventArgs e)
|
||||||
=> btnMax.BackColor = ShiftSkinData.BtnMaxColor;
|
=> btnMax.BackColor = ShiftSkinData.Colors.BtnMaxColor;
|
||||||
|
|
||||||
void minimizebutton_MouseEnter(object sender, EventArgs e)
|
void minimizebutton_MouseEnter(object sender, EventArgs e)
|
||||||
=> btnMin.BackColor = ShiftSkinData.BtnMinHoverColor;
|
=> btnMin.BackColor = ShiftSkinData.Colors.BtnMinHoverColor;
|
||||||
|
|
||||||
|
|
||||||
void minimizebutton_MouseLeave(object sender, EventArgs e)
|
void minimizebutton_MouseLeave(object sender, EventArgs e)
|
||||||
=> btnMin.BackColor = ShiftSkinData.BtnMinColor;
|
=> btnMin.BackColor = ShiftSkinData.Colors.BtnMinColor;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
private void closebutton_MouseDown(object sender, MouseEventArgs e)
|
private void closebutton_MouseDown(object sender, MouseEventArgs e)
|
||||||
|
|
|
@ -15,7 +15,24 @@ namespace ShiftOS.Main
|
||||||
Application.EnableVisualStyles();
|
Application.EnableVisualStyles();
|
||||||
Application.SetCompatibleTextRenderingDefault(false);
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
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());
|
Application.Run(new Desktop());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
|
@ -63,12 +63,6 @@
|
||||||
<Compile Include="ShiftOS\Apps\ShifterStuff\SelectColor.Designer.cs">
|
<Compile Include="ShiftOS\Apps\ShifterStuff\SelectColor.Designer.cs">
|
||||||
<DependentUpon>SelectColor.cs</DependentUpon>
|
<DependentUpon>SelectColor.cs</DependentUpon>
|
||||||
</Compile>
|
</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">
|
<Compile Include="ShiftOS\Apps\ShifterStuff\Shifter.cs">
|
||||||
<SubType>UserControl</SubType>
|
<SubType>UserControl</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
@ -81,12 +75,6 @@
|
||||||
<Compile Include="ShiftOS\Apps\Terminal.Designer.cs">
|
<Compile Include="ShiftOS\Apps\Terminal.Designer.cs">
|
||||||
<DependentUpon>Terminal.cs</DependentUpon>
|
<DependentUpon>Terminal.cs</DependentUpon>
|
||||||
</Compile>
|
</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">
|
<Compile Include="ShiftOS\Apps\TextPad.cs">
|
||||||
<SubType>UserControl</SubType>
|
<SubType>UserControl</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
@ -99,10 +87,14 @@
|
||||||
<Compile Include="ShiftOS\Desktop.Designer.cs">
|
<Compile Include="ShiftOS\Desktop.Designer.cs">
|
||||||
<DependentUpon>Desktop.cs</DependentUpon>
|
<DependentUpon>Desktop.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Terminal\Commands\codepoints.cs" />
|
||||||
|
<Compile Include="Terminal\Commands\startx.cs" />
|
||||||
<Compile Include="Terminal\Commands\Clear.cs" />
|
<Compile Include="Terminal\Commands\Clear.cs" />
|
||||||
|
<Compile Include="Terminal\Commands\Echo.cs" />
|
||||||
<Compile Include="Terminal\Commands\Hello.cs" />
|
<Compile Include="Terminal\Commands\Hello.cs" />
|
||||||
<Compile Include="Terminal\Commands\Help.cs" />
|
<Compile Include="Terminal\Commands\Help.cs" />
|
||||||
<Compile Include="Terminal\Commands\sftp.cs" />
|
<Compile Include="Terminal\Commands\sftp.cs" />
|
||||||
|
<Compile Include="Terminal\Commands\shutdown.cs" />
|
||||||
<Compile Include="Terminal\Commands\tcpip.cs" />
|
<Compile Include="Terminal\Commands\tcpip.cs" />
|
||||||
<Compile Include="Terminal\Commands\TestStory.cs" />
|
<Compile Include="Terminal\Commands\TestStory.cs" />
|
||||||
<Compile Include="Terminal\TerminalBackend.cs" />
|
<Compile Include="Terminal\TerminalBackend.cs" />
|
||||||
|
@ -123,18 +115,12 @@
|
||||||
<EmbeddedResource Include="ShiftOS\Apps\ShifterStuff\SelectColor.resx">
|
<EmbeddedResource Include="ShiftOS\Apps\ShifterStuff\SelectColor.resx">
|
||||||
<DependentUpon>SelectColor.cs</DependentUpon>
|
<DependentUpon>SelectColor.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="ShiftOS\Apps\ShiftDemo.resx">
|
|
||||||
<DependentUpon>ShiftDemo.cs</DependentUpon>
|
|
||||||
</EmbeddedResource>
|
|
||||||
<EmbeddedResource Include="ShiftOS\Apps\ShifterStuff\Shifter.resx">
|
<EmbeddedResource Include="ShiftOS\Apps\ShifterStuff\Shifter.resx">
|
||||||
<DependentUpon>Shifter.cs</DependentUpon>
|
<DependentUpon>Shifter.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="ShiftOS\Apps\Terminal.resx">
|
<EmbeddedResource Include="ShiftOS\Apps\Terminal.resx">
|
||||||
<DependentUpon>Terminal.cs</DependentUpon>
|
<DependentUpon>Terminal.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="ShiftOS\Apps\TestForm.resx">
|
|
||||||
<DependentUpon>TestForm.cs</DependentUpon>
|
|
||||||
</EmbeddedResource>
|
|
||||||
<EmbeddedResource Include="ShiftOS\Apps\TextPad.resx">
|
<EmbeddedResource Include="ShiftOS\Apps\TextPad.resx">
|
||||||
<DependentUpon>TextPad.cs</DependentUpon>
|
<DependentUpon>TextPad.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
|
65
ShiftOS.Main/ShiftOS/Apps/FileSkimmer.Designer.cs
generated
65
ShiftOS.Main/ShiftOS/Apps/FileSkimmer.Designer.cs
generated
|
@ -35,6 +35,7 @@ namespace ShiftOS.Main.ShiftOS.Apps
|
||||||
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
||||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.newFileToolStripMenuItem = 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.newFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.breadcrumbsBar = new System.Windows.Forms.ToolStrip();
|
this.breadcrumbsBar = new System.Windows.Forms.ToolStrip();
|
||||||
this.toolStrip2 = new System.Windows.Forms.ToolStrip();
|
this.toolStrip2 = new System.Windows.Forms.ToolStrip();
|
||||||
|
@ -46,7 +47,6 @@ namespace ShiftOS.Main.ShiftOS.Apps
|
||||||
this.listToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.listToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.tilesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.tilesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.listView1 = new System.Windows.Forms.ListView();
|
this.listView1 = new System.Windows.Forms.ListView();
|
||||||
this.textFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||||
this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.renameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.renameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
@ -63,7 +63,8 @@ namespace ShiftOS.Main.ShiftOS.Apps
|
||||||
this.fileToolStripMenuItem});
|
this.fileToolStripMenuItem});
|
||||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||||
this.menuStrip1.Name = "menuStrip1";
|
this.menuStrip1.Name = "menuStrip1";
|
||||||
this.menuStrip1.Size = new System.Drawing.Size(1541, 33);
|
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.TabIndex = 1;
|
||||||
this.menuStrip1.Text = "menuStrip1";
|
this.menuStrip1.Text = "menuStrip1";
|
||||||
//
|
//
|
||||||
|
@ -73,7 +74,7 @@ namespace ShiftOS.Main.ShiftOS.Apps
|
||||||
this.newFileToolStripMenuItem,
|
this.newFileToolStripMenuItem,
|
||||||
this.newFolderToolStripMenuItem});
|
this.newFolderToolStripMenuItem});
|
||||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||||
this.fileToolStripMenuItem.Size = new System.Drawing.Size(50, 29);
|
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 22);
|
||||||
this.fileToolStripMenuItem.Text = "File";
|
this.fileToolStripMenuItem.Text = "File";
|
||||||
//
|
//
|
||||||
// newFileToolStripMenuItem
|
// newFileToolStripMenuItem
|
||||||
|
@ -81,21 +82,28 @@ namespace ShiftOS.Main.ShiftOS.Apps
|
||||||
this.newFileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
this.newFileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
this.textFileToolStripMenuItem});
|
this.textFileToolStripMenuItem});
|
||||||
this.newFileToolStripMenuItem.Name = "newFileToolStripMenuItem";
|
this.newFileToolStripMenuItem.Name = "newFileToolStripMenuItem";
|
||||||
this.newFileToolStripMenuItem.Size = new System.Drawing.Size(210, 30);
|
this.newFileToolStripMenuItem.Size = new System.Drawing.Size(134, 22);
|
||||||
this.newFileToolStripMenuItem.Text = "New File";
|
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
|
// newFolderToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.newFolderToolStripMenuItem.Name = "newFolderToolStripMenuItem";
|
this.newFolderToolStripMenuItem.Name = "newFolderToolStripMenuItem";
|
||||||
this.newFolderToolStripMenuItem.Size = new System.Drawing.Size(210, 30);
|
this.newFolderToolStripMenuItem.Size = new System.Drawing.Size(134, 22);
|
||||||
this.newFolderToolStripMenuItem.Text = "New Folder";
|
this.newFolderToolStripMenuItem.Text = "New Folder";
|
||||||
//
|
//
|
||||||
// breadcrumbsBar
|
// breadcrumbsBar
|
||||||
//
|
//
|
||||||
this.breadcrumbsBar.ImageScalingSize = new System.Drawing.Size(24, 24);
|
this.breadcrumbsBar.ImageScalingSize = new System.Drawing.Size(24, 24);
|
||||||
this.breadcrumbsBar.Location = new System.Drawing.Point(0, 33);
|
this.breadcrumbsBar.Location = new System.Drawing.Point(0, 24);
|
||||||
this.breadcrumbsBar.Name = "breadcrumbsBar";
|
this.breadcrumbsBar.Name = "breadcrumbsBar";
|
||||||
this.breadcrumbsBar.Size = new System.Drawing.Size(1541, 25);
|
this.breadcrumbsBar.Size = new System.Drawing.Size(1027, 25);
|
||||||
this.breadcrumbsBar.TabIndex = 2;
|
this.breadcrumbsBar.TabIndex = 2;
|
||||||
this.breadcrumbsBar.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.breadcrumbsBar_ItemClicked);
|
this.breadcrumbsBar.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.breadcrumbsBar_ItemClicked);
|
||||||
//
|
//
|
||||||
|
@ -105,9 +113,9 @@ namespace ShiftOS.Main.ShiftOS.Apps
|
||||||
this.toolStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
this.toolStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
this.toolStripButton1,
|
this.toolStripButton1,
|
||||||
this.toolStripDropDownButton1});
|
this.toolStripDropDownButton1});
|
||||||
this.toolStrip2.Location = new System.Drawing.Point(0, 58);
|
this.toolStrip2.Location = new System.Drawing.Point(0, 49);
|
||||||
this.toolStrip2.Name = "toolStrip2";
|
this.toolStrip2.Name = "toolStrip2";
|
||||||
this.toolStrip2.Size = new System.Drawing.Size(1541, 32);
|
this.toolStrip2.Size = new System.Drawing.Size(1027, 25);
|
||||||
this.toolStrip2.TabIndex = 3;
|
this.toolStrip2.TabIndex = 3;
|
||||||
this.toolStrip2.Text = "toolbar";
|
this.toolStrip2.Text = "toolbar";
|
||||||
//
|
//
|
||||||
|
@ -117,7 +125,7 @@ namespace ShiftOS.Main.ShiftOS.Apps
|
||||||
this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
|
this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
|
||||||
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
|
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||||
this.toolStripButton1.Name = "toolStripButton1";
|
this.toolStripButton1.Name = "toolStripButton1";
|
||||||
this.toolStripButton1.Size = new System.Drawing.Size(28, 29);
|
this.toolStripButton1.Size = new System.Drawing.Size(23, 22);
|
||||||
this.toolStripButton1.Text = "^";
|
this.toolStripButton1.Text = "^";
|
||||||
this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click);
|
this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click);
|
||||||
//
|
//
|
||||||
|
@ -133,58 +141,52 @@ namespace ShiftOS.Main.ShiftOS.Apps
|
||||||
this.toolStripDropDownButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButton1.Image")));
|
this.toolStripDropDownButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButton1.Image")));
|
||||||
this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
|
this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||||
this.toolStripDropDownButton1.Name = "toolStripDropDownButton1";
|
this.toolStripDropDownButton1.Name = "toolStripDropDownButton1";
|
||||||
this.toolStripDropDownButton1.Size = new System.Drawing.Size(119, 29);
|
this.toolStripDropDownButton1.Size = new System.Drawing.Size(79, 22);
|
||||||
this.toolStripDropDownButton1.Text = "View Mode";
|
this.toolStripDropDownButton1.Text = "View Mode";
|
||||||
this.toolStripDropDownButton1.DropDownItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.toolStripDropDownButton1_DropDownItemClicked);
|
this.toolStripDropDownButton1.DropDownItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.toolStripDropDownButton1_DropDownItemClicked);
|
||||||
//
|
//
|
||||||
// largeIconsToolStripMenuItem
|
// largeIconsToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.largeIconsToolStripMenuItem.Name = "largeIconsToolStripMenuItem";
|
this.largeIconsToolStripMenuItem.Name = "largeIconsToolStripMenuItem";
|
||||||
this.largeIconsToolStripMenuItem.Size = new System.Drawing.Size(186, 30);
|
this.largeIconsToolStripMenuItem.Size = new System.Drawing.Size(134, 22);
|
||||||
this.largeIconsToolStripMenuItem.Text = "Large Icons";
|
this.largeIconsToolStripMenuItem.Text = "Large Icons";
|
||||||
//
|
//
|
||||||
// smallIconsToolStripMenuItem
|
// smallIconsToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.smallIconsToolStripMenuItem.Name = "smallIconsToolStripMenuItem";
|
this.smallIconsToolStripMenuItem.Name = "smallIconsToolStripMenuItem";
|
||||||
this.smallIconsToolStripMenuItem.Size = new System.Drawing.Size(186, 30);
|
this.smallIconsToolStripMenuItem.Size = new System.Drawing.Size(134, 22);
|
||||||
this.smallIconsToolStripMenuItem.Text = "Small Icons";
|
this.smallIconsToolStripMenuItem.Text = "Small Icons";
|
||||||
//
|
//
|
||||||
// detailsToolStripMenuItem
|
// detailsToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.detailsToolStripMenuItem.Name = "detailsToolStripMenuItem";
|
this.detailsToolStripMenuItem.Name = "detailsToolStripMenuItem";
|
||||||
this.detailsToolStripMenuItem.Size = new System.Drawing.Size(186, 30);
|
this.detailsToolStripMenuItem.Size = new System.Drawing.Size(134, 22);
|
||||||
this.detailsToolStripMenuItem.Text = "Details";
|
this.detailsToolStripMenuItem.Text = "Details";
|
||||||
//
|
//
|
||||||
// listToolStripMenuItem
|
// listToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.listToolStripMenuItem.Name = "listToolStripMenuItem";
|
this.listToolStripMenuItem.Name = "listToolStripMenuItem";
|
||||||
this.listToolStripMenuItem.Size = new System.Drawing.Size(186, 30);
|
this.listToolStripMenuItem.Size = new System.Drawing.Size(134, 22);
|
||||||
this.listToolStripMenuItem.Text = "List";
|
this.listToolStripMenuItem.Text = "List";
|
||||||
//
|
//
|
||||||
// tilesToolStripMenuItem
|
// tilesToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.tilesToolStripMenuItem.Name = "tilesToolStripMenuItem";
|
this.tilesToolStripMenuItem.Name = "tilesToolStripMenuItem";
|
||||||
this.tilesToolStripMenuItem.Size = new System.Drawing.Size(186, 30);
|
this.tilesToolStripMenuItem.Size = new System.Drawing.Size(134, 22);
|
||||||
this.tilesToolStripMenuItem.Text = "Tiles";
|
this.tilesToolStripMenuItem.Text = "Tiles";
|
||||||
//
|
//
|
||||||
// listView1
|
// listView1
|
||||||
//
|
//
|
||||||
this.listView1.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.listView1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.listView1.Location = new System.Drawing.Point(0, 90);
|
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.Name = "listView1";
|
||||||
this.listView1.Size = new System.Drawing.Size(1541, 696);
|
this.listView1.Size = new System.Drawing.Size(1027, 437);
|
||||||
this.listView1.TabIndex = 4;
|
this.listView1.TabIndex = 4;
|
||||||
this.listView1.UseCompatibleStateImageBehavior = false;
|
this.listView1.UseCompatibleStateImageBehavior = false;
|
||||||
this.listView1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.listView1_MouseClick);
|
this.listView1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.listView1_MouseClick);
|
||||||
this.listView1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.listView1_MouseDoubleClick);
|
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
|
// contextMenuStrip1
|
||||||
//
|
//
|
||||||
this.contextMenuStrip1.ImageScalingSize = new System.Drawing.Size(24, 24);
|
this.contextMenuStrip1.ImageScalingSize = new System.Drawing.Size(24, 24);
|
||||||
|
@ -193,36 +195,37 @@ namespace ShiftOS.Main.ShiftOS.Apps
|
||||||
this.renameToolStripMenuItem,
|
this.renameToolStripMenuItem,
|
||||||
this.deleteToolStripMenuItem});
|
this.deleteToolStripMenuItem});
|
||||||
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||||
this.contextMenuStrip1.Size = new System.Drawing.Size(148, 94);
|
this.contextMenuStrip1.Size = new System.Drawing.Size(118, 70);
|
||||||
//
|
//
|
||||||
// openToolStripMenuItem
|
// openToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.openToolStripMenuItem.Name = "openToolStripMenuItem";
|
this.openToolStripMenuItem.Name = "openToolStripMenuItem";
|
||||||
this.openToolStripMenuItem.Size = new System.Drawing.Size(147, 30);
|
this.openToolStripMenuItem.Size = new System.Drawing.Size(117, 22);
|
||||||
this.openToolStripMenuItem.Text = "Open";
|
this.openToolStripMenuItem.Text = "Open";
|
||||||
//
|
//
|
||||||
// renameToolStripMenuItem
|
// renameToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.renameToolStripMenuItem.Name = "renameToolStripMenuItem";
|
this.renameToolStripMenuItem.Name = "renameToolStripMenuItem";
|
||||||
this.renameToolStripMenuItem.Size = new System.Drawing.Size(147, 30);
|
this.renameToolStripMenuItem.Size = new System.Drawing.Size(117, 22);
|
||||||
this.renameToolStripMenuItem.Text = "Rename";
|
this.renameToolStripMenuItem.Text = "Rename";
|
||||||
//
|
//
|
||||||
// deleteToolStripMenuItem
|
// deleteToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem";
|
this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem";
|
||||||
this.deleteToolStripMenuItem.Size = new System.Drawing.Size(147, 30);
|
this.deleteToolStripMenuItem.Size = new System.Drawing.Size(117, 22);
|
||||||
this.deleteToolStripMenuItem.Text = "Delete";
|
this.deleteToolStripMenuItem.Text = "Delete";
|
||||||
//
|
//
|
||||||
// FileSkimmer
|
// FileSkimmer
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.Controls.Add(this.listView1);
|
this.Controls.Add(this.listView1);
|
||||||
this.Controls.Add(this.toolStrip2);
|
this.Controls.Add(this.toolStrip2);
|
||||||
this.Controls.Add(this.breadcrumbsBar);
|
this.Controls.Add(this.breadcrumbsBar);
|
||||||
this.Controls.Add(this.menuStrip1);
|
this.Controls.Add(this.menuStrip1);
|
||||||
|
this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||||
this.Name = "FileSkimmer";
|
this.Name = "FileSkimmer";
|
||||||
this.Size = new System.Drawing.Size(1541, 786);
|
this.Size = new System.Drawing.Size(1027, 511);
|
||||||
this.menuStrip1.ResumeLayout(false);
|
this.menuStrip1.ResumeLayout(false);
|
||||||
this.menuStrip1.PerformLayout();
|
this.menuStrip1.PerformLayout();
|
||||||
this.toolStrip2.ResumeLayout(false);
|
this.toolStrip2.ResumeLayout(false);
|
||||||
|
|
|
@ -6,6 +6,7 @@ using ShiftOS.Engine.Misc;
|
||||||
using ShiftOS.Engine.ShiftFS;
|
using ShiftOS.Engine.ShiftFS;
|
||||||
using ShiftOS.Engine.WindowManager;
|
using ShiftOS.Engine.WindowManager;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using ShiftOS.Engine.UI;
|
||||||
|
|
||||||
namespace ShiftOS.Main.ShiftOS.Apps
|
namespace ShiftOS.Main.ShiftOS.Apps
|
||||||
{
|
{
|
||||||
|
@ -16,6 +17,7 @@ namespace ShiftOS.Main.ShiftOS.Apps
|
||||||
public FileSkimmer()
|
public FileSkimmer()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnLoaded(ShiftWindow window)
|
public void OnLoaded(ShiftWindow window)
|
||||||
|
|
|
@ -130,7 +130,7 @@
|
||||||
<data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
||||||
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
|
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
|
||||||
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
|
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
|
||||||
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
|
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">
|
<data name="toolStripDropDownButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
||||||
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
|
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
|
||||||
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
|
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
|
||||||
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
|
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
|
||||||
|
|
|
@ -128,6 +128,7 @@
|
||||||
this.Font = new System.Drawing.Font("Lucida Console", 9.25F);
|
this.Font = new System.Drawing.Font("Lucida Console", 9.25F);
|
||||||
this.Name = "SelectColor";
|
this.Name = "SelectColor";
|
||||||
this.Size = new System.Drawing.Size(317, 158);
|
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.redUpDown)).EndInit();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.greenUpDown)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.greenUpDown)).EndInit();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.blueUpDown)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.blueUpDown)).EndInit();
|
||||||
|
|
|
@ -3,6 +3,7 @@ using System.Drawing;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using ShiftOS.Engine.WindowManager;
|
using ShiftOS.Engine.WindowManager;
|
||||||
|
using ShiftOS.Engine.UI;
|
||||||
|
|
||||||
namespace ShiftOS.Main.ShiftOS.Apps.ShifterStuff
|
namespace ShiftOS.Main.ShiftOS.Apps.ShifterStuff
|
||||||
{
|
{
|
||||||
|
@ -50,5 +51,13 @@ namespace ShiftOS.Main.ShiftOS.Apps.ShifterStuff
|
||||||
{
|
{
|
||||||
SetColor();
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -30,6 +30,8 @@
|
||||||
{
|
{
|
||||||
this.tabControl1 = new System.Windows.Forms.TabControl();
|
this.tabControl1 = new System.Windows.Forms.TabControl();
|
||||||
this.tabPage1 = new System.Windows.Forms.TabPage();
|
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.btnSave = new System.Windows.Forms.Button();
|
||||||
this.button5 = new System.Windows.Forms.Button();
|
this.button5 = new System.Windows.Forms.Button();
|
||||||
this.button4 = new System.Windows.Forms.Button();
|
this.button4 = new System.Windows.Forms.Button();
|
||||||
|
@ -38,7 +40,8 @@
|
||||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||||
this.button1 = new System.Windows.Forms.Button();
|
this.button1 = new System.Windows.Forms.Button();
|
||||||
this.tabPage2 = new System.Windows.Forms.TabPage();
|
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.tabControl1.SuspendLayout();
|
||||||
this.tabPage1.SuspendLayout();
|
this.tabPage1.SuspendLayout();
|
||||||
this.groupBox1.SuspendLayout();
|
this.groupBox1.SuspendLayout();
|
||||||
|
@ -59,6 +62,9 @@
|
||||||
//
|
//
|
||||||
// tabPage1
|
// 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.btnLoad);
|
||||||
this.tabPage1.Controls.Add(this.btnSave);
|
this.tabPage1.Controls.Add(this.btnSave);
|
||||||
this.tabPage1.Controls.Add(this.button5);
|
this.tabPage1.Controls.Add(this.button5);
|
||||||
|
@ -74,6 +80,30 @@
|
||||||
this.tabPage1.Text = "Titlebar";
|
this.tabPage1.Text = "Titlebar";
|
||||||
this.tabPage1.UseVisualStyleBackColor = true;
|
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
|
// btnSave
|
||||||
//
|
//
|
||||||
this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
|
@ -96,7 +126,6 @@
|
||||||
this.button5.TabIndex = 5;
|
this.button5.TabIndex = 5;
|
||||||
this.button5.Text = "Apply";
|
this.button5.Text = "Apply";
|
||||||
this.button5.UseVisualStyleBackColor = true;
|
this.button5.UseVisualStyleBackColor = true;
|
||||||
this.button5.Click += new System.EventHandler(this.button5_Click);
|
|
||||||
//
|
//
|
||||||
// button4
|
// button4
|
||||||
//
|
//
|
||||||
|
@ -166,17 +195,33 @@
|
||||||
this.tabPage2.Text = "tabPage2";
|
this.tabPage2.Text = "tabPage2";
|
||||||
this.tabPage2.UseVisualStyleBackColor = true;
|
this.tabPage2.UseVisualStyleBackColor = true;
|
||||||
//
|
//
|
||||||
// btnLoad
|
// shiftButton1
|
||||||
//
|
//
|
||||||
this.btnLoad.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
this.shiftButton1.BackColor = System.Drawing.Color.White;
|
||||||
this.btnLoad.Font = new System.Drawing.Font("Lucida Console", 8.25F);
|
this.shiftButton1.FlatAppearance.BorderColor = System.Drawing.Color.Gray;
|
||||||
this.btnLoad.Location = new System.Drawing.Point(165, 267);
|
this.shiftButton1.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
|
||||||
this.btnLoad.Name = "btnLoad";
|
this.shiftButton1.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.btnLoad.Size = new System.Drawing.Size(155, 23);
|
this.shiftButton1.ForeColor = System.Drawing.Color.Black;
|
||||||
this.btnLoad.TabIndex = 7;
|
this.shiftButton1.Location = new System.Drawing.Point(205, 25);
|
||||||
this.btnLoad.Text = "Load Skin";
|
this.shiftButton1.Margin = new System.Windows.Forms.Padding(0);
|
||||||
this.btnLoad.UseVisualStyleBackColor = true;
|
this.shiftButton1.MinimumSize = new System.Drawing.Size(75, 23);
|
||||||
this.btnLoad.Click += new System.EventHandler(this.btnLoad_Click);
|
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
|
// Shifter
|
||||||
//
|
//
|
||||||
|
@ -205,5 +250,8 @@
|
||||||
private System.Windows.Forms.Button button5;
|
private System.Windows.Forms.Button button5;
|
||||||
private System.Windows.Forms.Button btnSave;
|
private System.Windows.Forms.Button btnSave;
|
||||||
private System.Windows.Forms.Button btnLoad;
|
private System.Windows.Forms.Button btnLoad;
|
||||||
|
private System.Windows.Forms.Button button6;
|
||||||
|
private System.Windows.Forms.Button button7;
|
||||||
|
private Engine.UI.ShiftButton shiftButton1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,6 @@ namespace ShiftOS.Main.ShiftOS.Apps.ShifterStuff
|
||||||
public partial class Shifter : UserControl
|
public partial class Shifter : UserControl
|
||||||
{
|
{
|
||||||
public int ColorType; //This is a check to see what option was chosen.
|
public int ColorType; //This is a check to see what option was chosen.
|
||||||
|
|
||||||
public Shifter()
|
public Shifter()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
@ -24,95 +23,106 @@ namespace ShiftOS.Main.ShiftOS.Apps.ShifterStuff
|
||||||
ShiftWM.Init(new SelectColor(), "Select a color", Resources.iconColourPicker_fw);
|
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)
|
||||||
{
|
{
|
||||||
int offset = 30;
|
SetBorderColor(borderColor);
|
||||||
SetBorderColor(Color.FromArgb(64, 64, 64));
|
ShiftSkinData.Colors.BtnCloseColor = btnClose;
|
||||||
ShiftSkinData.BtnCloseColor = Color.Black;
|
ShiftSkinData.Colors.BtnCloseHoverColor = btnCloseHover;
|
||||||
ShiftSkinData.BtnCloseHoverColor = Color.FromArgb(40, 40, 40);
|
ShiftSkinData.Colors.BtnMaxColor = btnMax;
|
||||||
ShiftSkinData.BtnMaxColor = Color.Black;
|
ShiftSkinData.Colors.BtnMaxHoverColor = btnMaxHover;
|
||||||
ShiftSkinData.BtnMaxHoverColor = Color.FromArgb(40, 40, 40);
|
ShiftSkinData.Colors.BtnMinColor = btnMin;
|
||||||
ShiftSkinData.BtnMinColor = Color.Black;
|
ShiftSkinData.Colors.BtnMinHoverColor = btnMinHover;
|
||||||
ShiftSkinData.BtnMinHoverColor = Color.FromArgb(40, 40, 40);
|
|
||||||
button5_Click(sender, e);
|
|
||||||
}
|
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetBorderColor
|
// SetBorderColor
|
||||||
public void SetBorderColor(Color borderColor)
|
public void SetBorderColor(Color borderColor)
|
||||||
{
|
{
|
||||||
ShiftSkinData.LeftTopCornerColor = borderColor;
|
ShiftSkinData.Colors.LeftTopCornerColor = borderColor;
|
||||||
ShiftSkinData.TitleBarColor = borderColor;
|
ShiftSkinData.Colors.TitleBarColor = borderColor;
|
||||||
ShiftSkinData.RightTopCornerColor = borderColor;
|
ShiftSkinData.Colors.RightTopCornerColor = borderColor;
|
||||||
ShiftSkinData.LeftSideColor = borderColor;
|
ShiftSkinData.Colors.LeftSideColor = borderColor;
|
||||||
ShiftSkinData.RightSideColor = borderColor;
|
ShiftSkinData.Colors.RightSideColor = borderColor;
|
||||||
ShiftSkinData.LeftBottomCornerColor = borderColor;
|
ShiftSkinData.Colors.LeftBottomCornerColor = borderColor;
|
||||||
ShiftSkinData.BottomSideColor = borderColor;
|
ShiftSkinData.Colors.BottomSideColor = borderColor;
|
||||||
ShiftSkinData.RightBottomCornerColor = borderColor;
|
ShiftSkinData.Colors.RightBottomCornerColor = borderColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
void button5_Click(object sender, EventArgs e)
|
void SetDefaultSkin(object sender, EventArgs 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)
|
||||||
|
{
|
||||||
|
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();
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ApplySkin()
|
||||||
{
|
{
|
||||||
foreach (var window in ShiftWM.Windows)
|
foreach (var window in ShiftWM.Windows)
|
||||||
{
|
{
|
||||||
window.Invoke(new Action(() => window.titleBar.BackColor = ShiftSkinData.TitleBarColor));
|
window.Invoke(new Action(() => window.titleBar.BackColor = ShiftSkinData.Colors.TitleBarColor));
|
||||||
window.Invoke(new Action(() => window.leftTopCorner.BackColor = ShiftSkinData.LeftTopCornerColor));
|
window.Invoke(new Action(() => window.leftTopCorner.BackColor = ShiftSkinData.Colors.LeftTopCornerColor));
|
||||||
window.Invoke(new Action(() => window.rightTopCorner.BackColor = ShiftSkinData.RightTopCornerColor));
|
window.Invoke(new Action(() => window.rightTopCorner.BackColor = ShiftSkinData.Colors.RightTopCornerColor));
|
||||||
window.Invoke(new Action(() => window.leftSide.BackColor = ShiftSkinData.LeftSideColor));
|
window.Invoke(new Action(() => window.leftSide.BackColor = ShiftSkinData.Colors.LeftSideColor));
|
||||||
window.Invoke(new Action(() => window.rightSide.BackColor = ShiftSkinData.RightSideColor));
|
window.Invoke(new Action(() => window.rightSide.BackColor = ShiftSkinData.Colors.RightSideColor));
|
||||||
window.Invoke(new Action(() => window.leftBottomCorner.BackColor = ShiftSkinData.LeftBottomCornerColor));
|
window.Invoke(new Action(() => window.leftBottomCorner.BackColor = ShiftSkinData.Colors.LeftBottomCornerColor));
|
||||||
window.Invoke(new Action(() => window.bottomSide.BackColor = ShiftSkinData.BottomSideColor));
|
window.Invoke(new Action(() => window.bottomSide.BackColor = ShiftSkinData.Colors.BottomSideColor));
|
||||||
window.Invoke(new Action(() => window.rightBottomCorner.BackColor = ShiftSkinData.RightBottomCornerColor));
|
window.Invoke(new Action(() => window.rightBottomCorner.BackColor = ShiftSkinData.Colors.RightBottomCornerColor));
|
||||||
window.Invoke(new Action(() => window.btnClose.BackColor = ShiftSkinData.BtnCloseColor));
|
window.Invoke(new Action(() => window.btnClose.BackColor = ShiftSkinData.Colors.BtnCloseColor));
|
||||||
window.Invoke(new Action(() => window.btnMax.BackColor = ShiftSkinData.BtnMaxColor));
|
window.Invoke(new Action(() => window.btnMax.BackColor = ShiftSkinData.Colors.BtnMaxColor));
|
||||||
window.Invoke(new Action(() => window.btnMin.BackColor = ShiftSkinData.BtnMinColor));
|
window.Invoke(new Action(() => window.btnMin.BackColor = ShiftSkinData.Colors.BtnMinColor));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void btnSave_Click(object sender, EventArgs e)
|
void btnSave_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var shiftColors = new Color[14];
|
Color[] shiftSkinColors = new Color[14];
|
||||||
shiftColors[0] = ShiftSkinData.LeftTopCornerColor;
|
int i = 0;
|
||||||
shiftColors[1] = ShiftSkinData.TitleBarColor;
|
|
||||||
shiftColors[2] = ShiftSkinData.RightTopCornerColor;
|
shiftSkinColors[0] = ShiftSkinData.Colors.LeftTopCornerColor;
|
||||||
shiftColors[3] = ShiftSkinData.LeftSideColor;
|
shiftSkinColors[1] = ShiftSkinData.Colors.TitleBarColor;
|
||||||
shiftColors[4] = ShiftSkinData.RightSideColor;
|
shiftSkinColors[2] = ShiftSkinData.Colors.RightTopCornerColor;
|
||||||
shiftColors[5] = ShiftSkinData.LeftBottomCornerColor;
|
shiftSkinColors[3] = ShiftSkinData.Colors.LeftSideColor;
|
||||||
shiftColors[6] = ShiftSkinData.BottomSideColor;
|
shiftSkinColors[4] = ShiftSkinData.Colors.RightSideColor;
|
||||||
shiftColors[7] = ShiftSkinData.RightBottomCornerColor;
|
shiftSkinColors[5] = ShiftSkinData.Colors.LeftBottomCornerColor;
|
||||||
shiftColors[8] = ShiftSkinData.BtnCloseColor;
|
shiftSkinColors[6] = ShiftSkinData.Colors.BottomSideColor;
|
||||||
shiftColors[9] = ShiftSkinData.BtnMaxColor;
|
shiftSkinColors[7] = ShiftSkinData.Colors.RightBottomCornerColor;
|
||||||
shiftColors[10] = ShiftSkinData.BtnMinColor;
|
shiftSkinColors[8] = ShiftSkinData.Colors.BtnCloseColor;
|
||||||
shiftColors[11] = ShiftSkinData.BtnCloseHoverColor;
|
shiftSkinColors[9] = ShiftSkinData.Colors.BtnCloseHoverColor;
|
||||||
shiftColors[12] = ShiftSkinData.BtnMaxHoverColor;
|
shiftSkinColors[10] = ShiftSkinData.Colors.BtnMaxColor;
|
||||||
shiftColors[13] = ShiftSkinData.BtnMinHoverColor;
|
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"))
|
using (var fobj = File.OpenWrite(@"C:\Users\Public\Documents\Skin.whoa"))
|
||||||
Whoa.Whoa.SerialiseObject(fobj, shiftColors);
|
Whoa.Whoa.SerialiseObject(fobj, shiftSkinColors);
|
||||||
|
|
||||||
ShiftWM.StartInfoboxSession(
|
ShiftWM.StartInfoboxSession(
|
||||||
"Saved Skin",
|
"Saved Skin",
|
||||||
|
@ -122,30 +132,43 @@ namespace ShiftOS.Main.ShiftOS.Apps.ShifterStuff
|
||||||
|
|
||||||
private void btnLoad_Click(object sender, EventArgs e)
|
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"))
|
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.Colors.LeftTopCornerColor = shiftSkinColors[0];
|
||||||
ShiftSkinData.TitleBarColor = shiftColors[1];
|
ShiftSkinData.Colors.TitleBarColor = shiftSkinColors[1];
|
||||||
ShiftSkinData.RightTopCornerColor = shiftColors[2];
|
ShiftSkinData.Colors.RightTopCornerColor = shiftSkinColors[2];
|
||||||
ShiftSkinData.LeftSideColor = shiftColors[3];
|
ShiftSkinData.Colors.LeftSideColor = shiftSkinColors[3];
|
||||||
ShiftSkinData.RightSideColor = shiftColors[4];
|
ShiftSkinData.Colors.RightSideColor = shiftSkinColors[4];
|
||||||
ShiftSkinData.LeftBottomCornerColor = shiftColors[5];
|
ShiftSkinData.Colors.LeftBottomCornerColor = shiftSkinColors[5];
|
||||||
ShiftSkinData.BottomSideColor = shiftColors[6];
|
ShiftSkinData.Colors.BottomSideColor = shiftSkinColors[6];
|
||||||
ShiftSkinData.RightBottomCornerColor = shiftColors[7];
|
ShiftSkinData.Colors.RightBottomCornerColor = shiftSkinColors[7];
|
||||||
ShiftSkinData.BtnCloseColor = shiftColors[8];
|
ShiftSkinData.Colors.BtnCloseColor = shiftSkinColors[8];
|
||||||
ShiftSkinData.BtnMaxColor = shiftColors[9];
|
ShiftSkinData.Colors.BtnCloseHoverColor = shiftSkinColors[9];
|
||||||
ShiftSkinData.BtnMinColor = shiftColors[10];
|
ShiftSkinData.Colors.BtnMaxColor = shiftSkinColors[10];
|
||||||
ShiftSkinData.BtnCloseHoverColor = shiftColors[11];
|
ShiftSkinData.Colors.BtnMaxHoverColor = shiftSkinColors[11];
|
||||||
ShiftSkinData.BtnMaxHoverColor = shiftColors[12];
|
ShiftSkinData.Colors.BtnMinColor = shiftSkinColors[12];
|
||||||
ShiftSkinData.BtnMinHoverColor = shiftColors[13];
|
ShiftSkinData.Colors.BtnMinHoverColor = shiftSkinColors[13];
|
||||||
|
|
||||||
button5_Click(sender, e);
|
ApplySkin();
|
||||||
ShiftWM.StartInfoboxSession(
|
ShiftWM.StartInfoboxSession(
|
||||||
"Loaded Skin",
|
"Loaded Skin",
|
||||||
"Loaded Skin from C:\\Users\\Public\\Documents\\Skin.whoa",
|
"Loaded Skin from C:\\Users\\Public\\Documents\\Skin.whoa",
|
||||||
InfoboxTemplate.ButtonType.Ok);
|
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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
11
ShiftOS.Main/ShiftOS/Desktop.Designer.cs
generated
11
ShiftOS.Main/ShiftOS/Desktop.Designer.cs
generated
|
@ -95,7 +95,8 @@
|
||||||
this.applicationsToolStripMenuItem});
|
this.applicationsToolStripMenuItem});
|
||||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||||
this.menuStrip1.Name = "menuStrip1";
|
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.TabIndex = 2;
|
||||||
this.menuStrip1.Text = "Applications";
|
this.menuStrip1.Text = "Applications";
|
||||||
//
|
//
|
||||||
|
@ -113,28 +114,28 @@
|
||||||
// shifterToolStripMenuItem
|
// shifterToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.shifterToolStripMenuItem.Name = "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.Text = "Shifter";
|
||||||
this.shifterToolStripMenuItem.Click += new System.EventHandler(this.shifterToolStripMenuItem_Click);
|
this.shifterToolStripMenuItem.Click += new System.EventHandler(this.shifterToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
// terminalToolStripMenuItem
|
// terminalToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.terminalToolStripMenuItem.Name = "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.Text = "Terminal";
|
||||||
this.terminalToolStripMenuItem.Click += new System.EventHandler(this.terminalToolStripMenuItem_Click);
|
this.terminalToolStripMenuItem.Click += new System.EventHandler(this.terminalToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
// textPadToolStripMenuItem
|
// textPadToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.textPadToolStripMenuItem.Name = "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.Text = "TextPad";
|
||||||
this.textPadToolStripMenuItem.Click += new System.EventHandler(this.textPadToolStripMenuItem_Click);
|
this.textPadToolStripMenuItem.Click += new System.EventHandler(this.textPadToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
// fileSkimmerToolStripMenuItem
|
// fileSkimmerToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.fileSkimmerToolStripMenuItem.Name = "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.Text = "File Skimmer";
|
||||||
this.fileSkimmerToolStripMenuItem.Click += new System.EventHandler(this.fileSkimmerToolStripMenuItem_Click);
|
this.fileSkimmerToolStripMenuItem.Click += new System.EventHandler(this.fileSkimmerToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
|
|
@ -5,24 +5,28 @@ using ShiftOS.Main.Properties;
|
||||||
using ShiftOS.Main.ShiftOS.Apps;
|
using ShiftOS.Main.ShiftOS.Apps;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using ShiftOS.Engine;
|
using ShiftOS.Engine;
|
||||||
|
using System.Drawing;
|
||||||
|
using ShiftOS.Engine.UI;
|
||||||
|
|
||||||
namespace ShiftOS.Main.ShiftOS
|
namespace ShiftOS.Main.ShiftOS
|
||||||
{
|
{
|
||||||
// testing github because git hates me
|
// testing github because git hates me
|
||||||
public partial class Desktop : Form
|
public partial class Desktop : Form
|
||||||
{
|
{
|
||||||
|
Graphics g;
|
||||||
public Desktop()
|
public Desktop()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
timer1.Start();
|
timer1.Start();
|
||||||
Setup();
|
|
||||||
Closed += (sender, args) => { Application.Exit(); };
|
Closed += (sender, args) => { Application.Exit(); };
|
||||||
|
var s = new ShiftStripRenderer();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void shifterToolStripMenuItem_Click(object sender, EventArgs e)
|
private void shifterToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Apps.ShifterStuff.Shifter app = new Apps.ShifterStuff.Shifter();
|
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)
|
private void Desktop_Load(object sender, EventArgs e)
|
||||||
|
@ -53,11 +57,11 @@ namespace ShiftOS.Main.ShiftOS
|
||||||
{
|
{
|
||||||
lblClock.Text = DateTime.Now.ToString("hh:mm:ss");
|
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);
|
var s = new ShiftStripRenderer();
|
||||||
if (!Directory.Exists(SaveSystem.fontDir)) Directory.CreateDirectory(SaveSystem.fontDir);
|
s.DrawToolStripBackground(e);
|
||||||
if (!File.Exists(SaveSystem.fontDir + "\\termFont.ttf")) File.WriteAllBytes(SaveSystem.fontDir + "\\termFont.ttf", Resources.UbuntuMono_R);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,9 +120,6 @@
|
||||||
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>219, 17</value>
|
<value>219, 17</value>
|
||||||
</metadata>
|
</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">
|
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>132, 17</value>
|
<value>132, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
|
37
ShiftOS.Main/Terminal/Commands/Echo.cs
Normal file
37
ShiftOS.Main/Terminal/Commands/Echo.cs
Normal file
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -12,7 +12,7 @@ namespace ShiftOS.Main.Terminal.Commands
|
||||||
public override string Name { get; } = "Hello";
|
public override string Name { get; } = "Hello";
|
||||||
public override string Summary { get; } = "Just an example command.";
|
public override string Summary { get; } = "Just an example command.";
|
||||||
public override string Usage { get; } = "Hello <NAME>.";
|
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)
|
public override void Run(params string[] parameters)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Drawing;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
@ -11,7 +12,7 @@ namespace ShiftOS.Main.Terminal.Commands
|
||||||
public override string Name { get; } = "help";
|
public override string Name { get; } = "help";
|
||||||
public override string Summary { get; } = "Shows the list of valid commands.";
|
public override string Summary { get; } = "Shows the list of valid commands.";
|
||||||
public override string Usage { get; } = "help <command>";
|
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)
|
public override void Run(params string[] args)
|
||||||
{
|
{
|
||||||
|
@ -22,16 +23,17 @@ namespace ShiftOS.Main.Terminal.Commands
|
||||||
bool solved = false;
|
bool solved = false;
|
||||||
foreach (var t in TerminalBackend.instances)
|
foreach (var t in TerminalBackend.instances)
|
||||||
{
|
{
|
||||||
if (t.Name == args[0])
|
if (t.Name.ToLower() == args[0].ToLower())
|
||||||
{
|
{
|
||||||
solved = true;
|
solved = true;
|
||||||
WriteLine($"{t.Name}: {t.Summary} \n usage: {t.Usage}");
|
WriteLine($"{t.Name}: {t.Summary} \n usage: {t.Usage}");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (t.Name.ToLower() == args[0].ToLower() && t.Unlocked == false) return;
|
||||||
}
|
}
|
||||||
if (!solved)
|
if (!solved)
|
||||||
{
|
{
|
||||||
WriteLine($"sbash: invalid token: {args[0]}");
|
Write($"sbash: unexpected token: {args[0]}", Color.White);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Drawing;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
@ -18,10 +19,19 @@ namespace ShiftOS.Main.Terminal.Commands
|
||||||
{
|
{
|
||||||
var r = new Random();
|
var r = new Random();
|
||||||
WriteLine($"Incoming connection from {r.Next(0, 256)}.{r.Next(0, 256)}.{r.Next(0, 256)}.{r.Next(0, 256)}...");
|
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\".");
|
WriteLine("User set alias as \"DevX\".");
|
||||||
Thread.Sleep(2000);
|
Task.Delay(1);
|
||||||
|
Thread.Sleep(4000);
|
||||||
WriteLine("User <DevX> has connected successfully!");
|
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}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
33
ShiftOS.Main/Terminal/Commands/codepoints.cs
Normal file
33
ShiftOS.Main/Terminal/Commands/codepoints.cs
Normal file
|
@ -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.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
23
ShiftOS.Main/Terminal/Commands/shutdown.cs
Normal file
23
ShiftOS.Main/Terminal/Commands/shutdown.cs
Normal file
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
57
ShiftOS.Main/Terminal/Commands/startx.cs
Normal file
57
ShiftOS.Main/Terminal/Commands/startx.cs
Normal file
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -44,6 +44,11 @@ namespace ShiftOS.Main.Terminal
|
||||||
commandBuffer.Push(command);
|
commandBuffer.Push(command);
|
||||||
return;
|
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 (command.Length == 0) return;
|
||||||
if (!complete)
|
if (!complete)
|
||||||
|
@ -51,7 +56,6 @@ namespace ShiftOS.Main.Terminal
|
||||||
Array.Find(trm.ToArray(), w => w.TerminalID == TermID).termmain.AppendText($"\n sbash: invalid command: {command.Split(' ').First()}");
|
Array.Find(trm.ToArray(), w => w.TerminalID == TermID).termmain.AppendText($"\n sbash: invalid command: {command.Split(' ').First()}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Array.Find(trm.ToArray(), w => w.TerminalID == TermID).termmain.Text += " \n The command cannot be found. \n";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,8 @@ using ShiftOS.Main.Terminal;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Drawing.Text;
|
using System.Drawing.Text;
|
||||||
|
using System.IO;
|
||||||
|
using ShiftOS.Main.Properties;
|
||||||
|
|
||||||
namespace ShiftOS.Main.ShiftOS.Apps
|
namespace ShiftOS.Main.ShiftOS.Apps
|
||||||
{
|
{
|
||||||
|
@ -33,10 +35,8 @@ namespace ShiftOS.Main.ShiftOS.Apps
|
||||||
|
|
||||||
TerminalBackend.trm.Add(this);
|
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()
|
void Print()
|
||||||
|
@ -144,5 +144,27 @@ namespace ShiftOS.Main.ShiftOS.Apps
|
||||||
termmain.AppendText(c.Pop());
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue