/// <summary> /// Recursive connect function call /// </summary> /// <param name="ux">ux</param> /// <param name="web">web browser</param> protected void RecursiveConnect(IUXObject ux, WebBrowser web) { ux.Connect(web); foreach (IUXObject child in ux.Children) { RecursiveConnect(child, web); } }
/// <summary> /// Register a new beam /// </summary> /// <param name="name">name of this beam</param> /// <param name="source">source object</param> /// <param name="defaultValue">default value</param> public static Beam Register(string name, IUXObject source, dynamic defaultValue) { Beam b = new Beam(); b.propName = name; b.source = source; b.WriteProperty(defaultValue); return(b); }
/// <summary> /// Add a child into object /// </summary> /// <param name="child">child to add</param> public void Add(IUXObject child) { this.GetProperty("children").Add(() => { return(new List <dynamic>() { child }); }); }
/// <summary> /// Options to change (graphics attributes) /// </summary> /// <param name="d">disposition</param> /// <param name="w">constraint on width</param> /// <param name="h">constraint on height</param> /// <param name="b">background color</param> /// <param name="a">border color</param> /// <param name="f">font color</param> /// <param name="bs">border size</param> /// <param name="ps">padding size</param> /// <param name="obj">ux object</param> public void Options(Disposition d, EnumConstraint w, EnumConstraint h, CSSColor b, CSSColor a, CSSColor f, int bs, int ps, IUXObject obj) { this.disposition = d; this.constraintWidth = w; this.constraintHeight = h; this.backgroundColor = (CSSColor)b.Clone(); this.borderColor = (CSSColor)a.Clone(); this.textColor = (CSSColor)f.Clone(); this.borderSize = bs; this.paddingSize = ps; this.content = obj; }
/// <summary> /// Get the top-most window ux /// </summary> /// <returns>ux window</returns> public virtual IUXObject GetUXWindow() { IUXObject prop = this.GetProperty("parent") as IUXObject; if (prop != null) { return(prop.GetUXWindow()); } else { throw new NullReferenceException("parent vide"); } }
/// <summary> /// Render object /// </summary> /// <param name="obj">object</param> public void RenderControl(IUXObject obj) { if (obj is UXBox) { RenderControl(obj as UXBox); } else if (obj is UXButton) { RenderControl(obj as UXButton); } else if (obj is UXCheck) { RenderControl(obj as UXCheck); } else if (obj is UXCombo) { RenderControl(obj as UXCombo); } else if (obj is UXEditableText) { RenderControl(obj as UXEditableText); } else if (obj is UXSelectableText) { RenderControl(obj as UXSelectableText); } else if (obj is UXClickableText) { RenderControl(obj as UXClickableText); } else if (obj is UXClickableImage) { RenderControl(obj as UXClickableImage); } else if (obj is UXImage) { RenderControl(obj as UXImage); } else if (obj is UXFrame) { RenderControl(obj as UXFrame); } else if (obj is UXReadOnlyText) { RenderControl(obj as UXReadOnlyText); } else if (obj is UXViewSelectableDataTable) { RenderControl(obj as UXViewSelectableDataTable); } else if (obj is UXViewDataTable) { RenderControl(obj as UXViewDataTable); } else if (obj is UXTree) { RenderControl(obj as UXTree); } else if (obj is UXTable) { RenderControl(obj as UXTable); } else if (obj is UXRow) { RenderControl(obj as UXRow); } else if (obj is UXCell) { RenderControl(obj as UXCell); } else if (obj is UXWindow) { RenderControl(obj as UXWindow); } else if (obj is UXTreeItem) { RenderControl(obj as UXTreeItem); } else if (obj is BeamConnections.InteractiveBeam) { RenderControl(obj as BeamConnections.InteractiveBeam); } }
/// <summary> /// Update all registered properties of this beam /// for source /// </summary> /// <param name="uxObj">UX object</param> public void UpdateSource(IUXObject uxObj) { throw new NotImplementedException(); }
public InteractiveBeam(IUXObject x) { }