mirror of
https://github.com/seriocomedy/ShiftOS-C-.git
synced 2025-01-22 17:22:14 +00:00
Sort source code into folders.
It feels better to know what's responsible for what... Plus I removed some un-needed C# stuff.
This commit is contained in:
parent
6707e2076a
commit
84f689b91a
171 changed files with 0 additions and 4791 deletions
|
@ -1,133 +0,0 @@
|
||||||
namespace ShiftOS
|
|
||||||
{
|
|
||||||
partial class AlternateDesktop
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Required designer variable.
|
|
||||||
/// </summary>
|
|
||||||
private System.ComponentModel.IContainer components = null;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Clean up any resources being used.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
|
||||||
protected override void Dispose(bool disposing)
|
|
||||||
{
|
|
||||||
if (disposing && (components != null))
|
|
||||||
{
|
|
||||||
components.Dispose();
|
|
||||||
}
|
|
||||||
base.Dispose(disposing);
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Windows Form Designer generated code
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Required method for Designer support - do not modify
|
|
||||||
/// the contents of this method with the code editor.
|
|
||||||
/// </summary>
|
|
||||||
private void InitializeComponent()
|
|
||||||
{
|
|
||||||
this.components = new System.ComponentModel.Container();
|
|
||||||
this.pnlcontext = new System.Windows.Forms.Panel();
|
|
||||||
this.pnlapplauncher = new System.Windows.Forms.Panel();
|
|
||||||
this.pnlsidebar = new System.Windows.Forms.FlowLayoutPanel();
|
|
||||||
this.lbclock = new System.Windows.Forms.Label();
|
|
||||||
this.ClockTick = new System.Windows.Forms.Timer(this.components);
|
|
||||||
this.lblapplabel = new System.Windows.Forms.Label();
|
|
||||||
this.apptick = new System.Windows.Forms.Timer(this.components);
|
|
||||||
this.pnlcontext.SuspendLayout();
|
|
||||||
this.SuspendLayout();
|
|
||||||
//
|
|
||||||
// pnlcontext
|
|
||||||
//
|
|
||||||
this.pnlcontext.BackColor = System.Drawing.Color.Gray;
|
|
||||||
this.pnlcontext.Controls.Add(this.lbclock);
|
|
||||||
this.pnlcontext.Dock = System.Windows.Forms.DockStyle.Top;
|
|
||||||
this.pnlcontext.Location = new System.Drawing.Point(0, 0);
|
|
||||||
this.pnlcontext.Name = "pnlcontext";
|
|
||||||
this.pnlcontext.Size = new System.Drawing.Size(936, 28);
|
|
||||||
this.pnlcontext.TabIndex = 0;
|
|
||||||
//
|
|
||||||
// pnlapplauncher
|
|
||||||
//
|
|
||||||
this.pnlapplauncher.BackColor = System.Drawing.Color.Gray;
|
|
||||||
this.pnlapplauncher.Location = new System.Drawing.Point(71, 47);
|
|
||||||
this.pnlapplauncher.Name = "pnlapplauncher";
|
|
||||||
this.pnlapplauncher.Size = new System.Drawing.Size(664, 353);
|
|
||||||
this.pnlapplauncher.TabIndex = 1;
|
|
||||||
this.pnlapplauncher.Visible = false;
|
|
||||||
//
|
|
||||||
// pnlsidebar
|
|
||||||
//
|
|
||||||
this.pnlsidebar.BackColor = System.Drawing.Color.Gray;
|
|
||||||
this.pnlsidebar.Dock = System.Windows.Forms.DockStyle.Left;
|
|
||||||
this.pnlsidebar.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
|
|
||||||
this.pnlsidebar.Location = new System.Drawing.Point(0, 28);
|
|
||||||
this.pnlsidebar.Name = "pnlsidebar";
|
|
||||||
this.pnlsidebar.Size = new System.Drawing.Size(52, 509);
|
|
||||||
this.pnlsidebar.TabIndex = 2;
|
|
||||||
//
|
|
||||||
// lbclock
|
|
||||||
//
|
|
||||||
this.lbclock.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
|
||||||
this.lbclock.Location = new System.Drawing.Point(820, 0);
|
|
||||||
this.lbclock.Name = "lbclock";
|
|
||||||
this.lbclock.Size = new System.Drawing.Size(113, 28);
|
|
||||||
this.lbclock.TabIndex = 0;
|
|
||||||
this.lbclock.Text = "500023";
|
|
||||||
this.lbclock.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
|
||||||
//
|
|
||||||
// ClockTick
|
|
||||||
//
|
|
||||||
this.ClockTick.Enabled = true;
|
|
||||||
this.ClockTick.Tick += new System.EventHandler(this.ClockTick_Tick);
|
|
||||||
//
|
|
||||||
// lblapplabel
|
|
||||||
//
|
|
||||||
this.lblapplabel.AutoSize = true;
|
|
||||||
this.lblapplabel.Location = new System.Drawing.Point(823, 313);
|
|
||||||
this.lblapplabel.Name = "lblapplabel";
|
|
||||||
this.lblapplabel.Size = new System.Drawing.Size(35, 13);
|
|
||||||
this.lblapplabel.TabIndex = 3;
|
|
||||||
this.lblapplabel.Text = "label1";
|
|
||||||
this.lblapplabel.Visible = false;
|
|
||||||
//
|
|
||||||
// apptick
|
|
||||||
//
|
|
||||||
this.apptick.Enabled = true;
|
|
||||||
this.apptick.Interval = 2000;
|
|
||||||
this.apptick.Tick += new System.EventHandler(this.apptick_Tick);
|
|
||||||
//
|
|
||||||
// AlternateDesktop
|
|
||||||
//
|
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
|
||||||
this.BackColor = System.Drawing.Color.Black;
|
|
||||||
this.ClientSize = new System.Drawing.Size(936, 537);
|
|
||||||
this.Controls.Add(this.lblapplabel);
|
|
||||||
this.Controls.Add(this.pnlsidebar);
|
|
||||||
this.Controls.Add(this.pnlapplauncher);
|
|
||||||
this.Controls.Add(this.pnlcontext);
|
|
||||||
this.ForeColor = System.Drawing.Color.White;
|
|
||||||
this.Name = "AlternateDesktop";
|
|
||||||
this.Text = "AlternateDesktop";
|
|
||||||
this.Load += new System.EventHandler(this.AlternateDesktop_Load);
|
|
||||||
this.pnlcontext.ResumeLayout(false);
|
|
||||||
this.ResumeLayout(false);
|
|
||||||
this.PerformLayout();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
private System.Windows.Forms.Panel pnlcontext;
|
|
||||||
private System.Windows.Forms.Label lbclock;
|
|
||||||
private System.Windows.Forms.Panel pnlapplauncher;
|
|
||||||
private System.Windows.Forms.FlowLayoutPanel pnlsidebar;
|
|
||||||
private System.Windows.Forms.Timer ClockTick;
|
|
||||||
private System.Windows.Forms.Label lblapplabel;
|
|
||||||
private System.Windows.Forms.Timer apptick;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,165 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Data;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
|
|
||||||
namespace ShiftOS
|
|
||||||
{
|
|
||||||
public partial class AlternateDesktop : Form
|
|
||||||
{
|
|
||||||
public AlternateDesktop()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ClockTick_Tick(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
lbclock.Text = API.GetTime();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void GetApps()
|
|
||||||
{
|
|
||||||
pnlsidebar.Controls.Clear();
|
|
||||||
API.GetAppLauncherItems();
|
|
||||||
Panel appbtn = new Panel();
|
|
||||||
appbtn.BackColor = Color.Black;
|
|
||||||
appbtn.Size = new Size(32, 32);
|
|
||||||
appbtn.Visible = true;
|
|
||||||
appbtn.Name = "ashow";
|
|
||||||
appbtn.Click += new EventHandler(this.SidebarButton_Click);
|
|
||||||
|
|
||||||
pnlsidebar.Controls.Add(appbtn);
|
|
||||||
foreach(ApplauncherItem itm in API.AppLauncherItems)
|
|
||||||
{
|
|
||||||
if(itm.Display == true)
|
|
||||||
{
|
|
||||||
Panel btn = new Panel();
|
|
||||||
btn.BackColor = Color.Gray;
|
|
||||||
btn.BackgroundImage = itm.Icon;
|
|
||||||
btn.BackgroundImageLayout = ImageLayout.Stretch;
|
|
||||||
btn.Size = new Size(32, 32);
|
|
||||||
btn.Name = $"al_{new Random().Next(1000, 9999)}";
|
|
||||||
btn.Tag = itm;
|
|
||||||
btn.MouseMove += new MouseEventHandler(this.SidebarButton_Hover);
|
|
||||||
btn.MouseLeave += new EventHandler(this.SidebarButton_Leave);
|
|
||||||
btn.Click += new EventHandler(this.SidebarButton_Click);
|
|
||||||
pnlsidebar.Controls.Add(btn);
|
|
||||||
btn.Show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach(PanelButton pbtn in API.PanelButtons)
|
|
||||||
{
|
|
||||||
Panel btn = new Panel();
|
|
||||||
btn.Tag = pbtn;
|
|
||||||
btn.Name = $"pnl_{new Random().Next(1000, 9999)}";
|
|
||||||
btn.BackgroundImage = pbtn.Icon;
|
|
||||||
btn.BackgroundImageLayout = ImageLayout.Stretch;
|
|
||||||
btn.BackColor = Color.Black;
|
|
||||||
btn.Size = new Size(32, 32);
|
|
||||||
btn.MouseMove += new MouseEventHandler(this.SidebarButton_Hover);
|
|
||||||
btn.MouseLeave += new EventHandler(this.SidebarButton_Leave);
|
|
||||||
btn.Click += new EventHandler(this.SidebarButton_Click);
|
|
||||||
pnlsidebar.Controls.Add(btn);
|
|
||||||
btn.Show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SidebarButton_Hover(object sender, MouseEventArgs e)
|
|
||||||
{
|
|
||||||
Panel s = (Panel)sender;
|
|
||||||
int labelLoc = pnlcontext.Height + (s.Bottom - (s.Height / 2));
|
|
||||||
lblapplabel.Location = new Point(pnlsidebar.Width + 5, labelLoc);
|
|
||||||
if(s.Name.Contains("al"))
|
|
||||||
{
|
|
||||||
var itm = (ApplauncherItem)s.Tag;
|
|
||||||
lblapplabel.Text = itm.Name;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var itm = (PanelButton)s.Tag;
|
|
||||||
lblapplabel.Text = itm.Name;
|
|
||||||
}
|
|
||||||
lblapplabel.Visible = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SidebarButton_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
var s = (Panel)sender;
|
|
||||||
if (s.Name.Contains("al"))
|
|
||||||
{
|
|
||||||
var itm = (ApplauncherItem)s.Tag;
|
|
||||||
var li = new LuaInterpreter();
|
|
||||||
li.mod(itm.Lua);
|
|
||||||
li = null;
|
|
||||||
}
|
|
||||||
else if(s.Name.Contains("ashow"))
|
|
||||||
{
|
|
||||||
pnlapplauncher.Show();
|
|
||||||
foreach(Control ctrl in this.Controls)
|
|
||||||
{
|
|
||||||
ctrl.MouseDown += (object se, MouseEventArgs a) =>
|
|
||||||
{
|
|
||||||
pnlapplauncher.Hide();
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
PanelButton pbtn = (PanelButton)s.Tag;
|
|
||||||
API.ToggleMinimized(pbtn.FormToManage);
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SidebarButton_Leave(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
lblapplabel.Hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void AlternateDesktop_Load(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
this.ShowInTaskbar = false;
|
|
||||||
this.FormBorderStyle = FormBorderStyle.None;
|
|
||||||
this.WindowState = FormWindowState.Maximized;
|
|
||||||
GetApps();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void apptick_Tick(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
//GetApps();
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool unity = false;
|
|
||||||
|
|
||||||
public void ToggleUnityMode()
|
|
||||||
{
|
|
||||||
if (unity == false)
|
|
||||||
{
|
|
||||||
unity = true;
|
|
||||||
this.BackColor = Skinning.Utilities.globaltransparencycolour;
|
|
||||||
this.BackgroundImage = null;
|
|
||||||
this.TransparencyKey = Skinning.Utilities.globaltransparencycolour;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
unity = false;
|
|
||||||
this.BackColor = API.CurrentSkin.desktopbackgroundcolour;
|
|
||||||
this.BackgroundImage = API.CurrentSkinImages.desktopbackground;
|
|
||||||
this.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.desktopbackgroundlayout;
|
|
||||||
this.TransparencyKey = Skinning.Utilities.globaltransparencycolour;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,126 +0,0 @@
|
||||||
<?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="ClockTick.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
|
||||||
<value>17, 17</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="apptick.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
|
||||||
<value>120, 17</value>
|
|
||||||
</metadata>
|
|
||||||
</root>
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue