コード例 #1
0
        public override bool IsSame(BomLevelBase Child2)
        {
            var child1 = this; //(BomLevelBaseSplit)Child1;
            var child2 = (BomLevelNumber)Child2;


            if (child1.Count == Child2.Count)
            {
                return(true);
            }

            return(false);
        }
コード例 #2
0
        public override bool IsSame(BomLevelBase Child2)
        {
            var child1 = this; //(BomLevelBaseSplit)Child1;
            var child2 = (BomLevelBaseSplit)Child2;

            if (child1.Count != child2.Count)
            {
                return(false);
            }

            int    cnt       = child1.Count;
            string child1Str = string.Join(".", child1.Levels.Take(cnt - 1)).ToString();
            string child2Str = string.Join(".", child2.Levels.Take(cnt - 1)).ToString();
            bool   result    = child2Str.StartsWith(child1Str);

            return(result);
        }
コード例 #3
0
        public override bool IsChild(BomLevelBase Child)
        {
            var father = this;// (BomLevelBaseSplit)Father;
            var child  = (BomLevelNumber)Child;

            if (father.Count == 0 && child.Count == 1)
            {
                return(true);
            }

            if (father.Count == child.Count - 1)
            {
                return(true);
            }

            return(false);
        }
コード例 #4
0
        public override bool IsChild(BomLevelBase Child)
        {
            var father = this;// (BomLevelBaseSplit)Father;
            var child  = (BomLevelBaseSplit)Child;

            if (father.Count != child.Count - 1)
            {
                return(false);
            }
            if (father.Count == 0)
            {
                return(true);
            }

            string fatherStr = string.Join(".", father.Levels).ToString();
            string childStr  = string.Join(".", child.Levels).ToString();
            bool   result    = childStr.StartsWith(fatherStr);

            return(result);
        }
コード例 #5
0
 public virtual bool IsChild(BomLevelBase blBase2)
 {
     return(false);
 }
コード例 #6
0
 public virtual bool IsSame(BomLevelBase blBase2)
 {
     return(false);
 }