aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Main
diff options
context:
space:
mode:
authorAShifter <[email protected]>2017-11-18 13:37:46 -0700
committerGitHub <[email protected]>2017-11-18 13:37:46 -0700
commit3f9ad02ca126018a2ff69e7fcd48a4cebbb501e0 (patch)
tree6f8031da19a2cc28bdc3589de89237b9a75b9c70 /ShiftOS.Main
parentb61561692cc0e211f65495f67e2968aa04e81c8a (diff)
parent11bb4cea77352c3a5f2e7268a31e5f7ae8774471 (diff)
downloadshiftos-rewind-3f9ad02ca126018a2ff69e7fcd48a4cebbb501e0.tar.gz
shiftos-rewind-3f9ad02ca126018a2ff69e7fcd48a4cebbb501e0.tar.bz2
shiftos-rewind-3f9ad02ca126018a2ff69e7fcd48a4cebbb501e0.zip
Merge pull request #17 from AShifter/master
Master
Diffstat (limited to 'ShiftOS.Main')
-rw-r--r--ShiftOS.Main/ShiftOS/Desktop.Designer.cs177
-rw-r--r--ShiftOS.Main/ShiftOS/Desktop.cs41
-rw-r--r--ShiftOS.Main/ShiftOS/Desktop.resx6
3 files changed, 95 insertions, 129 deletions
diff --git a/ShiftOS.Main/ShiftOS/Desktop.Designer.cs b/ShiftOS.Main/ShiftOS/Desktop.Designer.cs
index 49f7c78..a67564b 100644
--- a/ShiftOS.Main/ShiftOS/Desktop.Designer.cs
+++ b/ShiftOS.Main/ShiftOS/Desktop.Designer.cs
@@ -29,96 +29,85 @@
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
- this.listView1 = new System.Windows.Forms.ListView();
- this.taskbar = new System.Windows.Forms.ToolStrip();
- this.toolStripDropDownButton1 = new System.Windows.Forms.ToolStripDropDownButton();
- this.terminalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.textPadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.fileSkimmerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.taskbarClock = new System.Windows.Forms.ToolStripLabel();
- this.timer1 = new System.Windows.Forms.Timer(this.components);
+ this.taskbar = new System.Windows.Forms.Panel();
+ this.clockPanel = new System.Windows.Forms.Panel();
+ this.lblClock = new System.Windows.Forms.Label();
+ this.panel2 = new System.Windows.Forms.Panel();
+ this.menuStrip1 = new System.Windows.Forms.MenuStrip();
+ this.applicationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.shifterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.timer1 = new System.Windows.Forms.Timer(this.components);
this.taskbar.SuspendLayout();
+ this.clockPanel.SuspendLayout();
+ this.panel2.SuspendLayout();
+ this.menuStrip1.SuspendLayout();
this.SuspendLayout();
//
- // listView1
- //
- this.listView1.BorderStyle = System.Windows.Forms.BorderStyle.None;
- this.listView1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.listView1.Location = new System.Drawing.Point(0, 0);
- this.listView1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
- this.listView1.Name = "listView1";
- this.listView1.Size = new System.Drawing.Size(1277, 684);
- this.listView1.TabIndex = 0;
- this.listView1.UseCompatibleStateImageBehavior = false;
- //
// taskbar
//
- this.taskbar.Dock = System.Windows.Forms.DockStyle.Bottom;
- this.taskbar.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
- this.taskbar.ImageScalingSize = new System.Drawing.Size(24, 24);
- this.taskbar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.toolStripDropDownButton1,
- this.taskbarClock});
- this.taskbar.Location = new System.Drawing.Point(0, 653);
+ this.taskbar.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
+ this.taskbar.Controls.Add(this.clockPanel);
+ this.taskbar.Controls.Add(this.panel2);
+ this.taskbar.Dock = System.Windows.Forms.DockStyle.Top;
+ this.taskbar.Location = new System.Drawing.Point(0, 0);
this.taskbar.Name = "taskbar";
- this.taskbar.Size = new System.Drawing.Size(1277, 31);
- this.taskbar.TabIndex = 1;
- this.taskbar.Text = "toolStrip1";
- //
- // toolStripDropDownButton1
- //
- this.toolStripDropDownButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.terminalToolStripMenuItem,
- this.textPadToolStripMenuItem,
- this.fileSkimmerToolStripMenuItem,
+ this.taskbar.Size = new System.Drawing.Size(640, 24);
+ this.taskbar.TabIndex = 0;
+ //
+ // clockPanel
+ //
+ this.clockPanel.Controls.Add(this.lblClock);
+ this.clockPanel.Dock = System.Windows.Forms.DockStyle.Right;
+ this.clockPanel.Location = new System.Drawing.Point(574, 0);
+ this.clockPanel.Name = "clockPanel";
+ this.clockPanel.Size = new System.Drawing.Size(66, 24);
+ this.clockPanel.TabIndex = 1;
+ //
+ // lblClock
+ //
+ this.lblClock.BackColor = System.Drawing.Color.Transparent;
+ this.lblClock.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.lblClock.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lblClock.ForeColor = System.Drawing.Color.White;
+ this.lblClock.Location = new System.Drawing.Point(0, 0);
+ this.lblClock.Name = "lblClock";
+ this.lblClock.Size = new System.Drawing.Size(66, 24);
+ this.lblClock.TabIndex = 1;
+ this.lblClock.Text = "00:00:00";
+ this.lblClock.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
+ // panel2
+ //
+ this.panel2.Controls.Add(this.menuStrip1);
+ this.panel2.Dock = System.Windows.Forms.DockStyle.Left;
+ this.panel2.Location = new System.Drawing.Point(0, 0);
+ this.panel2.Name = "panel2";
+ this.panel2.Size = new System.Drawing.Size(102, 24);
+ this.panel2.TabIndex = 0;
+ //
+ // menuStrip1
+ //
+ this.menuStrip1.Dock = System.Windows.Forms.DockStyle.None;
+ this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.applicationsToolStripMenuItem});
+ this.menuStrip1.Location = new System.Drawing.Point(0, 0);
+ this.menuStrip1.Name = "menuStrip1";
+ this.menuStrip1.Size = new System.Drawing.Size(93, 24);
+ this.menuStrip1.TabIndex = 2;
+ this.menuStrip1.Text = "Applications";
+ //
+ // applicationsToolStripMenuItem
+ //
+ this.applicationsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.shifterToolStripMenuItem});
- this.toolStripDropDownButton1.Image = global::ShiftOS.Main.Properties.Resources.iconWebBrowser;
- this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.toolStripDropDownButton1.Name = "toolStripDropDownButton1";
- this.toolStripDropDownButton1.Size = new System.Drawing.Size(95, 28);
- this.toolStripDropDownButton1.Tag = ((uint)(0u));
- this.toolStripDropDownButton1.Text = "Programs";
- //
- // terminalToolStripMenuItem
- //
- this.terminalToolStripMenuItem.Name = "terminalToolStripMenuItem";
- this.terminalToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
- this.terminalToolStripMenuItem.Text = "Terminal";
- this.terminalToolStripMenuItem.Click += new System.EventHandler(this.terminalToolStripMenuItem_Click);
- //
- // textPadToolStripMenuItem
- //
- this.textPadToolStripMenuItem.Name = "textPadToolStripMenuItem";
- this.textPadToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
- this.textPadToolStripMenuItem.Text = "TextPad";
- this.textPadToolStripMenuItem.Click += new System.EventHandler(this.textPadToolStripMenuItem_Click);
- //
- // fileSkimmerToolStripMenuItem
- //
- this.fileSkimmerToolStripMenuItem.Name = "fileSkimmerToolStripMenuItem";
- this.fileSkimmerToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
- this.fileSkimmerToolStripMenuItem.Text = "File Skimmer";
- this.fileSkimmerToolStripMenuItem.Click += new System.EventHandler(this.fileSkimmerToolStripMenuItem_Click);
- //
- // taskbarClock
- //
- this.taskbarClock.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
- this.taskbarClock.Image = global::ShiftOS.Main.Properties.Resources.iconClock;
- this.taskbarClock.Name = "taskbarClock";
- this.taskbarClock.Size = new System.Drawing.Size(52, 28);
- this.taskbarClock.Tag = ((uint)(0u));
- this.taskbarClock.Text = "0:00";
- //
- // timer1
- //
- this.timer1.Interval = 1000;
- this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
+ this.applicationsToolStripMenuItem.Name = "applicationsToolStripMenuItem";
+ this.applicationsToolStripMenuItem.Size = new System.Drawing.Size(85, 20);
+ this.applicationsToolStripMenuItem.Text = "Applications";
//
// shifterToolStripMenuItem
//
this.shifterToolStripMenuItem.Name = "shifterToolStripMenuItem";
- this.shifterToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.shifterToolStripMenuItem.Size = new System.Drawing.Size(108, 22);
this.shifterToolStripMenuItem.Text = "Shifter";
this.shifterToolStripMenuItem.Click += new System.EventHandler(this.shifterToolStripMenuItem_Click);
//
@@ -126,29 +115,33 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(1277, 684);
+ this.BackColor = System.Drawing.Color.Black;
+ this.ClientSize = new System.Drawing.Size(640, 480);
this.Controls.Add(this.taskbar);
- this.Controls.Add(this.listView1);
- this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+ this.Margin = new System.Windows.Forms.Padding(2);
this.Name = "Desktop";
this.Text = "Desktop";
+ this.Load += new System.EventHandler(this.Desktop_Load);
this.taskbar.ResumeLayout(false);
- this.taskbar.PerformLayout();
+ this.clockPanel.ResumeLayout(false);
+ this.panel2.ResumeLayout(false);
+ this.panel2.PerformLayout();
+ this.menuStrip1.ResumeLayout(false);
+ this.menuStrip1.PerformLayout();
this.ResumeLayout(false);
- this.PerformLayout();
}
- #endregion
+ #endregion
- private System.Windows.Forms.ListView listView1;
- private System.Windows.Forms.ToolStrip taskbar;
- private System.Windows.Forms.ToolStripDropDownButton toolStripDropDownButton1;
- private System.Windows.Forms.ToolStripLabel taskbarClock;
- private System.Windows.Forms.Timer timer1;
- private System.Windows.Forms.ToolStripMenuItem terminalToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem textPadToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem fileSkimmerToolStripMenuItem;
+ private System.Windows.Forms.Panel taskbar;
+ private System.Windows.Forms.Panel panel2;
+ private System.Windows.Forms.Panel clockPanel;
+ private System.Windows.Forms.Label lblClock;
+ private System.Windows.Forms.Timer timer1;
+ private System.Windows.Forms.MenuStrip menuStrip1;
+ private System.Windows.Forms.ToolStripMenuItem applicationsToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem shifterToolStripMenuItem;
}
} \ No newline at end of file
diff --git a/ShiftOS.Main/ShiftOS/Desktop.cs b/ShiftOS.Main/ShiftOS/Desktop.cs
index 9ca5270..227223a 100644
--- a/ShiftOS.Main/ShiftOS/Desktop.cs
+++ b/ShiftOS.Main/ShiftOS/Desktop.cs
@@ -5,6 +5,7 @@ using ShiftOS.Engine.Misc;
using ShiftOS.Engine.WindowManager;
using ShiftOS.Main.Properties;
using ShiftOS.Main.ShiftOS.Apps;
+using System.Drawing;
namespace ShiftOS.Main.ShiftOS
{
@@ -14,45 +15,12 @@ namespace ShiftOS.Main.ShiftOS
{
InitializeComponent();
- timer1.Start();
Closed += (sender, args) => { Application.Exit(); };
-
- #region Disgusting taskbar code
-
- ShiftWM.Windows.ItemAdded += (sender, e) =>
- {
- taskbar.Invoke(
- new Action(
- () =>
- {
- taskbar.Items.Add(
- new ToolStripButton
- {
- Text = e.Item.Title.Text,
- Image = e.Item.Icon.ToBitmap(),
- Tag = e.Item.Id
- });
- }));
- };
-
- ShiftWM.Windows.ItemRemoved += (sender, e) =>
- {
- taskbar.Invoke(
- new Action(
- () =>
- {
- var tbRemovalList = taskbar.Items.OfType<ToolStripItem>().Where(i => (uint) i.Tag == e.Item.Id);
-
- tbRemovalList.ToList().ForEach(p => taskbar.Items.Remove(p));
- }));
- };
-
- #endregion
}
void timer1_Tick(object sender, EventArgs e) =>
- taskbarClock.Text = $"{DateTime.Now:t}";
+ lblClock.Text = $"{DateTime.Now:t}";
private void terminalToolStripMenuItem_Click(object sender, EventArgs e)
{
@@ -78,5 +46,10 @@ namespace ShiftOS.Main.ShiftOS
Apps.ShifterStuff.Shifter app = new Apps.ShifterStuff.Shifter();
ShiftWM.Init(app, "Shifter", null);
}
+
+ private void Desktop_Load(object sender, EventArgs e)
+ {
+ this.WindowState = FormWindowState.Maximized;
+ }
}
}
diff --git a/ShiftOS.Main/ShiftOS/Desktop.resx b/ShiftOS.Main/ShiftOS/Desktop.resx
index 1ea96dc..f706e8f 100644
--- a/ShiftOS.Main/ShiftOS/Desktop.resx
+++ b/ShiftOS.Main/ShiftOS/Desktop.resx
@@ -117,10 +117,10 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
- <metadata name="taskbar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>17, 17</value>
+ <metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>219, 17</value>
</metadata>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>159, 17</value>
+ <value>132, 17</value>
</metadata>
</root> \ No newline at end of file