Example #1
0
        public FollowedStatTypesCollection(StatTypesCollection stateTypes)
        {
            this.InnerList.Clear();

            foreach (StatTypes statetype in stateTypes)
            {
                this.Add(new FollowedStatTypes(statetype));
            }
        }
Example #2
0
        public StatTypesCollection Copy()
        {
            StatTypesCollection newStatTypes = new StatTypesCollection();

            foreach (StatTypes type in this)
            {
                newStatTypes.Add(type);
            }

            return(newStatTypes);
        }
Example #3
0
        public StatInfo(StatInfo info)
        {
            this._Filter            = info.Filter.Copy();
            this._DenominatorFilter = info.DenominatorFilter.Copy();
            this._StatTypes         = info.StatTypes.Copy();
            this._ClickEvent        = info.ClickEvent;
            this._FieldName         = info.StatField;
            this._Title             = info.Title;
            this._Result            = new ArrayList();

            this._FollowedStatTypes = info._FollowedStatTypes.Copy();
        }
Example #4
0
        //End

        public StatInfo()
        {
            this._Filter            = new DBFilter();
            this._DenominatorFilter = new DBFilter();
            this._StatTypes         = new StatTypesCollection();
            this._StatTypes.Add(Data.StatTypes.Frequence);
            this._ClickEvent = ClickEvents.PlayVideo;
            this._FieldName  = string.Empty;
            this._Result     = new ArrayList();
            this._Title      = "New Stat";

            this._FollowedStatTypes = new FollowedStatTypesCollection(this._StatTypes);   //Added this code at 2009-1-4 11:26:59@Simon
        }
Example #5
0
        public StatInfo(SerializationInfo info, StreamingContext context)
        {
            try
            {
                this._ClickEvent = (ClickEvents)(info.GetValue("_ClickEvent", typeof(ClickEvents)));
            }
            catch
            {
                this._ClickEvent = ClickEvents.PlayVideo;
            }

            try
            {
                this._Title = info.GetString("_Title");
            }
            catch
            {
                this._Title = "New Stat";
            }

            try
            {
                this._FieldName = info.GetString("_FieldName");
            }
            catch
            {
                this._FieldName = string.Empty;
            }

            try
            {
                this._StatTypes = info.GetValue("_StatTypes", typeof(StatTypesCollection)) as StatTypesCollection;
            }
            catch
            {
                this._StatTypes = new StatTypesCollection();
            }

            try
            {
                this._Filter = info.GetValue("_Filter", typeof(DBFilter)) as DBFilter;

                this._Filter = AdvFilterConvertor.GetAdvFilter(DataProvider.VideoPlayBackManager.AdvReportFilters, this._Filter);    //2009-4-29 11:37:37@Simon Add UpdateAdvFilter
            }
            catch
            {
                this._Filter = new DBFilter();
            }

            try
            {
                this._DenominatorFilter = info.GetValue("_DenominatorFilter", typeof(DBFilter)) as DBFilter;

                this._DenominatorFilter = AdvFilterConvertor.GetAdvFilter(DataProvider.VideoPlayBackManager.AdvReportFilters, this._DenominatorFilter);    //2009-4-29 11:37:37@Simon Add UpdateAdvFilter
            }
            catch
            {
                this._DenominatorFilter = new DBFilter();
            }
            try  //Added this code at 2009-1-5 8:21:00@Simon
            {
                this._FollowedStatTypes = info.GetValue("_FollowedStatTypes", typeof(FollowedStatTypesCollection)) as FollowedStatTypesCollection;
            }
            catch
            {
                this._FollowedStatTypes = new FollowedStatTypesCollection(this._StatTypes);
            }
        }