From 9fe87b10de6644d17aa4548a80b0c418c1b29d67 Mon Sep 17 00:00:00 2001 From: FloppyDiskDrive Date: Sat, 18 Nov 2017 18:06:30 -0600 Subject: [PATCH] minor changes to the desktop --- ShiftOS.Main/ShiftOS/Desktop.Designer.cs | 38 +++++++++++++++++- ShiftOS.Main/ShiftOS/Desktop.cs | 50 ++++++++++++------------ ShiftOS.Main/ShiftOS/Desktop.resx | 3 ++ 3 files changed, 65 insertions(+), 26 deletions(-) diff --git a/ShiftOS.Main/ShiftOS/Desktop.Designer.cs b/ShiftOS.Main/ShiftOS/Desktop.Designer.cs index a67564b..9b7bbe3 100644 --- a/ShiftOS.Main/ShiftOS/Desktop.Designer.cs +++ b/ShiftOS.Main/ShiftOS/Desktop.Designer.cs @@ -36,6 +36,9 @@ this.menuStrip1 = new System.Windows.Forms.MenuStrip(); this.applicationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.shifterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.terminalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.textPadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.fileSkimmerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.timer1 = new System.Windows.Forms.Timer(this.components); this.taskbar.SuspendLayout(); this.clockPanel.SuspendLayout(); @@ -99,7 +102,10 @@ // applicationsToolStripMenuItem // this.applicationsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.shifterToolStripMenuItem}); + this.shifterToolStripMenuItem, + this.terminalToolStripMenuItem, + this.textPadToolStripMenuItem, + this.fileSkimmerToolStripMenuItem}); this.applicationsToolStripMenuItem.Name = "applicationsToolStripMenuItem"; this.applicationsToolStripMenuItem.Size = new System.Drawing.Size(85, 20); this.applicationsToolStripMenuItem.Text = "Applications"; @@ -107,10 +113,35 @@ // shifterToolStripMenuItem // this.shifterToolStripMenuItem.Name = "shifterToolStripMenuItem"; - this.shifterToolStripMenuItem.Size = new System.Drawing.Size(108, 22); + this.shifterToolStripMenuItem.Size = new System.Drawing.Size(142, 22); this.shifterToolStripMenuItem.Text = "Shifter"; this.shifterToolStripMenuItem.Click += new System.EventHandler(this.shifterToolStripMenuItem_Click); // + // terminalToolStripMenuItem + // + this.terminalToolStripMenuItem.Name = "terminalToolStripMenuItem"; + this.terminalToolStripMenuItem.Size = new System.Drawing.Size(142, 22); + this.terminalToolStripMenuItem.Text = "Terminal"; + this.terminalToolStripMenuItem.Click += new System.EventHandler(this.terminalToolStripMenuItem_Click); + // + // textPadToolStripMenuItem + // + this.textPadToolStripMenuItem.Name = "textPadToolStripMenuItem"; + this.textPadToolStripMenuItem.Size = new System.Drawing.Size(142, 22); + this.textPadToolStripMenuItem.Text = "TextPad"; + this.textPadToolStripMenuItem.Click += new System.EventHandler(this.textPadToolStripMenuItem_Click); + // + // fileSkimmerToolStripMenuItem + // + this.fileSkimmerToolStripMenuItem.Name = "fileSkimmerToolStripMenuItem"; + this.fileSkimmerToolStripMenuItem.Size = new System.Drawing.Size(142, 22); + this.fileSkimmerToolStripMenuItem.Text = "File Skimmer"; + this.fileSkimmerToolStripMenuItem.Click += new System.EventHandler(this.fileSkimmerToolStripMenuItem_Click); + // + // timer1 + // + this.timer1.Tick += new System.EventHandler(this.timer1_Tick); + // // Desktop // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -143,5 +174,8 @@ private System.Windows.Forms.MenuStrip menuStrip1; private System.Windows.Forms.ToolStripMenuItem applicationsToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem shifterToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem terminalToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem textPadToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem fileSkimmerToolStripMenuItem; } } \ No newline at end of file diff --git a/ShiftOS.Main/ShiftOS/Desktop.cs b/ShiftOS.Main/ShiftOS/Desktop.cs index 227223a..f8bf7a0 100644 --- a/ShiftOS.Main/ShiftOS/Desktop.cs +++ b/ShiftOS.Main/ShiftOS/Desktop.cs @@ -14,33 +14,11 @@ namespace ShiftOS.Main.ShiftOS public Desktop() { InitializeComponent(); - + timer1.Start(); Closed += (sender, args) => { Application.Exit(); }; } - - void timer1_Tick(object sender, EventArgs e) => - lblClock.Text = $"{DateTime.Now:t}"; - - private void terminalToolStripMenuItem_Click(object sender, EventArgs e) - { - Apps.Terminal trm = new Apps.Terminal(); - - ShiftWM.Init(trm, "Terminal", null, false, true); - } - - void textPadToolStripMenuItem_Click(object sender, EventArgs e) - { - var tp = new TextPad(); - ShiftWM.Init(tp, "TextPad", Resources.iconTextPad); - } - - void fileSkimmerToolStripMenuItem_Click(object sender, EventArgs e) - { - var fs = new FileSkimmer(); - ShiftWM.Init(fs, "File Skimmer", Resources.iconFileSkimmer); - } - + private void shifterToolStripMenuItem_Click(object sender, EventArgs e) { Apps.ShifterStuff.Shifter app = new Apps.ShifterStuff.Shifter(); @@ -51,5 +29,29 @@ namespace ShiftOS.Main.ShiftOS { this.WindowState = FormWindowState.Maximized; } + + private void terminalToolStripMenuItem_Click(object sender, EventArgs e) + { + var t = new Apps.Terminal(); + ShiftWM.Init(t, "Terminal", Resources.iconTerminal, false); + + } + + private void textPadToolStripMenuItem_Click(object sender, EventArgs e) + { + var t = new TextPad(); + ShiftWM.Init(t, "Untitled - TextPad", Resources.iconTextPad); + } + + private void fileSkimmerToolStripMenuItem_Click(object sender, EventArgs e) + { + var fs = new FileSkimmer(); + ShiftWM.Init(fs, "File Skimmer", Resources.iconFileSkimmer); + } + + private void timer1_Tick(object sender, EventArgs e) + { + lblClock.Text = DateTime.Now.ToString("hh:mm:ss"); + } } } diff --git a/ShiftOS.Main/ShiftOS/Desktop.resx b/ShiftOS.Main/ShiftOS/Desktop.resx index f706e8f..ce4e653 100644 --- a/ShiftOS.Main/ShiftOS/Desktop.resx +++ b/ShiftOS.Main/ShiftOS/Desktop.resx @@ -120,6 +120,9 @@ 219, 17 + + 219, 17 + 132, 17