diff options
| author | AShifter <[email protected]> | 2017-11-18 13:37:46 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-11-18 13:37:46 -0700 |
| commit | 3f9ad02ca126018a2ff69e7fcd48a4cebbb501e0 (patch) | |
| tree | 6f8031da19a2cc28bdc3589de89237b9a75b9c70 /ShiftOS.Main/ShiftOS/Desktop.cs | |
| parent | b61561692cc0e211f65495f67e2968aa04e81c8a (diff) | |
| parent | 11bb4cea77352c3a5f2e7268a31e5f7ae8774471 (diff) | |
| download | shiftos-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/ShiftOS/Desktop.cs')
| -rw-r--r-- | ShiftOS.Main/ShiftOS/Desktop.cs | 41 |
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; + } } } |
