public MarkerEditBoxPresentationModel(IMarkerEditBox view, IMarkerViewPreview preview, ISequenceRegistry sequenceRegistry) { this.View = view; this.preview = preview; this.sequenceRegistry = sequenceRegistry; this.CloseCommand = new DelegateCommand <object>(this.Close); this.SaveCommand = new DelegateCommand <object>(this.Save, this.CanSave); this.DeleteCommand = new DelegateCommand <object>(this.Delete); this.marker = new Marker(); this.sequenceRegistry.CurrentSequence.Markers.Add(this.marker); this.View.Model = this; this.preview.Model = this; }
public MarkerEditBoxPresentationModel(IMarkerEditBox view, IMarkerViewPreview preview, IProjectService projectService) { this.View = view; this.preview = preview; this.projectService = projectService; this.CloseCommand = new DelegateCommand <object>(this.Close); this.SaveCommand = new DelegateCommand <object>(this.Save, this.CanSave); this.DeleteCommand = new DelegateCommand <object>(this.Delete); this.marker = new Marker(); this.projectService.GetCurrentProject().Markers.Add(this.marker); this.View.Model = this; this.preview.Model = this; }