public QueryItem(IStoryEntityObject obj) { Name = obj.Name; Memo = obj.Memo; IsSelected = false; ObjectID = obj.ObjectID; if (obj as IActor != null) { ObjectType = "Actor"; } if (obj as IEvent != null) { ObjectType = "Event"; } if (obj as IGroup != null) { ObjectType = "Group"; } if (obj as ILocation != null) { ObjectType = "Location"; } if (obj as IStuff != null) { ObjectType = "Stuff"; } if (obj as ITask != null) { ObjectType = "Task"; } }
protected virtual void LoadData(IStoryEntityObject target) { target.Name = Name; target.Memo = Memo; target.BeginTime = BeginTime; target.EndTime = EndTime; ParameterList.ForEach(v => target.ParameterList.Add(v.GetData())); NoteList.ForEach(v => target.NoteList.Add(v.Clone() as INote)); //KeyWordList.ForEach(v => target.KeyWordList.Add(v.ToString())); MeasureList.ForEach(v => target.MeasureList.Add(v.Clone() as IMeasure)); }
public void AddEntityAsExpressObject(IStoryEntityObject obj) { var eo = new ExpressObject(); eo.AddObject(obj); CurrentExpressObject = new ExpressObjectViewModel() { TargetObject = eo }; ExpressObjectList.Add(CurrentExpressObject); TargetObject.ExpressObjectList.Add(CurrentExpressObject.TargetObject); }
public IStoryEntityObject GetEntityByID(Guid id) { if (id == Guid.Empty) { return(null); } IStoryEntityObject o = GetEntityByID <IActor>(id); if (o != null) { return(o); } o = GetEntityByID <IEvent>(id); if (o != null) { return(o); } o = GetEntityByID <IGroup>(id); if (o != null) { return(o); } o = GetEntityByID <ITask>(id); if (o != null) { return(o); } o = GetEntityByID <IStuff>(id); if (o != null) { return(o); } o = GetEntityByID <ILocation>(id); if (o != null) { return(o); } return(null); }
public void RemoveEntity(IStoryEntityObject obj) { if (obj == null) { return; } if ((obj as IActor) != null) { ActorList.Remove(obj as IActor); return; } if ((obj as IEvent) != null) { EventList.Remove(obj as IEvent); return; } if ((obj as IStuff) != null) { StuffList.Remove(obj as IStuff); return; } if ((obj as IGroup) != null) { GroupList.Remove(obj as IGroup); return; } if ((obj as ITask) != null) { TaskList.Remove(obj as ITask); return; } if ((obj as ILocation) != null) { LocationList.Remove(obj as ILocation); return; } }