public static void show(string text, int mode = 1, int time = 5000) { var n = new Notify(text, mode, time); if (NotificationBar.Instance == null) { NotificationBar.init(); } NotificationBar.Instance.flowLayoutPanel.Controls.Add(n); }
public NotificationBar() { InitializeComponent(); Instance = this; this.FormClosed += (o, e) => { Instance = null; }; this.Width = 300; this.Top = 0; this.Left = Screen.PrimaryScreen.WorkingArea.Width - 300; this.Height = Screen.PrimaryScreen.WorkingArea.Height; }