/// <summary> /// Constructor for the Notification Class /// </summary> /// <param name="notifMessage">The Message to be displayed</param> /// <param name="type">Notification Type is a custom Enum which includes the multiple notification type</param> public Notification(string notifMessage, NotifType type) { InitializeComponent(); //Setting Background Colour & Icon Depending on NotifType switch (type) { case NotifType.success: BackColor = Color.SeaGreen; pictureBox1.Image = Properties.Resources.success; break; case NotifType.error: BackColor = Color.FromArgb(212, 53, 28); pictureBox1.Image = Properties.Resources.error; break; case NotifType.information: BackColor = Color.FromArgb(29, 112, 184); pictureBox1.Image = Properties.Resources.warning; break; case NotifType.warning: BackColor = Color.FromArgb(255, 221, 0); pictureBox1.Image = Properties.Resources.warning; break; } MessageLabel.Text = notifMessage; //Setting Notification Message }
public override void OnNotify(GameObject go, NotifType nt, bool extraInfo) { if (nt == NotifType.AchivementUnlocked) { UnlockAchivement(); } }
public override void OnNotify(GameObject go, NotifType nt, bool leverstatus) { if (nt.Equals(NotifType.ActivatedDoor)) { ManageLeverNotification(go, leverstatus); } }
public void NotifyObserver(NotifType nt, bool extraInfo) { foreach (Observer o in _observers) { o.OnNotify(gameObject, nt, extraInfo); } }
public abstract void OnNotify(GameObject go, NotifType nt, bool extraInfo);
public NotificationType(NotifType type, object parameters) { this.type = type; this.parameters = parameters; }