private HotSpotService.ROSHotSpot ToWebROSHotSpot() { HotSpotService.ROSHotSpot rosHot = new HotSpotService.ROSHotSpot(); rosHot.SeatNO = this.ShopNO; rosHot.HotSpotPoints = new ObservableCollection <HotSpotService.Point>(); foreach (Point hotSpotPoint in HotSpotPoints) { HotSpotService.Point point = new HotSpotService.Point(); point.X = hotSpotPoint.X; point.Y = hotSpotPoint.Y; rosHot.HotSpotPoints.Add(point); } rosHot.TextInfo = new HotSpotService.HotSpotText(); rosHot.TextInfo.Text = this.TextInfo.Text; rosHot.TextInfo.TextLeft = this.TextInfo.TextLeft; rosHot.TextInfo.TextTop = this.TextInfo.TextTop; rosHot.TextInfo.TextIsVertical = this.TextInfo.TextIsVertical; rosHot.TextInfo.TextVerticalCenterX = this.TextInfo.TextScaleCenterX; rosHot.TextInfo.TextVerticalCenterY = this.TextInfo.TextScaleCenterY; rosHot.TextInfo.TextVerticalAngle = this.TextInfo.TextVerticalAngle; rosHot.TextInfo.FontColor = this.TextInfo.FontColor; rosHot.TextInfo.FontFamily = this.TextInfo.FontFamily; rosHot.TextInfo.TextScaleCenterX = this.TextInfo.TextScaleCenterX; rosHot.TextInfo.TextScaleCenterY = this.TextInfo.TextScaleCenterY; rosHot.TextInfo.TextScaleX = this.TextInfo.TextScaleX; rosHot.TextInfo.TextScaleY = this.TextInfo.TextScaleY; return(rosHot); }
public ROSHotSpot(HotSpotService.ROSHotSpot item) { //JToken jtoken = item.First; //this.ShopNO = item["ShopNO"].ToObject<string>(); //while (jtoken != null)//loop through columns //{ // JProperty property = (JProperty)jtoken; // switch (property.Name) // { //case "ShopNO": this.ShopNO = item.SeatNO; // break; //case "ImageWidth": //this.ImageWidth = item.ImageWidth; // break; //case "ImageHeight": //this.ImageHeight = item.ImageHeight; // break; //case "HotSpotPoints": // JArray items = (JArray)item["HotSpotPoints"]; this.HotSpotPoints = fromArray(item.HotSpotPoints); // break; //case "TextInfo": //JObject jObject = property.Value.ToObject<JObject>(); this.TextInfo = new HotSpotText(item.TextInfo); // break; //case "ToolTip": this.ToolTip = item.ToolTip; // break; // } // jtoken = jtoken.Next; //} }