public void Init()
 {
     foreach (var v in MainViewModel.mainViewModel.ActorList)
     {
         var e = new EntityShow()
         {
             Target = v.TargetObject, IconImage = v.IconImage
         };
         AllEntityList.Add(e);
         ShowEntityList.Add(e);
     }
     foreach (var v in MainViewModel.mainViewModel.EventList)
     {
         var e = new EntityShow()
         {
             Target = v.TargetObject, IconImage = v.IconImage
         };
         AllEntityList.Add(e);
         ShowEntityList.Add(e);
     }
     foreach (var v in MainViewModel.mainViewModel.GroupList)
     {
         var e = new EntityShow()
         {
             Target = v.TargetObject, IconImage = v.IconImage
         };
         AllEntityList.Add(e);
         ShowEntityList.Add(e);
     }
     foreach (var v in MainViewModel.mainViewModel.LocationList)
     {
         var e = new EntityShow()
         {
             Target = v.TargetObject, IconImage = v.IconImage
         };
         AllEntityList.Add(e);
         ShowEntityList.Add(e);
     }
     foreach (var v in MainViewModel.mainViewModel.StuffList)
     {
         var e = new EntityShow()
         {
             Target = v.TargetObject, IconImage = v.IconImage
         };
         AllEntityList.Add(e);
         ShowEntityList.Add(e);
     }
     foreach (var v in MainViewModel.mainViewModel.TaskList)
     {
         var e = new EntityShow()
         {
             Target = v.TargetObject, IconImage = v.IconImage
         };
         AllEntityList.Add(e);
         ShowEntityList.Add(e);
     }
     OnPropertyChanged("TotalNo");
 }
        //public void FilterTarget(string filter)
        //{
        //    _TargetFilter = filter;
        //    ShowTargetEntityList.Clear();
        //    AllEntityList.ForEach(v =>
        //    {
        //        if (IsFit(v, filter))
        //            ShowTargetEntityList.Add(v);
        //    });

        //}
        bool IsFit(EntityShow obj, string filter)
        {
            if (string.IsNullOrEmpty(filter))
            {
                return(true);
            }
            if (obj.Name.IndexOf(filter, 0, StringComparison.OrdinalIgnoreCase) >= 0)
            {
                return(true);
            }
            return(false);
        }
 bool EntityIsTask(EntityShow entity)
 {
     if (entity == null || entity.Target == null)
     {
         return(false);
     }
     if ((entity.Target as ITask) != null)
     {
         return(true);
     }
     if ((entity.Target as TaskDetailViewModel) != null)
     {
         return(true);
     }
     return(false);
 }
 bool EntityIsStuff(EntityShow entity)
 {
     if (entity == null || entity.Target == null)
     {
         return(false);
     }
     if ((entity.Target as IStuff) != null)
     {
         return(true);
     }
     if ((entity.Target as StuffDetailViewModel) != null)
     {
         return(true);
     }
     return(false);
 }
 bool EntityIsLocation(EntityShow entity)
 {
     if (entity == null || entity.Target == null)
     {
         return(false);
     }
     if ((entity.Target as ILocation) != null)
     {
         return(true);
     }
     if ((entity.Target as LocationDetailViewModel) != null)
     {
         return(true);
     }
     return(false);
 }
 bool EntityIsGroup(EntityShow entity)
 {
     if (entity == null || entity.Target == null)
     {
         return(false);
     }
     if ((entity.Target as IGroup) != null)
     {
         return(true);
     }
     if ((entity.Target as GroupDetailViewModel) != null)
     {
         return(true);
     }
     return(false);
 }
 bool EntityIsEvent(EntityShow entity)
 {
     if (entity == null || entity.Target == null)
     {
         return(false);
     }
     if ((entity.Target as IEvent) != null)
     {
         return(true);
     }
     if ((entity.Target as EventDetailViewModel) != null)
     {
         return(true);
     }
     return(false);
 }
 bool EntityIsActor(EntityShow entity)
 {
     if (entity == null || entity.Target == null)
     {
         return(false);
     }
     if ((entity.Target as IActor) != null)
     {
         return(true);
     }
     if ((entity.Target as ActorDetailViewModel) != null)
     {
         return(true);
     }
     return(false);
 }
 public void Init()
 {
     foreach (var v in MainViewModel.mainViewModel.ActorList)
     {
         var e = new EntityShow()
         {
             Target = v.TargetObject, IconImage = v.IconImage
         };
         AllEntityList.Add(e);
         ShowSourceEntityList.Add(e);
         ShowTargetEntityList.Add(e);
     }
     foreach (var v in MainViewModel.mainViewModel.EventList)
     {
         var e = new EntityShow()
         {
             Target = v.TargetObject, IconImage = v.IconImage
         };
         AllEntityList.Add(e);
         ShowSourceEntityList.Add(e);
         ShowTargetEntityList.Add(e);
     }
     foreach (var v in MainViewModel.mainViewModel.GroupList)
     {
         var e = new EntityShow()
         {
             Target = v.TargetObject, IconImage = v.IconImage
         };
         AllEntityList.Add(e);
         ShowSourceEntityList.Add(e);
         ShowTargetEntityList.Add(e);
     }
     foreach (var v in MainViewModel.mainViewModel.LocationList)
     {
         var e = new EntityShow()
         {
             Target = v.TargetObject, IconImage = v.IconImage
         };
         AllEntityList.Add(e);
         ShowSourceEntityList.Add(e);
         ShowTargetEntityList.Add(e);
     }
     foreach (var v in MainViewModel.mainViewModel.StuffList)
     {
         var e = new EntityShow()
         {
             Target = v.TargetObject, IconImage = v.IconImage
         };
         AllEntityList.Add(e);
         ShowSourceEntityList.Add(e);
         ShowTargetEntityList.Add(e);
     }
     foreach (var v in MainViewModel.mainViewModel.TaskList)
     {
         var e = new EntityShow()
         {
             Target = v.TargetObject, IconImage = v.IconImage
         };
         AllEntityList.Add(e);
         ShowSourceEntityList.Add(e);
         ShowTargetEntityList.Add(e);
     }
     RelationTypeList.ForEach(v => ShowRelationTypeList.Add(v));
 }