diff options
Diffstat (limited to 'Project Ports')
| -rw-r--r-- | Project Ports/Desktop.Designer.cs | 31 | ||||
| -rw-r--r-- | Project Ports/Desktop.cs | 14 | ||||
| -rw-r--r-- | Project Ports/Desktop.resx | 3 | ||||
| -rw-r--r-- | Project Ports/MainMenu.Designer.cs | 2 | ||||
| -rw-r--r-- | Project Ports/Terminal.Designer.cs | 29 |
5 files changed, 46 insertions, 33 deletions
diff --git a/Project Ports/Desktop.Designer.cs b/Project Ports/Desktop.Designer.cs index 534cc50..00e9e16 100644 --- a/Project Ports/Desktop.Designer.cs +++ b/Project Ports/Desktop.Designer.cs @@ -28,15 +28,17 @@ /// </summary> private void InitializeComponent() { + this.components = new System.ComponentModel.Container(); this.appMenu = new System.Windows.Forms.MenuStrip(); this.menuToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.programsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.noProgramsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.terminalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.settingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.shutdownToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ltime = new System.Windows.Forms.Label(); - this.terminalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.dclock = new System.Windows.Forms.Timer(this.components); this.appMenu.SuspendLayout(); this.SuspendLayout(); // @@ -70,30 +72,37 @@ this.noProgramsToolStripMenuItem, this.terminalToolStripMenuItem}); this.programsToolStripMenuItem.Name = "programsToolStripMenuItem"; - this.programsToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.programsToolStripMenuItem.Size = new System.Drawing.Size(131, 22); this.programsToolStripMenuItem.Text = "Programs"; // // noProgramsToolStripMenuItem // this.noProgramsToolStripMenuItem.Name = "noProgramsToolStripMenuItem"; - this.noProgramsToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.noProgramsToolStripMenuItem.Size = new System.Drawing.Size(156, 22); this.noProgramsToolStripMenuItem.Text = "No programs :("; // + // terminalToolStripMenuItem + // + this.terminalToolStripMenuItem.Name = "terminalToolStripMenuItem"; + this.terminalToolStripMenuItem.Size = new System.Drawing.Size(156, 22); + this.terminalToolStripMenuItem.Text = "Terminal"; + this.terminalToolStripMenuItem.Click += new System.EventHandler(this.terminalToolStripMenuItem_Click); + // // settingsToolStripMenuItem // this.settingsToolStripMenuItem.Name = "settingsToolStripMenuItem"; - this.settingsToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.settingsToolStripMenuItem.Size = new System.Drawing.Size(131, 22); this.settingsToolStripMenuItem.Text = "Settings"; // // toolStripSeparator1 // this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(177, 6); + this.toolStripSeparator1.Size = new System.Drawing.Size(128, 6); // // shutdownToolStripMenuItem // this.shutdownToolStripMenuItem.Name = "shutdownToolStripMenuItem"; - this.shutdownToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.shutdownToolStripMenuItem.Size = new System.Drawing.Size(131, 22); this.shutdownToolStripMenuItem.Text = "Shutdown"; this.shutdownToolStripMenuItem.Click += new System.EventHandler(this.shutdownToolStripMenuItem_Click); // @@ -103,19 +112,16 @@ this.ltime.AutoSize = true; this.ltime.BackColor = System.Drawing.Color.Silver; this.ltime.ForeColor = System.Drawing.Color.Black; - this.ltime.Location = new System.Drawing.Point(753, 7); + this.ltime.Location = new System.Drawing.Point(738, 6); this.ltime.Name = "ltime"; this.ltime.Size = new System.Drawing.Size(26, 13); this.ltime.TabIndex = 1; this.ltime.Text = "time"; this.ltime.Click += new System.EventHandler(this.label1_Click); // - // terminalToolStripMenuItem + // dclock // - this.terminalToolStripMenuItem.Name = "terminalToolStripMenuItem"; - this.terminalToolStripMenuItem.Size = new System.Drawing.Size(180, 22); - this.terminalToolStripMenuItem.Text = "Terminal"; - this.terminalToolStripMenuItem.Click += new System.EventHandler(this.terminalToolStripMenuItem_Click); + this.dclock.Tick += new System.EventHandler(this.dclock_Tick); // // Desktop // @@ -150,5 +156,6 @@ private System.Windows.Forms.ToolStripMenuItem shutdownToolStripMenuItem; private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; private System.Windows.Forms.ToolStripMenuItem terminalToolStripMenuItem; + private System.Windows.Forms.Timer dclock; } }
\ No newline at end of file diff --git a/Project Ports/Desktop.cs b/Project Ports/Desktop.cs index b5ab3e5..a02a0e8 100644 --- a/Project Ports/Desktop.cs +++ b/Project Ports/Desktop.cs @@ -36,19 +36,19 @@ namespace Project_Ports InitializeComponent(); } - private void Desktop_Load(object sender, EventArgs e) + private void dclock_Tick(object sender, EventArgs e) { - MessageBox.Show("Welcome to the Project Ports Desktop!"); + + this.ltime.Text = DateTime.Now.ToString("hh:mm tt"); } - public static string GetTime() + private void Desktop_Load(object sender, EventArgs e) { - var time = DateTime.Now; - - return time.TimeOfDay.TotalHours > 12 ? $"{time.Hour - 12} PM" : $"{time.Hour} AM"; - + MessageBox.Show("Welcome to the Project Ports Desktop!"); + dclock.Start(); } + private void label1_Click(object sender, EventArgs e) { diff --git a/Project Ports/Desktop.resx b/Project Ports/Desktop.resx index c5fd09f..9bf389e 100644 --- a/Project Ports/Desktop.resx +++ b/Project Ports/Desktop.resx @@ -120,4 +120,7 @@ <metadata name="appMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> + <metadata name="dclock.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>121, 17</value> + </metadata> </root>
\ No newline at end of file diff --git a/Project Ports/MainMenu.Designer.cs b/Project Ports/MainMenu.Designer.cs index 0c3bc93..455b8fa 100644 --- a/Project Ports/MainMenu.Designer.cs +++ b/Project Ports/MainMenu.Designer.cs @@ -153,7 +153,7 @@ this.Controls.Add(this.btnPlay); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "MainMenu"; - this.Text = "Form1"; + this.Text = "MainMenu"; this.WindowState = System.Windows.Forms.FormWindowState.Maximized; this.Load += new System.EventHandler(this.MainMenu_Load); this.ResumeLayout(false); diff --git a/Project Ports/Terminal.Designer.cs b/Project Ports/Terminal.Designer.cs index 74b0eac..2d96296 100644 --- a/Project Ports/Terminal.Designer.cs +++ b/Project Ports/Terminal.Designer.cs @@ -28,27 +28,30 @@ /// </summary> private void InitializeComponent() { - this.textBox1 = new System.Windows.Forms.TextBox(); + this.txtTerminal = new System.Windows.Forms.TextBox(); this.SuspendLayout(); // - // textBox1 + // txtTerminal // - this.textBox1.BackColor = System.Drawing.Color.Black; - this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.textBox1.Font = new System.Drawing.Font("Lucida Console", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.textBox1.ForeColor = System.Drawing.Color.White; - this.textBox1.Location = new System.Drawing.Point(1, 0); - this.textBox1.Multiline = true; - this.textBox1.Name = "textBox1"; - this.textBox1.Size = new System.Drawing.Size(555, 320); - this.textBox1.TabIndex = 0; + this.txtTerminal.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtTerminal.BackColor = System.Drawing.Color.Black; + this.txtTerminal.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.txtTerminal.Font = new System.Drawing.Font("Lucida Console", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtTerminal.ForeColor = System.Drawing.Color.White; + this.txtTerminal.Location = new System.Drawing.Point(1, 0); + this.txtTerminal.Multiline = true; + this.txtTerminal.Name = "txtTerminal"; + this.txtTerminal.Size = new System.Drawing.Size(555, 320); + this.txtTerminal.TabIndex = 0; // // Terminal // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(558, 321); - this.Controls.Add(this.textBox1); + this.Controls.Add(this.txtTerminal); this.Name = "Terminal"; this.Text = "Terminal"; this.ResumeLayout(false); @@ -58,6 +61,6 @@ #endregion - private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.TextBox txtTerminal; } }
\ No newline at end of file |
