public void OnOpened( object sender, EventArgs e ) { if (AddNew) { if (EditEvent == null) { EditEvent = new TimelineEventEx(); EditEvent.Title = String.Empty; EditEvent.Description = String.Empty; EditEvent.IsDuration = false; EditEvent.StartDate = DateTime.Now; EditEvent.EndDate = DateTime.Now; EditEvent.EventImage = String.Empty; EditEvent.TeaserEventImage = string.Empty; EditEvent.Video = String.Empty; EditEvent.Row = 0; } } else { EditEvent = new TimelineEventEx(); CopyEvent(Event, EditEvent); } this.DataContext = this; }
void OnEditClick( TimelineEventEx obj ) { EditEventWindow edit; edit = new EditEventWindow(); edit.Tray = timeline; edit.Event = obj; edit.Show(); }
private void CopyEvent( TimelineEventEx src, TimelineEventEx dest ) { dest.Title = src.Title; dest.Description = src.Description; dest.IsDuration = src.IsDuration; dest.StartDate = src.StartDate; dest.EndDate = src.EndDate; dest.EventImage = src.EventImage; dest.TeaserEventImage = src.TeaserEventImage; dest.Video = src.Video; }
void OnEditClick( TimelineEventEx obj ) { EditEventWindow edit; edit = new EditEventWindow(); edit.Tray = timeline; edit.Event = obj; edit.Show(); }