public bool IsReferencedBy(IGeneratorArea other) { if (other == this) { return(true); } else if (other == EmptyArea) { return(false); } else { foreach (IGeneratorComponent component in other.Components) { if (component.IsReferencing(this)) { return(true); } } return(false); } }
public static void Generate(IGeneratorArea area, string attachedProperties, string elementProperties, int indentation, IGeneratorColorTheme colorTheme, StreamWriter xamlWriter, string visibilityBinding, double width) { string s = GeneratorLayout.IndentationString(indentation); string Properties = $" Template=\"{{StaticResource {area.XamlName}}}\""; string WidthProperty = double.IsNaN(width) ? "" : $" HorizontalAlignment=\"Center\" Width=\"{width}\""; colorTheme.WriteXamlLine(xamlWriter, $"{s}<ContentControl{attachedProperties}{visibilityBinding}{Properties}{elementProperties}{WidthProperty}/>"); }
public override bool Connect(IGeneratorDomain domain) { bool IsConnected = false; if (Area == null) { IsConnected = true; Area = GeneratorArea.GeneratorAreaMap[BaseArea]; } return(IsConnected); }
public bool Connect(IGeneratorDomain domain, IGeneratorArea area) { bool IsConnected = false; if (Content == null) { IsConnected = true; Content = GeneratorPanel.Convert(LayoutBase.Content); } IsConnected |= Content.Connect(domain, area.Components); return(IsConnected); }
public override bool Connect(IGeneratorDomain domain) { bool IsConnected = false; if (ItemObject == null || ItemObjectProperty == null) { IsConnected = true; ItemObject = GeneratorObject.GeneratorObjectMap[BaseContainer.ItemObject]; ItemObjectProperty = (IGeneratorObjectPropertyItemList)GeneratorObjectProperty.GeneratorObjectPropertyMap[BaseContainer.ItemObjectProperty]; ItemNestedObject = GeneratorObject.GeneratorObjectMap[BaseContainer.ItemNestedObject]; ItemNestedArea = GeneratorArea.GeneratorAreaMap[BaseContainer.ItemNestedArea]; } return(IsConnected); }
public override bool IsReferencing(IGeneratorArea other) { if (Area == other) { return(true); } else if (Area == GeneratorArea.EmptyArea) { return(false); } else if (other.IsReferencedBy(Area)) { return(true); } else { return(false); } }
private static void BubbleSort(List <IGeneratorArea> Areas) { bool IsSorted; do { IsSorted = false; for (int i = 0; i < Areas.Count; i++) { for (int j = i + 1; j < Areas.Count; j++) { if (Areas[j].IsReferencedBy(Areas[i])) { IGeneratorArea Temp = Areas[i]; Areas[i] = Areas[j]; Areas[j] = Temp; IsSorted = true; } } } }while (IsSorted); }
public virtual bool IsReferencing(IGeneratorArea other) { return(false); }
public void Generate(IGeneratorArea area, Dictionary <IGeneratorArea, IGeneratorLayout> areaLayouts, IList <IGeneratorPage> pageList, IGeneratorDesign design, int indentation, IGeneratorPage currentPage, IGeneratorObject currentObject, IGeneratorColorTheme colorTheme, StreamWriter xamlWriter) { Content.Generate(areaLayouts, pageList, design, indentation, currentPage, currentObject, colorTheme, xamlWriter, ""); }