/// <summary> /// 载入区域和文字 /// </summary> /// <param name="Times"></param> public void WidgetLoad(long Times, bool Widgetevent) { string Key = $" Widget_{Times}"; DataTable Data = CachePlant.GetResult(Key, () => { return(IO_AGVMapService.GetWidget(Times.ToString())); }); int Indexs = 0; foreach (DataRow item in Data.Rows) { if (item["WidgetNo"].ToString().Substring(0, 2).Equals("AR")) { NewArea((new Point() { X = Convert.ToDouble(item["X"].ToString()) * 10, Y = Convert.ToDouble(item["Y"].ToString()) * 10 }), item["Name"].ToString(), Indexs, item["BackColor"].ToString(), item["ForeColor"].ToString(), item["BorderColor"].ToString(), Convert.ToDouble(item["FontSize"].ToString()), Convert.ToDouble(item["Width"].ToString()) * 10, Convert.ToDouble(item["Height"].ToString()) * 10, true, item["FontPosition"].ToString(), Widgetevent); Indexs++; index = Indexs; } else if (item["WidgetNo"].ToString().Substring(0, 2).Equals("TE")) { FontNew((new Point() { X = Convert.ToDouble(item["X"].ToString()) * 10, Y = Convert.ToDouble(item["Y"].ToString()) * 10 }), item["Name"].ToString(), Indexs, Convert.ToDouble(item["FontSize"].ToString()), item["ForeColor"].ToString(), true, Widgetevent); Indexs++; TextInx = Indexs; } } TextInx++; index++; }