aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Main/ShiftOS/Desktop.cs
diff options
context:
space:
mode:
authorAShifter <[email protected]>2017-11-18 13:37:20 -0700
committerAShifter <[email protected]>2017-11-18 13:37:20 -0700
commit11bb4cea77352c3a5f2e7268a31e5f7ae8774471 (patch)
tree6f8031da19a2cc28bdc3589de89237b9a75b9c70 /ShiftOS.Main/ShiftOS/Desktop.cs
parent14036dbe5d44caa1a5d612f3b5e8a269a8c899ad (diff)
downloadshiftos-rewind-11bb4cea77352c3a5f2e7268a31e5f7ae8774471.tar.gz
shiftos-rewind-11bb4cea77352c3a5f2e7268a31e5f7ae8774471.tar.bz2
shiftos-rewind-11bb4cea77352c3a5f2e7268a31e5f7ae8774471.zip
desktop
someone needs to fix it but it's a thing now
Diffstat (limited to 'ShiftOS.Main/ShiftOS/Desktop.cs')
-rw-r--r--ShiftOS.Main/ShiftOS/Desktop.cs41
1 files changed, 7 insertions, 34 deletions
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;
+ }
}
}