using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace JiangSu.Models { public class Img { public Img() { } public Img(string name, string path, string json) { this.name = name; this.path = path; this.json = json; } public Img(string name, string path, string json, double x, double y, double z) { this.name = name; this.path = path; this.json = json; this.x = x; this.y = y; this.z = z; } public void SetXYZ(string x, string y, string z) { double val = 0; if (double.TryParse(x, out val)) this.x = val; if (double.TryParse(y, out val)) this.y = val; if (double.TryParse(z, out val)) this.z = val; } public long id { set; get; } public string name { set; get; } public string path { set; get; } public string json { set; get; } public double x { set; get; } public double y { set; get; } public double z { set; get; } } }