public override bool IsSame(BomLevelBase Child2) { var child1 = this; //(BomLevelBaseSplit)Child1; var child2 = (BomLevelNumber)Child2; if (child1.Count == Child2.Count) { return(true); } return(false); }
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); }
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); }
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); }
public virtual bool IsChild(BomLevelBase blBase2) { return(false); }
public virtual bool IsSame(BomLevelBase blBase2) { return(false); }