COMPLETELY WORKING notification system!
This commit is contained in:
parent
c631172761
commit
b0da30bbde
1 changed files with 30 additions and 1 deletions
|
@ -106,7 +106,32 @@ namespace ShiftOS.WinForms
|
|||
flnotifications.Controls.Add(ic);
|
||||
ic.Show();
|
||||
|
||||
//TODO: Settings pane on click.
|
||||
ic.Click += (o, a) =>
|
||||
{
|
||||
HideAppLauncher();
|
||||
|
||||
if(itype.BaseType == typeof(UserControl))
|
||||
{
|
||||
UserControl ctrl = (UserControl)Activator.CreateInstance(itype);
|
||||
(ctrl as IStatusIcon).Setup();
|
||||
currentSettingsPane = ctrl;
|
||||
if(LoadedSkin.DesktopPanelPosition == 0)
|
||||
{
|
||||
ctrl.Top = desktoppanel.Height;
|
||||
}
|
||||
else
|
||||
{
|
||||
ctrl.Top = this.Height - desktoppanel.Height - ctrl.Height;
|
||||
}
|
||||
int noteleft = flnotifications.PointToScreen(ic.Location).X;
|
||||
int realleft = (this.Width - (noteleft + ic.Width)) - ctrl.Width;
|
||||
ctrl.Left = realleft;
|
||||
ControlManager.SetupControls(ctrl);
|
||||
ctrl.Show();
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -151,6 +176,8 @@ namespace ShiftOS.WinForms
|
|||
notekiller.Start();
|
||||
}
|
||||
|
||||
private UserControl currentSettingsPane = null;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ShiftOS.WinForms.WinformsDesktop"/> class.
|
||||
/// </summary>
|
||||
|
@ -1101,6 +1128,8 @@ namespace ShiftOS.WinForms
|
|||
{
|
||||
this.Invoke(new Action(() =>
|
||||
{
|
||||
currentSettingsPane?.Hide();
|
||||
currentSettingsPane = null;
|
||||
pnladvancedal.Hide();
|
||||
}));
|
||||
}
|
||||
|
|
Reference in a new issue