示例#1
0
        protected LinksViewModel(IEnumerable <string> model, InfoViewModel owner)
            : base(model)
        {
            Owner = owner;

            LinkItem = new SimpleCommand(LinkItem_Executed);

            UpdateCommands();
        }
示例#2
0
        protected ItemViewModel(T model)
        {
            Model = model;
            Info  = new InfoViewModel(Model.Info, this);

            AddAuthors = new SimpleCommand(AddAuthors_Executed)
            {
                CanBeExecuted = Info.Authors.Count == 0
            };
            AddSources = new SimpleCommand(AddSources_Executed)
            {
                CanBeExecuted = Info.Sources.Count == 0
            };
            AddComments = new SimpleCommand(AddComments_Executed)
            {
                CanBeExecuted = Info.Comments.Text.Length == 0
            };

            SetCosts = new SimpleCommand(SetCosts_Executed);

            Info.Authors.CollectionChanged += Authors_CollectionChanged;
            Info.Sources.CollectionChanged += Sources_CollectionChanged;
            Info.Comments.PropertyChanged  += Comments_PropertyChanged;
        }
 public SourcesViewModel(Sources model, InfoViewModel owner)
     : base(model, owner)
 {
     this.Model = model;
 }
示例#4
0
 public AuthorsViewModel(Authors model, InfoViewModel owner)
     : base(model, owner)
 {
     Model = model;
 }