示例#1
0
        public NotesBrowserPage(NotesInProjectViewModel.Factory notesInProjectViewModelFactory, IEnumerable<AnnotationRepository> repositories, AnnotationEditorView annotationView)
        {
            InitializeComponent();
            this.Font = SystemFonts.MessageBoxFont;

            SuspendLayout();
            annotationView.ModalDialogMode = false;
            annotationView.Dock = DockStyle.Fill;
            annotationView.ModalDialogMode = false;
            annotationView.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            splitContainer1.Panel2.Padding = new Padding(3,34,3,3);//drop it below the search box of the other pain

            _notesInProjectModel = notesInProjectViewModelFactory(repositories, new NullProgress());
            _notesInProjectModel.EventToRaiseForChangedMessage = annotationView.EventToRaiseForChangedMessage;
            var notesInProjectView = new NotesInProjectView(_notesInProjectModel);
            notesInProjectView.Dock = DockStyle.Fill;
            splitContainer1.Panel1.Controls.Add(notesInProjectView);
            splitContainer1.Panel2.Controls.Add(annotationView);
            ResumeLayout();
        }
示例#2
0
        public NotesBrowserPage(NotesInProjectViewModel.Factory notesInProjectViewModelFactory,
                                IEnumerable <AnnotationRepository> repositories, AnnotationEditorView annotationView)
        {
            InitializeComponent();
            this.Font = SystemFonts.MessageBoxFont;

            _annotationView = annotationView;

            SuspendLayout();
            _annotationView.ModalDialogMode = false;
            _annotationView.Dock            = DockStyle.Fill;
            _annotationView.BorderStyle     = System.Windows.Forms.BorderStyle.FixedSingle;
            splitContainer1.Panel2.Padding  = new Padding(3, 34, 3, 3);        //drop it below the search box of the other pane

            _notesInProjectModel = notesInProjectViewModelFactory(repositories, new NullProgress());
            _notesInProjectModel.EventToRaiseForChangedMessage += _notesView_SelectionChanged;
            var notesInProjectView = new NotesInProjectView(_notesInProjectModel);

            notesInProjectView.Dock = DockStyle.Fill;

            splitContainer1.Panel1.Controls.Add(notesInProjectView);
            splitContainer1.Panel2.Controls.Add(_annotationView);
            ResumeLayout();
        }