From 3dd402277bba874f24fab11865d257133c6f782c Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 31 May 2017 08:40:29 -0400 Subject: [PATCH] Fix sizing issue with notifications, and UP key in terminal --- ShiftOS.WinForms/Applications/Terminal.cs | 1 + ShiftOS.WinForms/WinformsDesktop.cs | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/ShiftOS.WinForms/Applications/Terminal.cs b/ShiftOS.WinForms/Applications/Terminal.cs index 080e8bb..a4b77ae 100644 --- a/ShiftOS.WinForms/Applications/Terminal.cs +++ b/ShiftOS.WinForms/Applications/Terminal.cs @@ -338,6 +338,7 @@ namespace ShiftOS.WinForms.Applications var tostring3 = txt.Lines[txt.Lines.Length - 1]; if (tostring3 == $"{SaveSystem.CurrentUser.Username}@{SaveSystem.CurrentSave.SystemName}:~$ ") Console.Write(TerminalBackend.LastCommand); + ConsoleEx.OnFlush?.Invoke(); a.SuppressKeyPress = true; } diff --git a/ShiftOS.WinForms/WinformsDesktop.cs b/ShiftOS.WinForms/WinformsDesktop.cs index 76c5050..643c02a 100644 --- a/ShiftOS.WinForms/WinformsDesktop.cs +++ b/ShiftOS.WinForms/WinformsDesktop.cs @@ -74,6 +74,10 @@ namespace ShiftOS.WinForms { lbnotemsg.Text = msg; lbnotetitle.Text = title; + int height = pnlnotificationbox.Height; + pnlnotificationbox.AutoSize = false; + pnlnotificationbox.Height = height; + pnlnotificationbox.Width = lbnotetitle.Width; var ctl = flnotifications.Controls.ToList().FirstOrDefault(x => x.Tag.ToString() == app); if (ctl == null) @@ -97,8 +101,11 @@ namespace ShiftOS.WinForms notekiller.Tick += (o, a) => { pnlnotificationbox.Hide(); + pnlnotificationbox.AutoSize = true; }; Engine.AudioManager.PlayStream(Properties.Resources.infobox); + + pnlnotificationbox.Show(); pnlnotificationbox.BringToFront(); notekiller.Start();