Example #1
0
        /// <summary>
        ///
        /// </summary>
        private void BuildFilters()
        {
            mFilters.Clear();
            if (!string.IsNullOrEmpty(this.FilterKeyName))
            {
                mFilters.Add("keyword", FilterKeyName);
            }
            if (this.TagTypeFilterEnable)
            {
                mFilters.Add("type", this.FilterType.ToString());
            }
            if (this.ReadWriteModeFilterEnable)
            {
                mFilters.Add("readwritetype", FilterReadWriteMode.ToString());
            }


            //string stmp = "";
            //if (this.DriverFilterEnable)
            //{
            //    stmp = this.FilterDriver;
            //}
            //if (this.RegistorFilterEnable)
            //{
            //    stmp += "." + this.FilterRegistorName;
            //}
            //if (!string.IsNullOrEmpty(stmp))
            //{
            //    mFilters.Add("linkaddress", stmp);
            //}
        }
Example #2
0
        private void BuildFilters()
        {
            mFilters.Clear();
            if (!string.IsNullOrEmpty(this.FilterKeyName))
            {
                mFilters.Add("keyword", FilterKeyName);
            }
            if (this.TagTypeFilterEnable)
            {
                mFilters.Add("type", this.FilterType.ToString());
            }
            if (this.ReadWriteModeFilterEnable)
            {
                mFilters.Add("readwritetype", FilterReadWriteMode.ToString());
            }

            if (this.RecordFilterEnable)
            {
                if (this.TimerRecordFilterEnable && this.ValueChangedRecordFilterEnable)
                {
                    mFilters.Add("recordtype", "3");
                }
                else if (this.TimerRecordFilterEnable)
                {
                    mFilters.Add("recordtype", "0");
                }
                else if (this.ValueChangedRecordFilterEnable)
                {
                    mFilters.Add("recordtype", "1");
                }
                else
                {
                    mFilters.Add("recordtype", "3");
                }
            }

            if (this.CompressFilterEnable)
            {
                mFilters.Add("compresstype", FilterCompressType.ToString());
            }

            string stmp = "";

            if (this.DriverFilterEnable)
            {
                stmp = this.FilterDriver;
            }
            if (this.RegistorFilterEnable)
            {
                stmp += "." + this.FilterRegistorName;
            }
            if (!string.IsNullOrEmpty(stmp))
            {
                mFilters.Add("linkaddress", stmp);
            }
        }