void AddEvent(object obj) { Debug.WriteLine("Add Event" + obj); //Get Selected BaseEvent SelectedEvent = obj as BaseEvent; //add to active if (!((EntityObject)ActiveNode).Events.Any(x => x.Id == SelectedEvent.Id)) { ((EntityObject)ActiveNode).Events.Add(SelectedEvent.GetActionlessClone()); } else { Debug.WriteLine("Event already added"); SetStatusBarText.Send("Event already added"); } }