Пример #1
0
        /// <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
        }
Пример #2
0
 public override void OnNotify(GameObject go, NotifType nt, bool extraInfo)
 {
     if (nt == NotifType.AchivementUnlocked)
     {
         UnlockAchivement();
     }
 }
Пример #3
0
 public override void OnNotify(GameObject go, NotifType nt, bool leverstatus)
 {
     if (nt.Equals(NotifType.ActivatedDoor))
     {
         ManageLeverNotification(go, leverstatus);
     }
 }
Пример #4
0
 public void NotifyObserver(NotifType nt, bool extraInfo)
 {
     foreach (Observer o in _observers)
     {
         o.OnNotify(gameObject, nt, extraInfo);
     }
 }
Пример #5
0
 public abstract void OnNotify(GameObject go, NotifType nt, bool extraInfo);
Пример #6
0
 public NotificationType(NotifType type, object parameters)
 {
     this.type       = type;
     this.parameters = parameters;
 }