示例#1
0
        private void NewFilterGroup(string op, bool start = false)
        {
            FilterBlock newfilter = new FilterBlock(" (  " + op + " ", FILTER_GROUPS.OPEN);

            if (start)
            {
                InsertGroup(start, newfilter);
            }

            else
            {
                if ((GroupsCount == 0) && (AddedFilters.Count > 0))
                {
                    FilterBlock openfilter = new FilterBlock(" (  & ", FILTER_GROUPS.OPEN);

                    InsertGroup(true, openfilter);
                }

                InsertGroup(false, newfilter);
            }


            SetFilterText();

            UpdateCMDGroup();
        }
示例#2
0
        private void InsertGroup(bool start, FilterBlock newFilter)
        {
            if (start)
            {
                AddedFilters.Insert(0, newFilter);
            }

            else
            {
                AddedFilters.Add(newFilter);
            }

            GroupsCount++;
        }
示例#3
0
        private void UnDoFilter()
        {
            if (AddedFilters.Count > 0)
            {
                FilterBlock curfilter = AddedFilters.Last();

                GroupsCount += curfilter.CounterHandle;

                AddedFilters.Remove(curfilter);

                if ((GroupsCount == 1) && (AddedFilters.Count == 2))
                {
                    GroupsCount = 0;

                    AddedFilters.RemoveAt(0);
                }

                SetFilterText();
            }

            this.cmdUnDo.Enabled = (AddedFilters.Count > 0);

            UpdateCMDGroup();
        }