diff options
| author | Michael <[email protected]> | 2017-05-31 09:14:27 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-05-31 09:14:27 -0400 |
| commit | b0da30bbde2bb198850ea45dc0006762b23f99a3 (patch) | |
| tree | f73d0ebbb6ac7564446fea6f08cd3896e83e068b /ShiftOS.WinForms | |
| parent | c63117276194d18890f14c75b8864749fbd33a0e (diff) | |
| download | shiftos_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.cs | 31 |
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(); })); } |
