/// <summary> /// Gets the size of. /// </summary> /// <returns></returns> public int GetSizeOf() { int res = 2; if (rect != null) { res += rect.GetSizeOf(); } res += 2; if (HasFont) { res += 4; } if (HasTextColor) { res += textColor.GetSizeOf(); } if (HasMaxLength) { res += 2; } if (HasLayout) { res += 9; } res += variableName.Length + 1; if (HasText) { res += initialText.Length + 1; } return(res); }