Ejemplo n.º 1
0
		public LayoutPartViewModel(LayoutPartDescriptionViewModel layoutPartDescriptionViewModel)
		{
			LayoutPartDescriptionViewModel = layoutPartDescriptionViewModel;
			LayoutPart = new LayoutPart()
			{
				DescriptionUID = LayoutPartDescriptionViewModel.LayoutPartDescription.UID,
				UID = Guid.NewGuid(),
			};
			Initialize();
			LayoutPart.Properties = Content.Properties;
		}
Ejemplo n.º 2
0
		public LayoutPartViewModel(LayoutPart layoutPart, ILayoutPartPresenter layoutPartPresenter, ILayoutPartContent parent = null)
		{
			LayoutPart = layoutPart;
			LayoutPartPresenter = layoutPartPresenter;
			Content = LayoutPartPresenter.CreateContent((ILayoutProperties)LayoutPart.Properties);
			IconSource = LayoutPartPresenter.IconSource;
			Title = LayoutPart.Title ?? LayoutPartPresenter.Name;
			if (Content is ILayoutPartContent)
				((ILayoutPartContent)Content).SetLayoutPartContainer(this);
			Parent = parent;
		}
Ejemplo n.º 3
0
		private static ILayoutPartDescription GetDescription(LayoutPart layoutPart)
		{
			return layoutPart == null || !_map.ContainsKey(layoutPart.DescriptionUID) ? null : _map[layoutPart.DescriptionUID];
		}
Ejemplo n.º 4
0
		public LayoutPartViewModel(LayoutPart layoutPart, ILayoutPartDescription description)
		{
			LayoutPart = layoutPart;
			Description = description;
		}
Ejemplo n.º 5
0
		public LayoutPartViewModel(LayoutPart layoutPart)
		{
			LayoutPart = layoutPart;
			LayoutPartDescriptionViewModel = LayoutDesignerViewModel.Instance.LayoutElementsViewModel.GetLayoutPartDescription(LayoutPart.DescriptionUID) ?? new LayoutPartDescriptionViewModel(new UnknownLayoutPartDescription(LayoutPart.DescriptionUID));
			Initialize();
		}