mirror of
https://git.alee14.me/shiftos-archive/ShiftOS_TheReturn.git
synced 2025-01-22 18:02:16 +00:00
Notification app resets UI when new note is posted
This commit is contained in:
parent
dc78cb99e6
commit
5573e82ca4
2 changed files with 25 additions and 0 deletions
|
@ -29,6 +29,7 @@
|
|||
private void InitializeComponent()
|
||||
{
|
||||
this.lblnotifications = new System.Windows.Forms.Label();
|
||||
this.fllist = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// lblnotifications
|
||||
|
@ -43,10 +44,19 @@
|
|||
this.lblnotifications.Tag = "header1";
|
||||
this.lblnotifications.Text = "Notifications";
|
||||
//
|
||||
// fllist
|
||||
//
|
||||
this.fllist.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.fllist.Location = new System.Drawing.Point(0, 33);
|
||||
this.fllist.Name = "fllist";
|
||||
this.fllist.Size = new System.Drawing.Size(437, 487);
|
||||
this.fllist.TabIndex = 1;
|
||||
//
|
||||
// Notifications
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.fllist);
|
||||
this.Controls.Add(this.lblnotifications);
|
||||
this.Name = "Notifications";
|
||||
this.Size = new System.Drawing.Size(437, 520);
|
||||
|
@ -58,5 +68,6 @@
|
|||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label lblnotifications;
|
||||
private System.Windows.Forms.FlowLayoutPanel fllist;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,10 +18,23 @@ namespace ShiftOS.WinForms.Applications
|
|||
public Notifications()
|
||||
{
|
||||
InitializeComponent();
|
||||
onMade = (note) =>
|
||||
{
|
||||
SetupUI();
|
||||
};
|
||||
}
|
||||
|
||||
Action<Notification> onMade = null;
|
||||
|
||||
public void SetupUI()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void OnLoad()
|
||||
{
|
||||
SetupUI();
|
||||
NotificationDaemon.NotificationMade += onMade;
|
||||
}
|
||||
|
||||
public void OnSkinLoad()
|
||||
|
@ -30,6 +43,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
|
||||
public bool OnUnload()
|
||||
{
|
||||
NotificationDaemon.NotificationMade -= onMade;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue