コード例 #1
0
 public ItemsViewModel(IInfoEntry head) : this()
 {
     Title              = head.Name;
     this.Head          = head;
     this.refreshLambda = head.LinkClick;
     this.FetchItemsAndReplace(null, head.LinkClick);
 }
コード例 #2
0
 public bool DeleteItem(IInfoEntry item)
 {
     try {
         this.dict.Remove(item.Id);
         return(true);
     }
     catch {
         return(false);
     }
 }
コード例 #3
0
 public bool UpdateItem(IInfoEntry item)
 {
     try {
         var entry = new T();
         entry.FromEntry(item);
         this.dict[entry.Id] = entry;
         return(true);
     }
     catch {
         return(false);
     }
 }
コード例 #4
0
 public bool AddItem(IInfoEntry item)
 {
     try {
         var entry = new T();
         entry.FromEntry(item);
         this.dict.Add(entry.Id, entry);
         return(true);
     }
     catch {
         return(false);
     }
 }
コード例 #5
0
 protected StoredBase(IInfoEntry entry)
 {
     this.Id          = entry.Id;
     this.Name        = entry.Name;
     this.Description = entry.Description;
 }
コード例 #6
0
 public void FromEntry(IInfoEntry entry)
 {
     this.Id          = entry.Id;
     this.Name        = entry.Name;
     this.Description = entry.Description;
 }
コード例 #7
0
 public ItemsPage(IInfoEntry head) : this(new ItemsViewModel(head))
 {
 }
コード例 #8
0
 public ItemDetailViewModel(IInfoEntry item = null)
 {
     Title = item?.Name;
     Item  = item;
 }
コード例 #9
0
        void Add(SearchPage sender, IInfoEntry item)
        {
            var _item = item as IInfoEntry;

            Items.Add(_item);
        }