aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-05-31 09:14:27 -0400
committerMichael <[email protected]>2017-05-31 09:14:27 -0400
commitb0da30bbde2bb198850ea45dc0006762b23f99a3 (patch)
treef73d0ebbb6ac7564446fea6f08cd3896e83e068b /ShiftOS.WinForms
parentc63117276194d18890f14c75b8864749fbd33a0e (diff)
downloadshiftos_thereturn-b0da30bbde2bb198850ea45dc0006762b23f99a3.tar.gz
shiftos_thereturn-b0da30bbde2bb198850ea45dc0006762b23f99a3.tar.bz2
shiftos_thereturn-b0da30bbde2bb198850ea45dc0006762b23f99a3.zip
COMPLETELY WORKING notification system!
Diffstat (limited to 'ShiftOS.WinForms')
-rw-r--r--ShiftOS.WinForms/WinformsDesktop.cs31
1 files changed, 30 insertions, 1 deletions
diff --git a/ShiftOS.WinForms/WinformsDesktop.cs b/ShiftOS.WinForms/WinformsDesktop.cs
index 0cfd667..b9c4f37 100644
--- a/ShiftOS.WinForms/WinformsDesktop.cs
+++ b/ShiftOS.WinForms/WinformsDesktop.cs
@@ -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();
}));
}