private void magix_forms_controls_label(object sender, ActiveEventArgs e) { Node ip = Ip(e.Params); if (ShouldInspect(ip)) { Inspect(ip); return; } Label ret = new Label(); FillOutParameters(e.Params, ret); Node node = ip["_code"].Get<Node>(); if (node.ContainsValue("value")) ret.Value = node["value"].Get<string>(); if (node.ContainsValue("tag")) ret.Tag = node["tag"].Get<string>(); if (node.ContainsValue("for")) ret.For = node["for"].Get<string>(); ip["_ctrl"].Value = ret; }
private void magix_forms_controls_rating(object sender, ActiveEventArgs e) { Node ip = Ip(e.Params); if (ShouldInspect(ip)) { Inspect(ip); return; } Node codeNode = ip["_code"].Get<Node>(); Label ret = new Label(); FillOutParameters(e.Params, ret); ret.Tag = "video"; string src = ""; if (codeNode.ContainsValue("src")) src = codeNode["src"].Get<string>(); ret.Attributes.Add(new AttributeControl.Attribute("src", src)); ret.Attributes.Add(new AttributeControl.Attribute("controls", null)); ret.Value = "get a decent browser dude!"; ip["_ctrl"].Value = ret; }