Inheritance: Aga.Controls.Tree.TreeModel
Ejemplo n.º 1
0
        public void SetDlgInfo(LcmCache cache, Mediator mediator, PropertyTable propertyTable, ComplexConcMorphNode node)
        {
            m_cache = cache;
            m_node  = node;

            m_formTextBox.WritingSystemFactory = m_cache.LanguageWritingSystemFactoryAccessor;
            m_formTextBox.AdjustForStyleSheet(FontHeightAdjuster.StyleSheetFromPropertyTable(propertyTable));

            m_glossTextBox.WritingSystemFactory = m_cache.LanguageWritingSystemFactoryAccessor;
            m_glossTextBox.AdjustForStyleSheet(FontHeightAdjuster.StyleSheetFromPropertyTable(propertyTable));

            m_entryTextBox.WritingSystemFactory = m_cache.LanguageWritingSystemFactoryAccessor;
            m_entryTextBox.AdjustForStyleSheet(FontHeightAdjuster.StyleSheetFromPropertyTable(propertyTable));

            m_categoryComboBox.WritingSystemFactory = m_cache.LanguageWritingSystemFactoryAccessor;

            foreach (CoreWritingSystemDefinition ws in m_cache.ServiceLocator.WritingSystems.CurrentVernacularWritingSystems)
            {
                m_formWsComboBox.Items.Add(ws);
                m_entryWsComboBox.Items.Add(ws);
            }

            foreach (CoreWritingSystemDefinition ws in m_cache.ServiceLocator.WritingSystems.CurrentAnalysisWritingSystems)
            {
                m_glossWsComboBox.Items.Add(ws);
            }

            m_inflModel = new InflFeatureTreeModel(m_cache.LangProject.MsFeatureSystemOA, m_node.InflFeatures, m_imageList.Images[0], m_imageList.Images[1]);
            m_inflFeatsTreeView.Model = m_inflModel;
            m_inflFeatsTreeView.ExpandAll();

            SetTextBoxValue(m_node.Form, m_formTextBox, m_formWsComboBox, true);
            SetTextBoxValue(m_node.Entry, m_entryTextBox, m_entryWsComboBox, true);
            SetTextBoxValue(m_node.Gloss, m_glossTextBox, m_glossWsComboBox, false);

            m_catPopupTreeManager = new PossibilityComboController(m_categoryComboBox,
                                                                   m_cache,
                                                                   m_cache.LanguageProject.PartsOfSpeechOA,
                                                                   m_cache.ServiceLocator.WritingSystems.DefaultAnalysisWritingSystem.Handle,
                                                                   false,
                                                                   mediator,
                                                                   propertyTable,
                                                                   propertyTable.GetValue <Form>("window"));

            if (m_node.Category != null)
            {
                m_categoryNotCheckBox.Checked = m_node.NegateCategory;
                m_catPopupTreeManager.LoadPopupTree(m_node.Category.Hvo);
            }
            else
            {
                m_catPopupTreeManager.LoadPopupTree(0);
            }

            m_helpTopicProvider = propertyTable.GetValue <IHelpTopicProvider>("HelpTopicProvider");

            m_helpProvider.HelpNamespace = m_helpTopicProvider.HelpFile;
            m_helpProvider.SetHelpKeyword(this, m_helpTopicProvider.GetHelpString(s_helpTopic));
            m_helpProvider.SetHelpNavigator(this, HelpNavigator.Topic);
        }
Ejemplo n.º 2
0
		public void SetDlgInfo(FdoCache cache, Mediator mediator, ComplexConcWordNode node)
		{
			m_cache = cache;
			m_mediator = mediator;
			m_node = node;

			m_formTextBox.WritingSystemFactory = m_cache.LanguageWritingSystemFactoryAccessor;
			m_formTextBox.AdjustForStyleSheet(FontHeightAdjuster.StyleSheetFromMediator(mediator));

			m_glossTextBox.WritingSystemFactory = m_cache.LanguageWritingSystemFactoryAccessor;
			m_glossTextBox.AdjustForStyleSheet(FontHeightAdjuster.StyleSheetFromMediator(mediator));

			m_categoryComboBox.WritingSystemFactory = m_cache.LanguageWritingSystemFactoryAccessor;

			foreach (IWritingSystem ws in m_cache.ServiceLocator.WritingSystems.CurrentVernacularWritingSystems)
				m_formWsComboBox.Items.Add(ws);

			foreach (IWritingSystem ws in m_cache.ServiceLocator.WritingSystems.CurrentAnalysisWritingSystems)
				m_glossWsComboBox.Items.Add(ws);

			m_inflModel = new InflFeatureTreeModel(m_cache.LangProject.MsFeatureSystemOA, m_node.InflFeatures, m_imageList.Images[0], m_imageList.Images[1]);
			m_inflFeatsTreeView.Model = m_inflModel;
			m_inflFeatsTreeView.ExpandAll();

			SetTextBoxValue(m_node.Form, m_formTextBox, m_formWsComboBox, true);
			SetTextBoxValue(m_node.Gloss, m_glossTextBox, m_glossWsComboBox, false);

			m_catPopupTreeManager = new PossibilityComboController(m_categoryComboBox,
									m_cache,
									m_cache.LanguageProject.PartsOfSpeechOA,
									m_cache.ServiceLocator.WritingSystems.DefaultAnalysisWritingSystem.Handle,
									false,
									m_mediator,
									(Form)m_mediator.PropertyTable.GetValue("window"));

			if (m_node.Category != null)
			{
				m_categoryNotCheckBox.Checked = m_node.NegateCategory;
				m_catPopupTreeManager.LoadPopupTree(m_node.Category.Hvo);
			}
			else
			{
				m_catPopupTreeManager.LoadPopupTree(0);
			}

			m_helpTopicProvider = m_mediator.HelpTopicProvider;

			m_helpProvider.HelpNamespace = m_helpTopicProvider.HelpFile;
			m_helpProvider.SetHelpKeyword(this, m_helpTopicProvider.GetHelpString(s_helpTopic));
			m_helpProvider.SetHelpNavigator(this, HelpNavigator.Topic);
		}