public AnnotationEditorView(AnnotationEditorModel model) { _model = model; _model.UpdateContent += OnUpdateContent; _model.UpdateStates += OnUpdateStates; InitializeComponent(); _existingMessagesDisplay.Navigating += _existingMessagesDisplay_Navigating; Visible = model.IsVisible; ModalDialogMode = true; _newMessage.Font = model.FontForNewMessage; //a signal to keep palaso localization helper from messing with our font _annotationLabel.UseMnemonic = false; _annotationLabel.Font = model.FontForLabel; }
public AnnotationEditorView(AnnotationEditorModel model) { _model = model; _model.UpdateContent += OnUpdateContent; _model.UpdateStates += OnUpdateStates; InitializeComponent(); Visible = model.IsVisible; ModalDialogMode = true; //needs to be primed this way SetDocumentText("<html><head></head><body></body></html>"); _newMessage.Font = model.FontForNewMessage; //a signal to keep palaso localiztion helper from messing with our font _annotationLabel.UseMnemonic = false; _annotationLabel.Font = model.FontForLabel; }
public AnnotationEditorView(AnnotationEditorModel model) { _model = model; _model.UpdateContent += OnUpdateContent; _model.UpdateStates += OnUpdateStates; InitializeComponent(); Visible = model.IsVisible; ModalDialogMode = true; //needs to be primed this way SetDocumentText(@"<html><head></head><body></body></html>"); _newMessage.Font = model.FontForNewMessage; //a signal to keep palaso localiztion helper from messing with our font _annotationLabel.UseMnemonic = false; _annotationLabel.Font = model.FontForLabel; }
private void ShowBrowser(IEnumerable<AnnotationRepository> repositories) { //TODO (jh/jh): something here seems screwed up... we create a NotesInProjectViewModel here, and yet so does the NotesBrowserPage var messageSelected = new MessageSelectedEvent(); var chorusNotesDisplaySettings = new ChorusNotesDisplaySettings() { WritingSystemForNoteLabel = new TestWritingSystem("Algerian"), WritingSystemForNoteContent = new TestWritingSystem("Bradley Hand ITC") }; NotesInProjectViewModel notesInProjectModel = new NotesInProjectViewModel(new ChorusUser("Bob"), repositories, chorusNotesDisplaySettings, new ConsoleProgress()); var annotationModel = new AnnotationEditorModel(new ChorusUser("bob"), messageSelected, StyleSheet.CreateFromDisk(), new EmbeddedMessageContentHandlerRepository(), new NavigateToRecordEvent(), chorusNotesDisplaySettings); AnnotationEditorView annotationView = new AnnotationEditorView(annotationModel); annotationView.ModalDialogMode=false; var page = new NotesBrowserPage((unusedRepos,progress)=>notesInProjectModel, repositories, annotationView); page.Dock = DockStyle.Fill; var form = new Form(); form.Size = new Size(700,600); form.Controls.Add(page); Application.EnableVisualStyles(); Application.Run(form); }