public AnnotationEditorModel(IChorusUser user, MessageSelectedEvent messageSelectedEventToSubscribeTo, StyleSheet styleSheet, EmbeddedMessageContentHandlerRepository embeddedMessageContentHandlerRepository, NavigateToRecordEvent navigateToRecordEventToRaise, ChorusNotesDisplaySettings displaySettings) { _user = user; m_embeddedMessageContentHandlerRepository = embeddedMessageContentHandlerRepository; _navigateToRecordEventToRaise = navigateToRecordEventToRaise; _styleSheet = styleSheet; _displaySettings = displaySettings; messageSelectedEventToSubscribeTo.Subscribe(SetAnnotationAndFocussedMessage); EventToRaiseForChangedMessage = messageSelectedEventToSubscribeTo; }
//TODO: think about or merge these two constructors. this one is for when we're just //showing the control with a single annotation... it isn't tied to a list of messages. public AnnotationEditorModel(IChorusUser user, StyleSheet styleSheet, EmbeddedMessageContentHandlerRepository embeddedMessageContentHandlerRepository, Annotation annotation, NavigateToRecordEvent navigateToRecordEventToRaise, ChorusNotesDisplaySettings displaySettings, bool showLabelAsHyperlink) { _user = user; m_embeddedMessageContentHandlerRepository = embeddedMessageContentHandlerRepository; _styleSheet = styleSheet; _annotation = annotation; _navigateToRecordEventToRaise = navigateToRecordEventToRaise; _displaySettings = displaySettings; _showLabelAsHyperLink = showLabelAsHyperlink; }
public AnnotationEditorModel(IChorusUser user, MessageSelectedEvent messageSelectedEventToSubscribeTo, StyleSheet styleSheet, EmbeddedMessageContentHandlerRepository embeddedMessageContentHandlerRepository, NavigateToRecordEvent navigateToRecordEventToRaise, ChorusNotesDisplaySettings displaySettings) { _user = user; m_embeddedMessageContentHandlerRepository = embeddedMessageContentHandlerRepository; _navigateToRecordEventToRaise = navigateToRecordEventToRaise; _styleSheet = styleSheet; _displaySettings = displaySettings; //CurrentWritingSystem = _displaySettings.First(); messageSelectedEventToSubscribeTo.Subscribe((annotation, message) => SetAnnotationAndFocussedMessage(annotation, message)); EventToRaiseForChangedMessage = messageSelectedEventToSubscribeTo; NewMessageText = string.Empty; }