${iServerJava6R_ThemeOffset_Title}

${iServerJava6R_ThemeOffset_Description}

        internal static string ToJson(ThemeOffset offsetTheme)
        {
            string json = "";

            List<string> list = new List<string>();
            list.Add(string.Format("\"offsetFixed\":{0}", offsetTheme.OffsetFixed.ToString(System.Globalization.CultureInfo.InvariantCulture).ToLower()));

            if (!string.IsNullOrEmpty(offsetTheme.OffsetX))
            {
                list.Add(string.Format("\"offsetX\":\"{0}\"", offsetTheme.OffsetX));
            }
            else
            {
                list.Add("\"offsetX\":\"\"");
            }

            if (!string.IsNullOrEmpty(offsetTheme.OffsetY))
            {
                list.Add(string.Format("\"offsetY\":\"{0}\"", offsetTheme.OffsetY));
            }
            else
            {
                list.Add("\"offsetY\":\"\"");
            }

            json = string.Join(",", list.ToArray());
            return json;
        }
 internal static ThemeOffset FromJson(JsonObject json)
 {
     if (json == null)
         return null;
     ThemeOffset themeOffset = new ThemeOffset();
     themeOffset.OffsetFixed = (bool)json["offsetFixed"];
     themeOffset.OffsetX = (string)json["offsetX"];
     themeOffset.OffsetY = (string)json["offsetY"];
     return themeOffset;
 }