Exemple #1
0
 public RestStudioViewModel(Controllers.IRestStudioController restStudioController)
 {
     // Asigna las propiedades
     RestStudioController = restStudioController;
     // Inicializa la solución
     Solution = new RestSolutionModel();
     // Inicializa los objetos
     TreeRestApiViewModel = new Explorers.TreeRestApiViewModel(this);
 }
Exemple #2
0
        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;
            }
        }