Exemplo n.º 1
0
        public string GetJson()
        {
            GraphParameterValueData d = new GraphParameterValueData();

            d.name        = Name;
            d.isFunction  = IsFunction();
            d.description = Description;
            d.type        = (int)Type;
            d.min         = Min;
            d.max         = Max;
            d.inputType   = (int)inputType;
            d.id          = Id;
            d.section     = Section;

            if (d.isFunction)
            {
                FunctionGraph g = Value as FunctionGraph;

                d.value = g.GetJson();
            }
            else
            {
                if (v is Matrix4)
                {
                    d.value = ((Matrix4)v).ToArray();
                }
                else
                {
                    d.value = v;
                }
            }

            return(JsonConvert.SerializeObject(d));
        }
Exemplo n.º 2
0
        public string GetJson()
        {
            GraphParameterValueData d = new GraphParameterValueData();

            d.name       = Name;
            d.isFunction = IsFunction();

            if (d.isFunction)
            {
                FunctionGraph g = Value as FunctionGraph;

                d.value = g.GetJson();
            }
            else
            {
                d.value = Value;
            }

            return(JsonConvert.SerializeObject(d));
        }
Exemplo n.º 3
0
        public string GetJson()
        {
            GraphParameterValueData d = new GraphParameterValueData();

            d.name        = Name;
            d.isFunction  = IsFunction();
            d.description = Description;
            d.type        = (int)Type;
            d.min         = Min;
            d.max         = Max;

            if (d.isFunction)
            {
                FunctionGraph g = Value as FunctionGraph;

                d.value = g.GetJson();
            }
            else
            {
                d.value = Value;
            }

            return(JsonConvert.SerializeObject(d));
        }