public static void Splash(WebBrowser web) { Marshalling.MarshallingHash ui = Marshalling.MarshallingHash.CreateMarshalling("splash.ui", () => { return(new Dictionary <string, dynamic>() { { "Width", 1320 }, { "Height", 700 }, { "Constraint-Width", "FIXED" }, { "Constraint-Height", "FIXED" }, { "BackColor", "Blue" }, { "ForeColor", "White" } }); }); Marshalling.MarshallingHash data = Marshalling.MarshallingHash.CreateMarshalling("splash", () => { return(new Dictionary <string, dynamic>() { { "Id", "splash" }, { "Text", "Easy WEB For Developers" }, { "Height", 100 }, { "Constraint-Height", "FIXED" } }); }); UXReadOnlyText ro = UXReadOnlyText.CreateUXReadOnlyText(data, new Marshalling.MarshallingHash("ui")); Marshalling.MarshallingHash top = Marshalling.MarshallingHash.CreateMarshalling("splash", () => { return(new Dictionary <string, dynamic>() { { "children", Marshalling.MarshallingList.CreateMarshalling("children", () => { return new List <IUXObject>() { ro }; }) } }); }); UXWindow win = UXWindow.CreateUXWindow("splash", top, ui); browser = web; win.Navigate(web); t = new Timer(); t.Interval = 3000; t.Tick += T_Tick; t.Start(); }
/// <summary> /// Render a label /// </summary> /// <param name="text">text to render</param> public void RenderControl(UXReadOnlyText text) { HTMLObject obj = new HTMLObject(this.project.Tools.Find(x => x.Path == "html" && x.Name == "readOnlyText")); text.Get("Width", (s, v) => { obj.Width = Convert.ToUInt32(v.Value); }); text.Get("Height", (s, v) => { obj.Height = Convert.ToUInt32(v.Value); }); text.Get("Constraint-Width", (x, y) => { EnumConstraint c; if (Enum.TryParse <EnumConstraint>(y.Value, out c)) { obj.ConstraintWidth = c; } else { obj.ConstraintWidth = EnumConstraint.AUTO; } }); text.Get("Constraint-Height", (x, y) => { EnumConstraint c; if (Enum.TryParse <EnumConstraint>(y.Value, out c)) { obj.ConstraintHeight = c; } else { obj.ConstraintHeight = EnumConstraint.AUTO; } }); RenderCSSProperties(text, obj.CSS); obj.Container = this.currentContainer; obj.HTML = String.Format(obj.HTML, text.Text); this.currentObject.Objects.Add(obj); this.project.Instances.Add(obj); }