${REST_LabelSymbolCell_Title}

${REST_LabelSymbolCell_Description}

상속: LabelMatrixCell
예제 #1
0
        internal static LabelSymbolCell FromJson(JsonObject json)
        {
            if (json == null) return null;
            LabelSymbolCell symbolCell = new LabelSymbolCell();
            if (json["style"] != null)
            {
                symbolCell.Style = ServerStyle.FromJson(json["style"].GetObjectEx());
            }
            symbolCell.SymbolIDField = json["symbolIDField"].GetStringEx();

            if (json.ContainsKey("type") && json["type"] != null)
            {
                symbolCell.Type = (LabelMatrixCellType)Enum.Parse(typeof(LabelMatrixCellType), json["type"].GetStringEx(), true);
            }

            return symbolCell;
        }
예제 #2
0
        internal static string ToJson(LabelSymbolCell symbolCell)
        {
            string json = "{";
            List<string> list = new List<string>();

            list.Add(string.Format("\"symbolIDField\":\"{0}\"", symbolCell.SymbolIDField));
            if (symbolCell.Style != null)
            {
                list.Add(string.Format("\"style\":{0}", ServerStyle.ToJson(symbolCell.Style)));
            }
            else
            {
                list.Add(string.Format("\"style\":{0}", new ServerStyle()));
            }

            list.Add(string.Format("\"type\":\"{0}\"", symbolCell.Type));

            json += string.Join(",", list.ToArray());
            json += "}";

            return json;
        }