static AddToTree.Tree SuitableToSimplifierLocalThatToSimplifiedLocatedAtLeft(AddToTree.Tree Dummy, AddToTree.Tree ToSimplified, ref bool Suitable, ref bool MinuseTruePlusFalse, ref bool SimplifiedTrueOtherWiseFalse, ref float Num) { if (Dummy == null) { return(Dummy); } try { if (IS.IsMinuseOrPluse(Dummy.SampleAccess)) { if (EqualToObject.IsEqual(Dummy.LeftSideAccess, ToSimplified)) { if (IS.IsNumber(Dummy.RightSideAccess.SampleAccess)) { Num = (float)System.Convert.ToDouble(Dummy.RightSideAccess.SampleAccess); try { if ((ToSimplified.ThreadAccess.ThreadAccess == null) && (Dummy.SampleAccess == "-")) { SimplifiedTrueOtherWiseFalse = true; MinuseTruePlusFalse = true; //LOCATION81726487 :refer to page 265. AddToTree.Tree HOLDER = Dummy.CopyTree(Dummy); Dummy = Dummy.ThreadAccess; if (EqualToObject.IsEqual(Dummy.RightSideAccess, HOLDER)) { Dummy.RightSideAccess.SetLeftAndRightSide(null, null); Dummy.RightSideAccess.SampleAccess = null; } else if (EqualToObject.IsEqual(Dummy.LeftSideAccess, HOLDER)) { // Dummy.LeftSideAccess.RightSideAccess.ThreadAccess = Dummy; // Dummy.LeftSideAccess = Dummy.LeftSideAccess.RightSideAccess; Dummy.LeftSideAccess.SetLeftAndRightSide(null, null); Dummy.LeftSideAccess.SampleAccess = null; } Suitable = true; return(Dummy); } else if ((ToSimplified.ThreadAccess.ThreadAccess != null) && (Dummy.ThreadAccess.SampleAccess == "-")) { if ((ToSimplified.ThreadAccess.ThreadAccess.SampleAccess == "+") && (Dummy.ThreadAccess.SampleAccess == "-")) { SimplifiedTrueOtherWiseFalse = true; MinuseTruePlusFalse = true; //LOCATION81987526487 :refer to page 265. AddToTree.Tree HOLDER = Dummy.CopyTree(Dummy); Dummy = Dummy.ThreadAccess; if (EqualToObject.IsEqual(Dummy.RightSideAccess, HOLDER)) { Dummy.RightSideAccess.SetLeftAndRightSide(null, null); Dummy.RightSideAccess.SampleAccess = null; } else if (EqualToObject.IsEqual(Dummy.LeftSideAccess, HOLDER)) { Dummy.LeftSideAccess.SetLeftAndRightSide(null, null); Dummy.LeftSideAccess.SampleAccess = null; } Suitable = true; return(Dummy); } else if ((ToSimplified.ThreadAccess.ThreadAccess != null) && (Dummy.ThreadAccess.SampleAccess == "+")) { if ((ToSimplified.ThreadAccess.ThreadAccess.SampleAccess == "-") && (Dummy.ThreadAccess.SampleAccess == "+")) { SimplifiedTrueOtherWiseFalse = true; MinuseTruePlusFalse = false; //LOCATION81987526487 :refer to page 265. AddToTree.Tree HOLDER = Dummy.CopyTree(Dummy); Dummy = Dummy.ThreadAccess; if (EqualToObject.IsEqual(Dummy.RightSideAccess, HOLDER)) { Dummy.RightSideAccess.SetLeftAndRightSide(null, null); Dummy.RightSideAccess.SampleAccess = null; } else if (EqualToObject.IsEqual(Dummy.LeftSideAccess, HOLDER)) { Dummy.LeftSideAccess.SetLeftAndRightSide(null, null); Dummy.LeftSideAccess.SampleAccess = null; } Suitable = true; return(Dummy); } } } } catch (NullReferenceException t) { } } else if (EqualToObject.IsEqual(Dummy.RightSideAccess, ToSimplified)) { if (IS.IsNumber(Dummy.LeftSideAccess.SampleAccess)) { Dummy.RightSideAccess.SampleAccess = null; try { Num = (float)System.Convert.ToDouble(Dummy.LeftSideAccess.SampleAccess); if ((ToSimplified.ThreadAccess.ThreadAccess == null) && (Dummy.SampleAccess == "-")) { SimplifiedTrueOtherWiseFalse = true; MinuseTruePlusFalse = true; //LOCATION81726487 :refer to page 265. AddToTree.Tree HOLDER = Dummy.CopyTree(Dummy); Dummy = Dummy.ThreadAccess; if (EqualToObject.IsEqual(Dummy.RightSideAccess, HOLDER)) { Dummy.RightSideAccess.SetLeftAndRightSide(null, null); Dummy.RightSideAccess.SampleAccess = null; } else if (EqualToObject.IsEqual(Dummy.LeftSideAccess, HOLDER)) { Dummy.LeftSideAccess.SetLeftAndRightSide(null, null); Dummy.LeftSideAccess.SampleAccess = null; } Suitable = true; return(Dummy); } else if ((ToSimplified.ThreadAccess.ThreadAccess != null) && (Dummy.SampleAccess == "-")) { if ((ToSimplified.ThreadAccess.ThreadAccess.SampleAccess == "+") && (Dummy.SampleAccess == "-")) { SimplifiedTrueOtherWiseFalse = true; MinuseTruePlusFalse = true; //LOCATION81987526487 :refer to page 265. AddToTree.Tree HOLDER = Dummy.CopyTree(Dummy); Dummy = Dummy.ThreadAccess; if (EqualToObject.IsEqual(Dummy.RightSideAccess, HOLDER)) { Dummy.RightSideAccess.LeftSideAccess.ThreadAccess = Dummy; Dummy.RightSideAccess = Dummy.RightSideAccess.LeftSideAccess; } else if (EqualToObject.IsEqual(Dummy.LeftSideAccess, HOLDER)) { Dummy.LeftSideAccess.SetLeftAndRightSide(null, null); Dummy.LeftSideAccess.SampleAccess = null; } Suitable = true; return(Dummy); } else if ((ToSimplified.ThreadAccess.ThreadAccess != null) && (Dummy.SampleAccess == "+")) { if ((ToSimplified.ThreadAccess.ThreadAccess.SampleAccess == "-") && (Dummy.SampleAccess == "+")) { SimplifiedTrueOtherWiseFalse = true; MinuseTruePlusFalse = false; //LOCATION81987526487 :refer to page 265. AddToTree.Tree HOLDER = Dummy.CopyTree(Dummy); Dummy = Dummy.ThreadAccess; if (EqualToObject.IsEqual(Dummy.RightSideAccess, HOLDER)) { Dummy.RightSideAccess.SetLeftAndRightSide(null, null); Dummy.RightSideAccess.SampleAccess = null; } else if (EqualToObject.IsEqual(Dummy.LeftSideAccess, HOLDER)) { Dummy.LeftSideAccess.SetLeftAndRightSide(null, null); Dummy.LeftSideAccess.SampleAccess = null; } Suitable = true; return(Dummy); } } } } catch (NullReferenceException t) { } } } } } else { return(Dummy); } } catch (NullReferenceException t) { } LocalSearchMinusPlusWithNumberMulatedEqualSimplifier.SuitableToSimplifierLocalThatToSimplifiedLocatedAtLeft(Dummy.LeftSideAccess, ToSimplified, ref Suitable, ref MinuseTruePlusFalse, ref SimplifiedTrueOtherWiseFalse, ref Num); LocalSearchMinusPlusWithNumberMulatedEqualSimplifier.SuitableToSimplifierLocalThatToSimplifiedLocatedAtLeft(Dummy.RightSideAccess, ToSimplified, ref Suitable, ref MinuseTruePlusFalse, ref SimplifiedTrueOtherWiseFalse, ref Num); return(Dummy); }