diff options
Diffstat (limited to 'ShiftOS.WinForms/Applications')
3 files changed, 397 insertions, 0 deletions
diff --git a/ShiftOS.WinForms/Applications/ExperienceShifter.Designer.cs b/ShiftOS.WinForms/Applications/ExperienceShifter.Designer.cs new file mode 100644 index 0000000..9a0d54c --- /dev/null +++ b/ShiftOS.WinForms/Applications/ExperienceShifter.Designer.cs @@ -0,0 +1,190 @@ +namespace ShiftOS.WinForms.Applications +{ + partial class ExperienceShifter + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.desktopToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.appLauncherToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.pnldesktop = new System.Windows.Forms.Panel(); + this.gpdesktopsettings = new System.Windows.Forms.GroupBox(); + this.label2 = new System.Windows.Forms.Label(); + this.pnlapplauncher = new System.Windows.Forms.Panel(); + this.label1 = new System.Windows.Forms.Label(); + this.lbdesktops = new System.Windows.Forms.ListBox(); + this.gpalsettings = new System.Windows.Forms.GroupBox(); + this.lblaunchers = new System.Windows.Forms.ListBox(); + this.menuStrip1.SuspendLayout(); + this.pnldesktop.SuspendLayout(); + this.pnlapplauncher.SuspendLayout(); + this.SuspendLayout(); + // + // menuStrip1 + // + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.desktopToolStripMenuItem, + this.appLauncherToolStripMenuItem}); + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Size = new System.Drawing.Size(582, 24); + this.menuStrip1.TabIndex = 0; + this.menuStrip1.Text = "menuStrip1"; + // + // desktopToolStripMenuItem + // + this.desktopToolStripMenuItem.Name = "desktopToolStripMenuItem"; + this.desktopToolStripMenuItem.Size = new System.Drawing.Size(62, 20); + this.desktopToolStripMenuItem.Text = "Desktop"; + this.desktopToolStripMenuItem.Click += new System.EventHandler(this.desktopToolStripMenuItem_Click); + // + // appLauncherToolStripMenuItem + // + this.appLauncherToolStripMenuItem.Name = "appLauncherToolStripMenuItem"; + this.appLauncherToolStripMenuItem.Size = new System.Drawing.Size(93, 20); + this.appLauncherToolStripMenuItem.Text = "App Launcher"; + this.appLauncherToolStripMenuItem.Click += new System.EventHandler(this.appLauncherToolStripMenuItem_Click); + // + // pnldesktop + // + this.pnldesktop.Controls.Add(this.lbdesktops); + this.pnldesktop.Controls.Add(this.gpdesktopsettings); + this.pnldesktop.Controls.Add(this.label2); + this.pnldesktop.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnldesktop.Location = new System.Drawing.Point(0, 24); + this.pnldesktop.Name = "pnldesktop"; + this.pnldesktop.Size = new System.Drawing.Size(582, 407); + this.pnldesktop.TabIndex = 1; + // + // gpdesktopsettings + // + this.gpdesktopsettings.Dock = System.Windows.Forms.DockStyle.Bottom; + this.gpdesktopsettings.Location = new System.Drawing.Point(0, 262); + this.gpdesktopsettings.Name = "gpdesktopsettings"; + this.gpdesktopsettings.Size = new System.Drawing.Size(582, 145); + this.gpdesktopsettings.TabIndex = 2; + this.gpdesktopsettings.TabStop = false; + this.gpdesktopsettings.Text = "Settings for this environment"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Dock = System.Windows.Forms.DockStyle.Top; + this.label2.Location = new System.Drawing.Point(0, 0); + this.label2.Name = "label2"; + this.label2.Padding = new System.Windows.Forms.Padding(5); + this.label2.Size = new System.Drawing.Size(57, 23); + this.label2.TabIndex = 1; + this.label2.Tag = "header2"; + this.label2.Text = "Desktop"; + // + // pnlapplauncher + // + this.pnlapplauncher.Controls.Add(this.lblaunchers); + this.pnlapplauncher.Controls.Add(this.gpalsettings); + this.pnlapplauncher.Controls.Add(this.label1); + this.pnlapplauncher.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlapplauncher.Location = new System.Drawing.Point(0, 24); + this.pnlapplauncher.Name = "pnlapplauncher"; + this.pnlapplauncher.Size = new System.Drawing.Size(582, 407); + this.pnlapplauncher.TabIndex = 0; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Dock = System.Windows.Forms.DockStyle.Top; + this.label1.Location = new System.Drawing.Point(0, 0); + this.label1.Name = "label1"; + this.label1.Padding = new System.Windows.Forms.Padding(5); + this.label1.Size = new System.Drawing.Size(84, 23); + this.label1.TabIndex = 0; + this.label1.Tag = "header2"; + this.label1.Text = "App Launcher"; + // + // lbdesktops + // + this.lbdesktops.Dock = System.Windows.Forms.DockStyle.Fill; + this.lbdesktops.FormattingEnabled = true; + this.lbdesktops.Location = new System.Drawing.Point(0, 23); + this.lbdesktops.Name = "lbdesktops"; + this.lbdesktops.Size = new System.Drawing.Size(582, 239); + this.lbdesktops.TabIndex = 0; + // + // gpalsettings + // + this.gpalsettings.Dock = System.Windows.Forms.DockStyle.Bottom; + this.gpalsettings.Location = new System.Drawing.Point(0, 262); + this.gpalsettings.Name = "gpalsettings"; + this.gpalsettings.Size = new System.Drawing.Size(582, 145); + this.gpalsettings.TabIndex = 3; + this.gpalsettings.TabStop = false; + this.gpalsettings.Text = "Settings for this environment"; + // + // lblaunchers + // + this.lblaunchers.Dock = System.Windows.Forms.DockStyle.Fill; + this.lblaunchers.FormattingEnabled = true; + this.lblaunchers.Location = new System.Drawing.Point(0, 23); + this.lblaunchers.Name = "lblaunchers"; + this.lblaunchers.Size = new System.Drawing.Size(582, 239); + this.lblaunchers.TabIndex = 4; + // + // ExperienceShifter + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.pnlapplauncher); + this.Controls.Add(this.pnldesktop); + this.Controls.Add(this.menuStrip1); + this.Name = "ExperienceShifter"; + this.Size = new System.Drawing.Size(582, 431); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); + this.pnldesktop.ResumeLayout(false); + this.pnldesktop.PerformLayout(); + this.pnlapplauncher.ResumeLayout(false); + this.pnlapplauncher.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.MenuStrip menuStrip1; + private System.Windows.Forms.ToolStripMenuItem desktopToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem appLauncherToolStripMenuItem; + private System.Windows.Forms.Panel pnldesktop; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Panel pnlapplauncher; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.GroupBox gpdesktopsettings; + private System.Windows.Forms.ListBox lbdesktops; + private System.Windows.Forms.ListBox lblaunchers; + private System.Windows.Forms.GroupBox gpalsettings; + } +} diff --git a/ShiftOS.WinForms/Applications/ExperienceShifter.cs b/ShiftOS.WinForms/Applications/ExperienceShifter.cs new file mode 100644 index 0000000..82706e8 --- /dev/null +++ b/ShiftOS.WinForms/Applications/ExperienceShifter.cs @@ -0,0 +1,84 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +using ShiftOS.Engine; + +namespace ShiftOS.WinForms.Applications +{ + [Launcher("Experience Shifter", false, "", "Customization")] + [DefaultTitle("Experience Shifter")] + [DefaultIcon("iconShifter")] + public partial class ExperienceShifter : UserControl, IShiftOSWindow + { + public ExperienceShifter() + { + InitializeComponent(); + } + + private string currentUI = "desktop"; + + public void SetupUI() + { + switch (currentUI) + { + case "desktop": + pnldesktop.BringToFront(); + PopulateDesktops(); + break; + case "applauncher": + pnlapplauncher.BringToFront(); + PopulateLaunchers(); + break; + } + } + + public void PopulateDesktops() + { + lbdesktops.Items.Clear(); + lbdesktops.Items.Add("ShiftOS Desktop"); + } + + public void PopulateLaunchers() + { + lblaunchers.Items.Clear(); + lbdesktops.Items.Add("ShiftOS App Launcher"); + } + + public void OnLoad() + { + SetupUI(); + } + + public void OnSkinLoad() + { + } + + public bool OnUnload() + { + return true; + } + + public void OnUpgrade() + { + } + + private void desktopToolStripMenuItem_Click(object sender, EventArgs e) + { + currentUI = "desktop"; + SetupUI(); + } + + private void appLauncherToolStripMenuItem_Click(object sender, EventArgs e) + { + currentUI = "applauncher"; + SetupUI(); + } + } +} diff --git a/ShiftOS.WinForms/Applications/ExperienceShifter.resx b/ShiftOS.WinForms/Applications/ExperienceShifter.resx new file mode 100644 index 0000000..d5494e3 --- /dev/null +++ b/ShiftOS.WinForms/Applications/ExperienceShifter.resx @@ -0,0 +1,123 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> +</root>
\ No newline at end of file |
