/// <summary>
        /// Init the dialog with a simple context.
        /// </summary>
        /// <param name="cache"></param>
        /// <param name="mediator"></param>
        /// <param name="fs"></param>
        public void SetDlgInfo(FdoCache cache, XCore.Mediator mediator, IPhRegularRule rule, IPhSimpleContextNC ctxt)
        {
            CheckDisposed();

            m_rule = rule;
            m_ctxt = ctxt;
            RestoreWindowPosition(mediator);
            m_cache = cache;

            m_valuesCombo.WritingSystemFactory = m_cache.LanguageWritingSystemFactoryAccessor;
            m_valuesCombo.StyleSheet           = FontHeightAdjuster.StyleSheetFromMediator(mediator);
            m_valuesCombo.WritingSystemCode    = m_cache.DefaultUserWs;
            m_valuesCombo.Items.Add(MEStrings.ksFeatConstrAgree);
            m_valuesCombo.Items.Add(MEStrings.ksFeatConstrDisagree);
            m_valuesCombo.Items.Add(MEStrings.ks_DontCare_);

            List <int>    hvos     = new List <int>();
            IPhNCFeatures natClass = m_ctxt.FeatureStructureRA as IPhNCFeatures;

            foreach (int hvo in m_cache.LangProject.PhFeatureSystemOA.FeaturesOC.HvoArray)
            {
                if (natClass.FeaturesOAHvo == 0 || natClass.FeaturesOA.FindClosedValue(hvo) == null)
                {
                    hvos.Add(hvo);
                }
            }
            LoadPhonFeats(hvos);
            BuildInitialBrowseView(mediator, hvos);
        }
        /// <summary>
        /// Init the dialog with a simple context.
        /// </summary>
        /// <param name="cache"></param>
        /// <param name="mediator"></param>
        /// <param name="fs"></param>
        public void SetDlgInfo(FdoCache cache, XCore.Mediator mediator, IPhRegularRule rule, IPhSimpleContextNC ctxt)
        {
            CheckDisposed();

            m_rule   = rule;
            m_ctxt   = ctxt;
            Mediator = mediator;
            m_cache  = cache;

            m_valuesCombo.WritingSystemFactory = m_cache.LanguageWritingSystemFactoryAccessor;
            m_valuesCombo.StyleSheet           = FontHeightAdjuster.StyleSheetFromMediator(mediator);
            m_valuesCombo.WritingSystemCode    = m_cache.DefaultUserWs;
            m_valuesCombo.Items.Add(MEStrings.ksFeatConstrAgree);
            m_valuesCombo.Items.Add(MEStrings.ksFeatConstrDisagree);
            m_valuesCombo.Items.Add(MEStrings.ks_DontCare_);

            var feats    = new HashSet <IFsFeatDefn>();
            var natClass = m_ctxt.FeatureStructureRA as IPhNCFeatures;

            foreach (var feat in m_cache.LangProject.PhFeatureSystemOA.FeaturesOC)
            {
                if (natClass.FeaturesOA == null || natClass.FeaturesOA.GetValue(feat as IFsClosedFeature) == null)
                {
                    feats.Add(feat);
                }
            }
            LoadPhonFeats(feats);
            BuildInitialBrowseView(mediator, feats);
        }
        /// <summary>
        /// Init the dialog with an existing context.
        /// </summary>
        /// <param name="cache"></param>
        /// <param name="mediator"></param>
        /// <param name="rule"></param>
        /// <param name="ctxt"></param>
        public void SetDlgInfo(FdoCache cache, Mediator mediator, IPhRegularRule rule, IPhSimpleContextNC ctxt)
        {
            CheckDisposed();

            IFsFeatStruc fs = ((IPhNCFeatures)ctxt.FeatureStructureRA).FeaturesOA;

            SetDlgInfo(cache, mediator, ctxt.FeatureStructureRA.Hvo, PhNCFeaturesTags.kflidFeatures, fs, rule, ctxt);
        }
        private void SetDlgInfo(FdoCache cache, Mediator mediator, int hvoOwner, int owningFlid, IFsFeatStruc fs, IPhRegularRule rule, IPhSimpleContextNC ctxt)
        {
            m_fs         = fs;
            m_owningFlid = owningFlid;
            m_hvoOwner   = hvoOwner;
            m_rule       = rule;
            m_ctxt       = ctxt;
            Mediator     = mediator;
            m_cache      = cache;
            m_valuesCombo.WritingSystemFactory = m_cache.LanguageWritingSystemFactoryAccessor;
            m_valuesCombo.StyleSheet           = FontHeightAdjuster.StyleSheetFromMediator(mediator);

            LoadPhonFeats(m_fs);
            BuildInitialBrowseView(mediator);
        }
Esempio n. 5
0
        private void SetDlgInfo(LcmCache cache, Mediator mediator, XCore.PropertyTable propertyTable, int hvoOwner, int owningFlid, IFsFeatStruc fs, IPhRegularRule rule, IPhSimpleContextNC ctxt)
        {
            m_fs            = fs;
            m_owningFlid    = owningFlid;
            m_hvoOwner      = hvoOwner;
            m_rule          = rule;
            m_ctxt          = ctxt;
            m_mediator      = mediator;
            m_propertyTable = propertyTable;
            if (m_propertyTable != null)
            {
                // Reset window location.
                // Get location to the stored values, if any.
                if (m_propertyTable.PropertyExists("phonFeatListDlgLocation") &&
                    m_propertyTable.PropertyExists("phonFeatListDlgSize"))
                {
                    var locWnd = m_propertyTable.GetValue <Point>("phonFeatListDlgLocation");
                    var szWnd  = m_propertyTable.GetValue <Size>("phonFeatListDlgSize");
                    var rect   = new Rectangle(locWnd, szWnd);
                    ScreenHelper.EnsureVisibleRect(ref rect);
                    DesktopBounds = rect;
                    StartPosition = FormStartPosition.Manual;
                }

                var helpTopicProvider = (m_propertyTable.GetValue <IHelpTopicProvider>("HelpTopicProvider"));
                if (helpTopicProvider != null)                 // Will be null when running tests
                {
                    m_helpProvider.HelpNamespace = helpTopicProvider.HelpFile;
                    m_helpProvider.SetHelpKeyword(this, helpTopicProvider.GetHelpString(m_helpTopic));
                    m_helpProvider.SetHelpNavigator(this, HelpNavigator.Topic);
                }
            }
            m_cache = cache;
            m_valuesCombo.WritingSystemFactory = m_cache.LanguageWritingSystemFactoryAccessor;
            m_valuesCombo.StyleSheet           = FontHeightAdjuster.StyleSheetFromPropertyTable(m_propertyTable);

            LoadPhonFeats(m_fs);
            BuildInitialBrowseView();
        }
        public void SetDlgInfo(FdoCache cache, Mediator mediator, IPhRegularRule rule)
        {
            CheckDisposed();

            SetDlgInfo(cache, mediator, 0, 0, null, rule, null);
        }
		private void SetDlgInfo(FdoCache cache, Mediator mediator, int hvoOwner, int owningFlid, IFsFeatStruc fs, IPhRegularRule rule, IPhSimpleContextNC ctxt)
		{
			m_fs = fs;
			m_owningFlid = owningFlid;
			m_hvoOwner = hvoOwner;
			m_rule = rule;
			m_ctxt = ctxt;
			Mediator = mediator;
			m_cache = cache;
			m_valuesCombo.WritingSystemFactory = m_cache.LanguageWritingSystemFactoryAccessor;
			m_valuesCombo.StyleSheet = FontHeightAdjuster.StyleSheetFromMediator(mediator);

			LoadPhonFeats(m_fs);
			BuildInitialBrowseView(mediator);
		}
		public void SetDlgInfo(FdoCache cache, Mediator mediator, IPhRegularRule rule)
		{
			CheckDisposed();

			SetDlgInfo(cache, mediator, 0, 0, null, rule, null);
		}
		/// <summary>
		/// Init the dialog with an existing context.
		/// </summary>
		/// <param name="cache"></param>
		/// <param name="mediator"></param>
		/// <param name="rule"></param>
		/// <param name="ctxt"></param>
		public void SetDlgInfo(FdoCache cache, Mediator mediator, IPhRegularRule rule, IPhSimpleContextNC ctxt)
		{
			CheckDisposed();

			IFsFeatStruc fs = ((IPhNCFeatures) ctxt.FeatureStructureRA).FeaturesOA;
			SetDlgInfo(cache, mediator, ctxt.FeatureStructureRA.Hvo, PhNCFeaturesTags.kflidFeatures, fs, rule, ctxt);
		}
Esempio n. 10
0
        public void SetDlgInfo(LcmCache cache, Mediator mediator, XCore.PropertyTable propertyTable, IPhRegularRule rule)
        {
            CheckDisposed();

            SetDlgInfo(cache, mediator, propertyTable, 0, 0, null, rule, null);
        }
		/// <summary>
		/// Init the dialog with a simple context.
		/// </summary>
		/// <param name="cache"></param>
		/// <param name="mediator"></param>
		/// <param name="fs"></param>
		public void SetDlgInfo(FdoCache cache, XCore.Mediator mediator, IPhRegularRule rule, IPhSimpleContextNC ctxt)
		{
			CheckDisposed();

			m_rule = rule;
			m_ctxt = ctxt;
			RestoreWindowPosition(mediator);
			m_cache = cache;

			m_valuesCombo.WritingSystemFactory = m_cache.LanguageWritingSystemFactoryAccessor;
			m_valuesCombo.StyleSheet = FontHeightAdjuster.StyleSheetFromMediator(mediator);
			m_valuesCombo.WritingSystemCode = m_cache.DefaultUserWs;
			m_valuesCombo.Items.Add(MEStrings.ksFeatConstrAgree);
			m_valuesCombo.Items.Add(MEStrings.ksFeatConstrDisagree);
			m_valuesCombo.Items.Add(MEStrings.ks_DontCare_);

			List<int> hvos = new List<int>();
			IPhNCFeatures natClass = m_ctxt.FeatureStructureRA as IPhNCFeatures;
			foreach (int hvo in m_cache.LangProject.PhFeatureSystemOA.FeaturesOC.HvoArray)
			{
				if (natClass.FeaturesOAHvo == 0 || natClass.FeaturesOA.FindClosedValue(hvo) == null)
					hvos.Add(hvo);
			}
			LoadPhonFeats(hvos);
			BuildInitialBrowseView(mediator, hvos);
		}