/// <summary> /// Export master object container /// </summary> /// <returns>ux cell</returns> public UXFramework.UXCell ExportMasterObjectContainer() { UXFramework.UXReadOnlyText text = UXFramework.Creation.CreateReadOnlyText(null, "MasterObject", string.Empty); this.Get("MasterObject", (x, y) => { text = UXFramework.Creation.CreateReadOnlyText(null, x, y.Value.Container); }); return(UXFramework.Creation.CreateCell(null, text)); }
/// <summary> /// Export path and name /// </summary> /// <returns>ux cell</returns> public UXFramework.UXCell ExportToolPathName() { UXFramework.UXReadOnlyText text = UXFramework.Creation.CreateReadOnlyText(null, "Tool", string.Empty); this.Get("Tool", (x, y) => { text = UXFramework.Creation.CreateReadOnlyText(null, x, y.Value.Path.ToString() + "/" + y.Value.FileName + "." + y.Value.Extension); }); return(UXFramework.Creation.CreateCell(null, text)); }
/// <summary> /// Export objects /// Create a table with all objects information /// </summary> /// <returns>ux table</returns> public UXFramework.UXTable ExportObjectsToTable() { UXFramework.UXRow[] rows = new UXFramework.UXRow[this.Objects.Count()]; uint index = 0; foreach (HTMLObject h in this.Objects) { UXFramework.UXReadOnlyText text = UXFramework.Creation.CreateReadOnlyText(null, "HtmlObject." + index.ToString(), h.ToString()); UXFramework.UXCell cell = UXFramework.Creation.CreateCell(null, text); rows[index] = UXFramework.Creation.CreateRow(1, null, cell); ++index; } return(UXFramework.Creation.CreateTable("Objects", 1, Convert.ToUInt32(this.Objects.Count()), null, rows)); }
/// <summary> /// List of each area /// Creates a table with all horizontally and vertically /// </summary> /// <returns>ux table</returns> public UXFramework.UXTable ExportAreasToTable() { UXFramework.UXRow[] rows = new UXFramework.UXRow[this.Horizontally.Count()]; uint indexHorizontally = 0; foreach (MasterObject ho in this.Horizontally) { UXFramework.UXCell[] cells = new UXFramework.UXCell[ho.Vertically.Count()]; uint indexVertically = 0; foreach (MasterObject vo in ho.Vertically) { UXFramework.UXReadOnlyText text = UXFramework.Creation.CreateReadOnlyText(null, "obj." + indexHorizontally.ToString() + "." + indexVertically.ToString(), vo.ToString()); cells[indexVertically] = UXFramework.Creation.CreateCell(null, text); ++indexVertically; } rows[indexHorizontally] = UXFramework.Creation.CreateRow(Convert.ToUInt32(cells.Count()), null, cells); } return(UXFramework.Creation.CreateTable("Areas", 1, Convert.ToUInt32(rows.Count()), null, rows)); }
public UXFramework.UXTree CreateTreeView(uint index, Library.Project p, Library.Node <string, Library.Accessor> projectTree) { Marshalling.MarshallingHash hash; List <UXFramework.UXRow> subtree = new List <UXFramework.UXRow>(); foreach (dynamic node in projectTree.Elements) { hash = Marshalling.MarshallingHash.CreateMarshalling("hash", () => { return(new Dictionary <string, dynamic>() { { "Width", 20 }, { "Height", 25 }, { "Constraint-Width", "FIXED" }, { "Constraint-Height", "FIXED" }, { "ImageWidth", 16 }, { "ImageHeight", 16 } }); }); UXFramework.UXBox box1 = UXFramework.Creation.CreateBox(null, 16, 16); UXFramework.UXImage im2 = UXFramework.Creation.CreateImage(hash, "image", "left.png"); UXFramework.UXReadOnlyText ro = UXFramework.Creation.CreateReadOnlyText(null, "text", node.NodeValue); hash = Marshalling.MarshallingHash.CreateMarshalling("hash", () => { return(new Dictionary <string, dynamic>() { { "Width", 32 }, { "Height", 25 }, { "Constraint-Width", "FIXED" }, { "Constraint-Height", "FIXED" }, { "align", "left" }, { "Border", "2px solid Blue" } }); }); UXFramework.UXCell cLeaf1 = UXFramework.Creation.CreateCell(hash, box1); UXFramework.UXCell cLeaf3 = UXFramework.Creation.CreateCell(hash, im2); hash = Marshalling.MarshallingHash.CreateMarshalling("hash", () => { return(new Dictionary <string, dynamic>() { { "Height", 25 }, { "Constraint-Height", "FIXED" }, { "align", "left" }, }); }); UXFramework.UXCell cLeaf2 = UXFramework.Creation.CreateCell(hash, ro); hash = Marshalling.MarshallingHash.CreateMarshalling("hash", () => { return(new Dictionary <string, dynamic>() { { "IsSelectable", true }, { "Background-Selectable", "#0B5395" }, { "Height", 25 }, { "Constraint-Height", "FIXED" }, }); }); UXFramework.UXRow row = UXFramework.Creation.CreateRow(3, hash, cLeaf1, cLeaf2, cLeaf3); row.SetUpdate(x => { Library.Node <string, Library.Accessor> n = x.GetProperty("ProjectRef").Value; n.IsSelected = true; currentNode = n; this.OpenProject(); }); subtree.Add(row); } if (projectTree.IsSelected) { foreach (Library.Node <string, Library.Accessor> sub in projectTree.SubNodes) { hash = Marshalling.MarshallingHash.CreateMarshalling("hash", () => { return(new Dictionary <string, dynamic>() { { "Width", 20 }, { "Height", 25 }, { "Constraint-Width", "FIXED" }, { "Constraint-Height", "FIXED" }, { "ImageWidth", 16 }, { "ImageHeight", 16 } }); }); UXFramework.UXReadOnlyText ro1 = UXFramework.Creation.CreateReadOnlyText(hash, "text", "+"); UXFramework.UXImage im2 = UXFramework.Creation.CreateImage(hash, "image", "left.png"); UXFramework.UXReadOnlyText ro = UXFramework.Creation.CreateReadOnlyText(null, "text", sub.NodeValue); hash = Marshalling.MarshallingHash.CreateMarshalling("hash", () => { return(new Dictionary <string, dynamic>() { { "Width", 32 }, { "Height", 25 }, { "Constraint-Width", "FIXED" }, { "Constraint-Height", "FIXED" }, { "Border", "2px solid Blue" } }); }); UXFramework.UXCell cNode1 = UXFramework.Creation.CreateCell(hash, ro1); UXFramework.UXCell cNode3 = UXFramework.Creation.CreateCell(hash, im2); hash = Marshalling.MarshallingHash.CreateMarshalling("hash", () => { return(new Dictionary <string, dynamic>() { { "Height", 25 }, { "Constraint-Height", "FIXED" }, { "Disposition", "LEFT_MIDDLE" }, { "Border", "2px solid Blue" } }); }); UXFramework.UXCell cNode2 = UXFramework.Creation.CreateCell(hash, ro); hash = Marshalling.MarshallingHash.CreateMarshalling("hash", () => { return(new Dictionary <string, dynamic>() { { "IsSelectable", true }, { "Background-Selectable", "#0B5395" }, { "Height", 25 }, { "Constraint-Height", "FIXED" }, }); }); UXFramework.UXRow row = UXFramework.Creation.CreateRow(3, hash, cNode1, cNode2, cNode3); subtree.Add(row); } } hash = Marshalling.MarshallingHash.CreateMarshalling("hash", () => { return(new Dictionary <string, dynamic>() { { "Width", 20 }, { "Height", 25 }, { "Constraint-Width", "FIXED" }, { "Constraint-Height", "FIXED" }, }); }); UXFramework.UXReadOnlyText ro2; if (projectTree.SubNodes.Count() > 0) { if (projectTree.IsSelected) { ro2 = UXFramework.Creation.CreateReadOnlyText(hash, "text", "-"); } else { ro2 = UXFramework.Creation.CreateReadOnlyText(hash, "text", "+"); } } else { ro2 = UXFramework.Creation.CreateReadOnlyText(hash, "text", " "); } UXFramework.UXImage image2 = UXFramework.Creation.CreateImage(hash, "image", "left.png"); hash = Marshalling.MarshallingHash.CreateMarshalling("hash", () => { return(new Dictionary <string, dynamic>() { { "Width", 32 }, { "Height", 25 }, { "Constraint-Width", "FIXED" }, { "Constraint-Height", "FIXED" }, { "Border", "2px solid Blue" } }); }); UXFramework.UXCell c3 = UXFramework.Creation.CreateCell(hash, ro2); UXFramework.UXCell c4 = UXFramework.Creation.CreateCell(hash, image2); hash = Marshalling.MarshallingHash.CreateMarshalling("hash", () => { return(new Dictionary <string, dynamic>() { { "Height", 25 }, { "Constraint-Height", "FIXED" }, }); }); UXFramework.UXReadOnlyText roText = UXFramework.Creation.CreateReadOnlyText(hash, "text", projectTree.NodeValue); hash = Marshalling.MarshallingHash.CreateMarshalling("hash", () => { return(new Dictionary <string, dynamic>() { { "Height", 25 }, { "Constraint-Height", "FIXED" }, { "Border", "2px solid Blue" }, { "Disposition", "LEFT_MIDDLE" }, }); }); UXFramework.UXCell c5 = UXFramework.Creation.CreateCell(hash, roText); hash = Marshalling.MarshallingHash.CreateMarshalling("hash", () => { return(new Dictionary <string, dynamic>() { { "Id", "row" + index.ToString() }, { "IsSelectable", true }, { "IsClickable", true }, { "ProjectRef", projectTree }, { "Background-Selectable", "#0B5395" }, { "Background-Clickable", "#C8E3FB" }, { "Height", 25 }, { "Constraint-Height", "FIXED" }, { "Disposition", "LEFT_TOP" }, { "align", "left" }, { "valign", "top" } }); }); UXFramework.UXRow first = UXFramework.Creation.CreateRow(3, hash, c3, c5, c4); hash = Marshalling.MarshallingHash.CreateMarshalling("hash", () => { return(new Dictionary <string, dynamic>() { { "Disposition", "LEFT_TOP" }, { "align", "left" }, { "valign", "top" }, { "Width", 220 }, { "Constraint-Width", "FIXED" }, { "ColumnCount", 3 }, { "LineCount", subtree.Count() + 1 }, }); }); UXFramework.UXTree tree = UXFramework.Creation.CreateTree(hash, "tree", first, subtree.ToArray()); return(tree); }