コード例 #1
0
 public dmCollection()
     : base(null)
 {
     Disabled         = new dmGroup(this);
     Disabled.Name    = "Disabled";
     Disabled.Comment = "Disabled Groups and Rulesets";
 }
コード例 #2
0
        protected int ParseGroup(string[] strArray, int nLineStart, dmContainer Parent)
        {
            int     nReturn  = nLineStart;
            dmGroup newGroup = new dmGroup(this);
            Dictionary <string, string> itemParameters = GetParameters(strArray[nReturn]);

            foreach (KeyValuePair <string, string> item in itemParameters)
            {
                switch (item.Key)
                {
                case "FILTERSANDDEFAULTS":
                    newGroup.FiltersAndDefaults.Parse(item.Value);
                    break;

                case "GROUP":
                    newGroup.Name = item.Value;
                    break;

                case "COMMENT":
                    newGroup.Comment = item.Value;
                    break;
                }
            }
            nReturn++;

            //parses until it reaches the end of the group and returns the line number after the end of the group
            while (nReturn < strArray.Length && IdentifyLineType(strArray[nReturn]) != LineParseType.GroupEndLine)
            {
                string[] tmpVariable = new string[0];
                switch (IdentifyLineType(strArray[nReturn]))
                {
                case LineParseType.GroupStartLine:
                    nReturn = ParseGroup(strArray, nReturn, newGroup);
                    break;

                case LineParseType.RulesetLine:
                case LineParseType.RulesetNameLine:
                    nReturn = ParseRuleset(strArray, nReturn, newGroup);
                    break;

                default:
                    nReturn++;
                    break;
                }
            }
            nReturn++;
            Parent.AddGroup(newGroup);

            return(nReturn);
        }
コード例 #3
0
 public dmCollection(dmGroup rsGroup)
     : this()
 {
     this.Groups.Add(rsGroup.Clone(this));
 }
コード例 #4
0
 public int IndexOfGroup(dmGroup item)
 {
     return(Groups.IndexOf(item));
 }
コード例 #5
0
 public bool ContainsGroup(dmGroup item)
 {
     return(Groups.Contains(item));
 }
コード例 #6
0
 public void InsertGroup(int index, dmGroup item)
 {
     Groups.Insert(index, item);
 }
コード例 #7
0
 public bool RemoveGroup(dmGroup item)
 {
     return(Groups.Remove(item));
 }
コード例 #8
0
 public bool Contains(dmGroup item)
 {
     return(ContainsGroup(item));
 }
コード例 #9
0
 public void AddGroup(dmGroup rsgGroup)
 {
     this.Groups.Add(rsgGroup);
 }