Exemple #1
0
        public string toJSON(CField field)
        {
            string json = "{";

            json += "\"minY\":" + field.minY + ", ";
            json += "\"maxY\":" + field.maxY + ", ";
            //json += "\"unit\":" + field.unit + ", ";
            json += "\"relSize\":" + field.relSize + ", ";
            json += "\"signal\":[";
            if (SigList.Count != 0)
            {
                foreach (CSignal signal in SigList)
                {
                    string signalJSON = signal.toJSON(signal);
                    json += signalJSON;
                }
            }
            if (SigMultiList.Count != 0)
            {
                foreach (CSigMultitext SigMultitext in SigMultiList)
                {
                    string sigMultitextJSON = SigMultitext.toJSON(SigMultitext);
                    json += sigMultitextJSON;
                }
            }
            json  = json.Substring(0, json.Length - 1);
            json += "]";
            json += "},";
            return(json);
        }
Exemple #2
0
 public void AddField(CField CFieldInstatance)
 {
     FieldList.Add(CFieldInstatance);
 }