/// <summary> /// Asigna el color /// </summary> public ProjectItemDefinitionBuilder WithForeground(BauMvvm.ViewModels.Media.MvvmColor foreground) { // Asigna la propiedad Item.Foreground = foreground; // Devuelve el generador return(this); }
public ExplorerProjectNodeViewModel(ExplorerProjectViewModel treeViewModel, IHierarchicalViewModel parent, string text, ProjectItemDefinitionModel itemDefinition, object tag = null, bool lazyLoad = true, BauMvvm.ViewModels.Media.MvvmColor foreground = null) : base(parent, text, tag, lazyLoad, foreground) { TreeViewModel = treeViewModel; ItemDefinition = itemDefinition; }
public LogListItemViewModel(LogListViewModel listViewModel, string type, string content, DateTime createdAt, BauMvvm.ViewModels.Media.MvvmColor color) : base(content, null, false, color) { // Asigna las propiedades ListViewModel = listViewModel; Type = type; Content = content; if (content.Length > 200) { Text = content.Substring(0, 200); } else { Text = content; } if (!string.IsNullOrWhiteSpace(Text)) { Text = Text.Replace("\r\n", " "); Text = Text.Replace("\r", " "); Text = Text.Replace("\n", " "); } CreatedAt = createdAt; // Asigna los comandos ShowDetailsCommand = new BauMvvm.ViewModels.BaseCommand(_ => ShowDetails()); }
public NodeRestViewModel(TreeRestApiViewModel trvTree, IHierarchicalViewModel parent, string text, TreeRestApiViewModel.NodeType type, object tag, bool bold, BauMvvm.ViewModels.Media.MvvmColor color = null) : base(trvTree, parent, text, type.ToString(), null, tag, true, bold, color) { switch (tag) { case null: switch (type) { case TreeRestApiViewModel.NodeType.ContextsRoot: Icon = TreeRestApiViewModel.IconType.ContextsRoot.ToString(); break; case TreeRestApiViewModel.NodeType.MethodsRoot: Icon = TreeRestApiViewModel.IconType.MethodsRoot.ToString(); break; } break; case RestApiModel: Type = TreeRestApiViewModel.NodeType.RestApi.ToString(); Icon = TreeRestApiViewModel.IconType.RestApi.ToString(); break; case ContextModel: Type = TreeRestApiViewModel.NodeType.Context.ToString(); Icon = TreeRestApiViewModel.IconType.Context.ToString(); LazyLoad = false; Children.Clear(); break; case MethodModel: Type = TreeRestApiViewModel.NodeType.Method.ToString(); Icon = TreeRestApiViewModel.IconType.Method.ToString(); LazyLoad = false; Children.Clear(); break; } }