コード例 #1
0
        protected override void InitViewPanes(RibbonTab tab)
        {
            this.Orientation = Orientation.Horizontal;

            _paneDocuments = new PaneDocuments();
            _paneDocuments.InitPane(_views, this, this.Panel1, tab);
            _paneDocuments._eventDataModified += new EventHandler(OnDataModified);

            this.Panel1.Controls.Add(_paneDocuments);
            _paneDocuments.ShowPane();

            //////////////////////////////////////////////////////////////////////////

            _paneNotes = new PaneNotes();
            _paneNotes.InitPane(_views, this, this.Panel2, tab);
            _paneNotes._eventDataModified += new EventHandler(OnDataModified);

            this.Panel2.Controls.Add(_paneNotes);
            _paneNotes.ShowPane();

            this.SplitterDistance = 350;

            CalculateScores();

            _paneDocuments.Select();
        }
コード例 #2
0
        public override void InitPane(ViewsManager views, View ownerView, SplitterPanel panel, RibbonTab tab)
        {
            base.InitPane(views, ownerView, panel, tab);

            _views.MainForm.sourceDocuments.CurrentChanged += OnCurrentDocumentChanged;

            var path = Path.GetDirectoryName(Assembly.GetExecutingAssembly()
                                             .Location);

            path = Path.Combine(path, "HtmlViewer");
            CefSharpSettings.LegacyJavascriptBindingEnabled = true;
            if (_viewType == DocumentViewType.Html_ListView)
            {
                _browser = new ChromiumWebBrowser(Path.Combine(path, "listview.html"));

                _browser.RegisterAsyncJsObject("boundAsync", new AsyncBoundListObject(this));
            }
            else if (_viewType == DocumentViewType.Html_CalenderView)
            {
                _browser = new ChromiumWebBrowser(Path.Combine(path, "calenderview.html"));

                _browser.RegisterAsyncJsObject("boundAsync", new AsyncBoundCalenderObject(this));
            }
            else if (_viewType == DocumentViewType.Html_MedaCyEntityView)
            {
                _browser = new ChromiumWebBrowser(Path.Combine(path, "entities.html"));
                _browser.RegisterAsyncJsObject("boundAsync", new AsyncBoundEntitiesObject(this));
            }
            else if (_viewType == DocumentViewType.Html_SpaCyEntityView)
            {
                _browser = new ChromiumWebBrowser(Path.Combine(path, "spacy_entities.html"));
                _browser.RegisterAsyncJsObject("boundAsync", new AsyncBoundSpacyEntitiesObject(this));
            }

            _browser.Dock = DockStyle.Fill;

            {
                if (ownerView.Name == "Columns RegEx")
                {
                    _paneColumnNotes = new PaneColumnNotes(NoteColumnName);

                    _paneColumnNotes.InitPane(views, ownerView, panel, tab);
                    _paneColumnNotes._eventDataModified += new EventHandler(OnDataModified);

                    _paneColumnNotes.ShowToolbar = false;

                    _paneColumnNotes.Dock = DockStyle.Fill;
                    _paneColumnNotes.ShowPane();

                    this.paneSplitter.Panel1.Controls.Add(_paneColumnNotes);
                }
                else if (ownerView.Name == "Default" || ownerView.Name == "ReviewML")
                {
                    _paneNotes = new PaneNotes(NoteColumnName);


                    _paneNotes.InitPane(views, ownerView, panel, tab);
                    _paneNotes._eventDataModified += new EventHandler(OnDataModified);

                    _paneNotes.ShowToolbar = false;

                    _paneNotes.Dock = DockStyle.Fill;
                    _paneNotes.ShowPane();

                    this.paneSplitter.Panel1.Controls.Add(_paneNotes);
                }

                this.paneSplitter.Panel1Collapsed = true;
                this.paneSplitter.Panel1.Hide();
            }

            this.paneSplitter.Panel2.Controls.Add(_browser);
        }