示例#1
0
        private void AddConfigurableControls()
        {
            // Load the controls.

            // 1. Initialize the preview pane (lower pane)
            m_previewPane            = new XmlView(0, "publicationNew", false);
            m_previewPane.Cache      = m_cache;
            m_previewPane.StyleSheet = FontHeightAdjuster.StyleSheetFromPropertyTable(m_propertyTable);

            BasicPaneBarContainer pbc = new BasicPaneBarContainer();

            pbc.Init(m_mediator, m_propertyTable, m_previewPane);
            pbc.Dock         = DockStyle.Fill;
            pbc.PaneBar.Text = LexEdStrings.ksFindExampleSentenceDlgPreviewPaneTitle;
            panel2.Controls.Add(pbc);
            if (m_previewPane.RootBox == null)
            {
                m_previewPane.MakeRoot();
            }

            // 2. load the browse view. (upper pane)
            XmlNode xnBrowseViewControlParameters = this.BrowseViewControlParameters;

            // First create our Clerk, since we can't set it's OwningObject via the configuration/mediator/PropertyTable info.
            m_clerk = RecordClerkFactory.CreateClerk(m_mediator, m_propertyTable, xnBrowseViewControlParameters, true);
            m_clerk.OwningObject = m_owningSense;

            m_rbv = DynamicLoader.CreateObject(xnBrowseViewControlParameters.ParentNode.SelectSingleNode("dynamicloaderinfo")) as ConcOccurrenceBrowseView;
            m_rbv.Init(m_mediator, m_propertyTable, xnBrowseViewControlParameters, m_previewPane, m_clerk.VirtualListPublisher);
            m_rbv.CheckBoxChanged += m_rbv_CheckBoxChanged;
            // add it to our controls.
            BasicPaneBarContainer pbc1 = new BasicPaneBarContainer();

            pbc1.Init(m_mediator, m_propertyTable, m_rbv);
            pbc1.BorderStyle  = BorderStyle.FixedSingle;
            pbc1.Dock         = DockStyle.Fill;
            pbc1.PaneBar.Text = LexEdStrings.ksFindExampleSentenceDlgBrowseViewPaneTitle;
            panel1.Controls.Add(pbc1);

            CheckAddBtnEnabling();
        }
		private void AddConfigurableControls()
		{
			// Load the controls.

			// 1. Initialize the preview pane (lower pane)
			m_previewPane = new XmlView(0, "publicationNew", null, false);
			m_previewPane.Cache = m_cache;
			m_previewPane.StyleSheet = FontHeightAdjuster.StyleSheetFromMediator(m_mediator);

			BasicPaneBarContainer pbc = new BasicPaneBarContainer();
			pbc.Init(m_mediator, m_previewPane);
			pbc.Dock = DockStyle.Fill;
			pbc.PaneBar.Text = LexEdStrings.ksFindExampleSentenceDlgPreviewPaneTitle;
			panel2.Controls.Add(pbc);
			if (m_previewPane.RootBox == null)
				m_previewPane.MakeRoot();

			// 2. load the browse view. (upper pane)
			XmlNode xnBrowseViewControlParameters = this.BrowseViewControlParameters;

			// First create our Clerk, since we can't set it's OwningObject via the configuration/mediator/PropertyTable info.
			m_clerk = RecordClerkFactory.CreateClerk(m_mediator, xnBrowseViewControlParameters, true);
			m_clerk.OwningObject = m_owningSense;

			m_rbv = DynamicLoader.CreateObject(xnBrowseViewControlParameters.ParentNode.SelectSingleNode("dynamicloaderinfo")) as ConcOccurrenceBrowseView;
			m_rbv.Init(m_mediator, xnBrowseViewControlParameters, m_previewPane, m_clerk.VirtualListPublisher);
			m_rbv.CheckBoxChanged += new CheckBoxChangedEventHandler(m_rbv_CheckBoxChanged);
			// add it to our controls.
			BasicPaneBarContainer pbc1 = new BasicPaneBarContainer();
			pbc1.Init(m_mediator, m_rbv);
			pbc1.BorderStyle = BorderStyle.FixedSingle;
			pbc1.Dock = DockStyle.Fill;
			pbc1.PaneBar.Text = LexEdStrings.ksFindExampleSentenceDlgBrowseViewPaneTitle;
			panel1.Controls.Add(pbc1);

			CheckAddBtnEnabling();
		}