Fix sizing issue with notifications, and UP key in terminal

This commit is contained in:
Michael 2017-05-31 08:40:29 -04:00
parent ecf5297dbb
commit 3dd402277b
2 changed files with 8 additions and 0 deletions

View file

@ -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;
}

View file

@ -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();