Newer
Older
Import / projects / Gameloft / bne_lib / tools / AutobotManager / src / BotStyleRequired.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.Diagnostics;
using System.Text.RegularExpressions;
using System.Timers;

namespace AutobotManager
{
    public class BotStyleRequired : INotifyPropertyChanged
    {
        public BotStyleRequired(String a_sSimName, int a_iSim, int a_iRequired)
        {
            m_sSimName = a_sSimName;
            m_iSim = a_iSim;
            m_iRequired = a_iRequired;
        }

        public event PropertyChangedEventHandler PropertyChanged;

        // This method is called by the Set accessor of each property.
        // The CallerMemberName attribute that is applied to the optional propertyName
        // parameter causes the property name of the caller to be substituted as an argument.
        private void NotifyPropertyChanged(String propertyName = "")
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        #region Data
        private String m_sSimName;
        private int m_iSim;
        private int m_iRequired;

        [DisplayName("Style")]
        [ReadOnly(true)]
        public String SimName { get { return this.m_sSimName; } set { if (value != this.m_sSimName) { this.m_sSimName = value; NotifyPropertyChanged("m_sSimName"); } } }

        [Browsable(false)]
        public int SimID { get { return this.m_iSim; } set { if (value != this.m_iSim) { this.m_iSim = value; NotifyPropertyChanged("m_iSim"); } } }

        [DisplayName("Required")]
        public int RequiredCount { get { return this.m_iRequired; } set { if (value != this.m_iRequired) { this.m_iRequired = value; NotifyPropertyChanged("m_iRequired"); } } }
        #endregion // Data

    }


}