Esempio n. 1
0
        public void AddCheckedItem(TNDEntityItem entityItem)
        {
            var selectedTarget = this.SelectedTarget;

            if (selectedTarget != null)
            {
                selectedTarget.AddCheckedItem(entityItem);
            }
        }
Esempio n. 2
0
        public async Task Query(TNDTargetModel targetModel, TNDEntityItem entityItem, bool returnParent, bool returnThis, bool returnChildren)
        {
            var taskSearch = this.GetBuis().Query(targetModel, entityItem.MetaEntity, true, new object[] { entityItem.GetKeyValue() }, returnParent, returnThis, returnChildren);

            try {
                await taskSearch;
            } catch (Exception exception) {
                throw;
            }
        }
Esempio n. 3
0
 public Tuple <int, TNDEntityItem> GetCheckedItem(TNDEntityItem entityItem)
 {
     for (int idx = 0; idx < this.CheckedItems.Count; idx++)
     {
         TNDEntityItem checkedItem = this.CheckedItems[idx];
         if (checkedItem == null)
         {
             continue;
         }
         if (entityItem.Equals(checkedItem))
         {
             return(Tuple.Create(idx, checkedItem));
         }
     }
     return(null);
 }
Esempio n. 4
0
        public void RemoveCheckedItem(TNDEntityItem entityItem)
        {
            if (entityItem == null)
            {
                return;
            }
            entityItem.IsChecked = false;
            var idxCheckedItem = this.GetCheckedItem(entityItem);

            if (idxCheckedItem == null)
            {
                // do nothing
            }
            else
            {
                this.CheckedItems.RemoveAt(idxCheckedItem.Item1);
                idxCheckedItem.Item2.IsChecked = false;
            }
        }
Esempio n. 5
0
        public void AddCheckedItem(TNDEntityItem entityItem)
        {
            if (entityItem == null)
            {
                return;
            }
            entityItem.IsChecked = true;
            var idxCheckedItem = this.GetCheckedItem(entityItem);

            if (idxCheckedItem == null)
            {
                this.CheckedItems.Add(entityItem);
            }
            else
            {
                this.CheckedItems.RemoveAt(idxCheckedItem.Item1);
                this.CheckedItems.Add(entityItem);
            }
        }