public TextChangeCommandT234(T234ViewModel node, string key, string preKey, int type) { _node = node; _preKey = preKey; _key = key; _type = type; }
public void Merge(T234ViewModel other, T234ViewModel optional = null) { if (other != null) { if (_IsTwoNode && other._IsTwoNode) { if(int.Parse(TxtOne) > int.Parse(other.TxtOne)) { TxtTwo = TxtOne; TxtOne = other.TxtOne; } else { TxtTwo = other.TxtOne; } _IsTwoNode = false; _IsThreeNode = true; } else if (_IsTwoNode && other._IsThreeNode) { if(int.Parse(TxtOne) > int.Parse(other.TxtOne)) { if(int.Parse(TxtOne) > int.Parse(other.TxtTwo)) { TxtThree = TxtOne; TxtOne = other.TxtOne; TxtTwo = other.TxtTwo; } else { TxtTwo = TxtOne; TxtOne = other.TxtOne; TxtThree = other.TxtTwo; } } else { TxtTwo = other.TxtOne; TxtThree = other.TxtTwo; } _IsTwoNode = false; _IsFourNode = true; } if (optional != null && optional._IsTwoNode && _IsThreeNode) { TxtThree = optional.TxtOne; _IsThreeNode = false; _IsFourNode = true; } } }