Ejemplo n.º 1
0
        public ClassItemView(DependencyTreeItemView parent, IModel relatedModel) : base(parent, relatedModel)
        {
            Open = new RelayCommand(param => OpenFile(), param => CanOpen());

            var @class = RelatedModel as Class;

            if (@class == null)
            {
                return;
            }

            foreach (var field in @class.Fields)
            {
                Children.Add(new FieldItemView(this, field));
            }

            foreach (var property in @class.Properties)
            {
                Children.Add(new PropertyItemView(this, property));
            }

            foreach (var method in @class.Methods)
            {
                Children.Add(new MethodItemView(this, method));
            }
        }
        public NamespaceItemView(DependencyTreeItemView parent, IModel relatedModel) : base(parent, relatedModel)
        {
            var @namespace = RelatedModel as Namespace;

            if (@namespace == null)
            {
                return;
            }

            foreach (var @class in @namespace.Classes)
            {
                Children.Add(new ClassItemView(this, @class));
            }
        }
        public ProjectItemView(DependencyTreeItemView parent, IModel relatedModel) : base(parent, relatedModel)
        {
            var project = RelatedModel as Project;

            if (project == null)
            {
                return;
            }

            // Add view model references
            foreach (var ns in project.Namespaces)
            {
                Children.Add(new NamespaceItemView(this, ns));
            }
        }
 public PropertyItemView(DependencyTreeItemView parent, IModel relatedModel) : base(parent, relatedModel)
 {
 }
Ejemplo n.º 5
0
 public FieldItemView(DependencyTreeItemView parent, IModel relatedModel) : base(parent, relatedModel)
 {
 }