/// <summary> /// 用于向 t_ElementProperty EntitySet 添加新对象的方法,已弃用。请考虑改用关联的 ObjectSet<T> 属性的 .Add 方法。 /// </summary> public void AddTot_ElementProperty(t_ElementProperty t_ElementProperty) { base.AddObject("t_ElementProperty", t_ElementProperty); }
public MonitorControl CreateControl(Canvas canvas, t_Control t, double width, double height, double x, double y) { if (t != null && t.ControlID > 0) { t_Element mElement = InitElement(t); mElement.Width = (int)width; mElement.Height = (int)height; mElement.ScreenX = (int)x; mElement.ScreenY = (int)y; mElement.ScreenID = _CurrentScreen.ScreenID; IEnumerable<t_ControlProperty> listObj = _DataContext.t_ControlProperties. Where(a => a.ControlID == t.ControlID); List<t_ElementProperty> listElementPro = new List<t_ElementProperty>(); foreach (t_ControlProperty cp in listObj) { t_ElementProperty tt = new t_ElementProperty(); tt.Caption = cp.Caption; tt.ElementID = mElement.ElementID; tt.PropertyNo = cp.PropertyNo; tt.PropertyValue = cp.DefaultValue; tt.PropertyName = cp.PropertyName; listElementPro.Add(tt); } var monitorControl = ShowElement(canvas, mElement, ElementSate.New, listElementPro); monitorControl.DesignMode(); return monitorControl; } return null; }
/// <summary> /// 创建新的 t_ElementProperty 对象。 /// </summary> /// <param name="elementID">ElementID 属性的初始值。</param> /// <param name="propertyNo">PropertyNo 属性的初始值。</param> public static t_ElementProperty Createt_ElementProperty(global::System.Int32 elementID, global::System.Int32 propertyNo) { t_ElementProperty t_ElementProperty = new t_ElementProperty(); t_ElementProperty.ElementID = elementID; t_ElementProperty.PropertyNo = propertyNo; return t_ElementProperty; }