using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;

namespace MioStar_GUI
{
    class EventEntry : INotifyPropertyChanged
    {
        private string mLogDate;
        private string mInstanceID;
        private string mLogMessage;
        private string mShortMessage;

        public event PropertyChangedEventHandler PropertyChanged;



        public EventEntry(string pLogDate, string pInstanceID, string pShortMessage, string pLogMessage)
        {
            mLogDate = pLogDate;
            mLogMessage = pLogMessage;
            mShortMessage = pShortMessage;
            mInstanceID = pInstanceID;
        }


        public string LogDate
        {
            get { return mLogDate; }
            set
            {
                mLogDate = value;
                this.NotifyPropertyChanged("Timestamp");
            }
        }


        public string InstanceID
        {
            get { return mInstanceID; }
            set
            {
                mInstanceID = value;
                this.NotifyPropertyChanged("InstanceID");
            }
        }

        public string LogMessage
        {
            get { return mLogMessage; }
            set
            {
                mLogMessage = value;
                this.NotifyPropertyChanged("Message");
            }
        }


        public string ShortMessage
        {
            get { return mShortMessage; }
            set
            {
                mShortMessage = value;
                this.NotifyPropertyChanged("ShortMessage");
            }
        }




        private void NotifyPropertyChanged(string pName)
        {
            if (PropertyChanged != null)
                PropertyChanged(this, new PropertyChangedEventArgs(pName));
        }
    }
}
