public XisList(EA.Repository repository, EA.Diagram diagram, XisWidget parent, string name, string searchBy = null, string orderBy = null) : base(repository, parent) { Element = XisWebHelper.CreateXisList(parent.Element, name, searchBy, orderBy); Items = new List<XisListItem>(); }
public XisMenu(EA.Repository repository, EA.Diagram diagram, XisWidget parent, string name, MenuType type) : base(repository, parent) { Element = XisWebHelper.CreateXisMenu(parent.Element, name, type); Groups = new List<XisMenuGroup>(); Items = new List<XisMenuItem>(); }
public XisSiteMap(EA.Repository repository, XisWidget parent, EA.Diagram diagram) : base(repository) { if (parent is XisInteractionSpace) { XisInteractionSpace it = parent as XisInteractionSpace; Element = XisWebHelper.CreateXisSiteMap(it.Element); it.Widgets.Add(this); } }
public XisLabel(EA.Repository repository, XisWidget parent, EA.Diagram diagram, string name) : base(repository) { Element = XisWebHelper.CreateXisLabel(parent.Element, name); if (parent is XisInteractionSpace) { XisInteractionSpace it = parent as XisInteractionSpace; it.Widgets.Add(this); } else if (parent is XisCompositeWidget) { XisCompositeWidget comp = parent as XisCompositeWidget; comp.Widgets.Add(this); } }
public XisTextBox(EA.Repository repository, XisWidget parent, EA.Diagram diagram, string name, string label = null, string hint = null, int lines = 1) : base(repository) { Element = XisWebHelper.CreateXisTextBox(parent.Element, name, label, hint, lines); if (parent is XisInteractionSpace) { XisInteractionSpace it = parent as XisInteractionSpace; it.Widgets.Add(this); } else if (parent is XisCompositeWidget) { XisCompositeWidget comp = parent as XisCompositeWidget; comp.Widgets.Add(this); } }
public XisCompositeWidget(EA.Repository repository, XisWidget parent) : base(repository) { Widgets = new List<XisWidget>(); // TODO: Review this addition! if (parent is XisInteractionSpace) { XisInteractionSpace it = parent as XisInteractionSpace; it.Widgets.Add(this); } else if (parent is XisCompositeWidget) { XisCompositeWidget comp = parent as XisCompositeWidget; comp.Widgets.Add(this); } }
public XisVisibilityBoundary(EA.Repository repository, EA.Diagram diagram, XisWidget parent, string name, bool create = false, bool view = false, bool edit = false) : base(repository) { Element = XisWebHelper.CreateXisVisibilityBoundary(parent.Element, name, create, view, edit); Parent = parent; if (parent is XisInteractionSpace) { XisInteractionSpace it = parent as XisInteractionSpace; it.Widgets.Add(this); } else if (parent is XisCompositeWidget) { XisCompositeWidget comp = parent as XisCompositeWidget; comp.Widgets.Add(this); } }
public XisButton(EA.Repository repository, XisWidget parent, EA.Diagram diagram, string name, string onTap = null) : base(repository) { if (parent is XisInteractionSpace) { XisInteractionSpace it = parent as XisInteractionSpace; Element = XisWebHelper.CreateXisButton(it.Element, name, onTap); it.Widgets.Add(this); } else if (parent is XisVisibilityBoundary) { XisVisibilityBoundary boundary = parent as XisVisibilityBoundary; Element = XisWebHelper.CreateXisButton(boundary.Element, name, onTap); boundary.Widgets.Add(this); } else if (parent is XisCompositeWidget) { XisCompositeWidget comp = parent as XisCompositeWidget; Element = XisWebHelper.CreateXisButton(comp.Element, name, onTap); comp.Widgets.Add(this); } }
public XisMenuItem(EA.Repository repository, EA.Diagram diagram, XisWidget parent, string name, string onTap = null) : base(repository) { if (parent is XisMenu) { Element = XisWebHelper.CreateXisMenuItem(parent.Element, name, onTap); XisMenu menu = parent as XisMenu; menu.Items.Add(this); menu.Widgets.Add(this); } else if (parent is XisMenuGroup) { Element = XisWebHelper.CreateXisMenuItem(parent.Element, name, onTap); XisMenuGroup group = parent as XisMenuGroup; group.Items.Add(this); group.Widgets.Add(this); } else if (parent is XisVisibilityBoundary) { XisVisibilityBoundary boundary = parent as XisVisibilityBoundary; Element = XisWebHelper.CreateXisMenuItem(boundary.Element, name, onTap); boundary.Widgets.Add(this); } }
public static XisSimpleWidget ProcessXisAttribute(EA.Repository repository, EA.Diagram diagram, XisWidget parent, EA.Attribute attribute, string entityName) { XisSimpleWidget widget = null; switch (attribute.Type.ToLower()) { case "int": case "double": case "string": widget = new XisTextBox(repository, parent, diagram, entityName + ToUpperFirst(attribute.Name) + "TxtBox", attribute.Name, attribute.Name); widget.SetEntityAttributeName(entityName + "." + attribute.Name); break; case "bool": case "boolean": // Dropdown widget = new XisDropdown(repository, parent, diagram, entityName + ToUpperFirst(attribute.Name) + "Dropdown", attribute.Name); widget.SetEntityAttributeName(entityName + "." + attribute.Name); break; case "date": widget = new XisDatePicker(repository, parent, diagram, entityName + ToUpperFirst(attribute.Name) + "DatePicker"); widget.SetEntityAttributeName(entityName + "." + attribute.Name); break; case "time": widget = new XisTimePicker(repository, parent, diagram, entityName + ToUpperFirst(attribute.Name) + "TimePicker"); widget.SetEntityAttributeName(entityName + "." + attribute.Name); break; default: break; } return widget; }
private static void ComputePositions(XisWidget widget, EA.Diagram diagram, EA.DiagramObject parent, EA.DiagramObject sibling) { if (widget is XisMenu) { //MessageBox.Show("MENU " + widget.Element.Name); ComputePositions(widget as XisMenu, diagram, parent, sibling); } else if (widget is XisList) { //MessageBox.Show("LIST " + widget.Element.Name); ComputePositions(widget as XisList, diagram, parent, sibling); } else if (widget is XisSimpleWidget) { //MessageBox.Show("SIMPLE " + widget.Element.Name); ComputePositions(widget as XisSimpleWidget, diagram, parent, sibling); } else if (widget is XisCompositeWidget) { //MessageBox.Show("COMPOSITE " + widget.Element.Name); ComputePositions(widget as XisCompositeWidget, diagram, parent, sibling); } }