コード例 #1
0
 public void InvalidAffixProcess(IMoAffixProcess affixProcess, bool isInvalidLhs, IMoMorphSynAnalysis msa)
 {
     m_xmlWriter.WriteStartElement("LoadError");
     m_xmlWriter.WriteAttributeString("type", "invalid-affix-process");
     m_xmlWriter.WriteElementString("Form", affixProcess.Form.BestVernacularAlternative.Text);
     m_xmlWriter.WriteElementString("InvalidLhs", isInvalidLhs.ToString(CultureInfo.InvariantCulture));
     m_xmlWriter.WriteElementString("Hvo", msa.Hvo.ToString(CultureInfo.InvariantCulture));
     m_xmlWriter.WriteEndElement();
 }
コード例 #2
0
ファイル: ConsoleLogger.cs プロジェクト: vkarthim/FieldWorks
 public void InvalidAffixProcess(IMoAffixProcess affixProcess, bool isInvalidLhs, IMoMorphSynAnalysis msa)
 {
     Console.WriteLine("The affix process \"{0}\" is invalid.", affixProcess.Form.BestVernacularAlternative.Text);
 }
コード例 #3
0
		public InvalidAffixProcessException(IMoAffixProcess affixProcess, bool invalidLhs)
		{
			m_affixProcess = affixProcess;
			m_invalidLhs = invalidLhs;
		}
コード例 #4
0
 public InvalidAffixProcessException(IMoAffixProcess affixProcess, bool invalidLhs)
 {
     m_affixProcess = affixProcess;
     m_invalidLhs   = invalidLhs;
 }
コード例 #5
0
		public override void Display(IVwEnv vwenv, int hvo, int frag)
		{
			var tsf = m_cache.TsStrFactory;
			var userWs = m_cache.DefaultUserWs;
			switch (frag)
			{
				case kfragRule:
					m_rule = m_cache.ServiceLocator.GetInstance<IMoAffixProcessRepository>().GetObject(hvo);

					VwLength tableLen;
					tableLen.nVal = 10000;
					tableLen.unit = VwUnit.kunPercent100;
					vwenv.OpenTable(3, tableLen, 0, VwAlignment.kvaLeft, VwFramePosition.kvfpVoid, VwRule.kvrlNone, 0, 0, false);

					VwLength inputLen;
					inputLen.nVal = 0;
					inputLen.unit = VwUnit.kunPoint1000;

					int indexWidth = GetStrWidth(m_indexStr, m_headerProps, vwenv);
					int inputWidth = GetStrWidth(m_inputStr, m_headerProps, vwenv);
					VwLength headerLen;
					headerLen.nVal = Math.Max(indexWidth, inputWidth) + 8000;
					headerLen.unit = VwUnit.kunPoint1000;
					inputLen.nVal += headerLen.nVal;

					VwLength leftEmptyLen;
					leftEmptyLen.nVal = 8000 + (PILE_MARGIN * 2) + 2000;
					leftEmptyLen.unit = VwUnit.kunPoint1000;
					inputLen.nVal += leftEmptyLen.nVal;

					var ctxtLens = new VwLength[m_rule.InputOS.Count];
					vwenv.NoteDependency(new[] {m_rule.Hvo}, new[] {MoAffixProcessTags.kflidInput}, 1 );
					for (int i = 0; i < m_rule.InputOS.Count; i++)
					{
						int idxWidth = GetStrWidth(tsf.MakeString(Convert.ToString(i + 1), userWs), m_indexProps, vwenv);
						int ctxtWidth = GetWidth(m_rule.InputOS[i], vwenv);
						ctxtLens[i].nVal = Math.Max(idxWidth, ctxtWidth) + 8000 + 1000;
						ctxtLens[i].unit = VwUnit.kunPoint1000;
						inputLen.nVal += ctxtLens[i].nVal;
					}

					VwLength rightEmptyLen;
					rightEmptyLen.nVal = 8000 + (PILE_MARGIN * 2) + 1000;
					rightEmptyLen.unit = VwUnit.kunPoint1000;
					inputLen.nVal += rightEmptyLen.nVal;

					vwenv.MakeColumns(1, inputLen);

					VwLength arrowLen;
					arrowLen.nVal = GetStrWidth(m_doubleArrow, m_arrowProps, vwenv) + 8000;
					arrowLen.unit = VwUnit.kunPoint1000;
					vwenv.MakeColumns(1, arrowLen);

					VwLength outputLen;
					outputLen.nVal = 1;
					outputLen.unit = VwUnit.kunRelative;
					vwenv.MakeColumns(1, outputLen);

					vwenv.OpenTableBody();
					vwenv.OpenTableRow();

					// input table cell
					vwenv.OpenTableCell(1, 1);
					vwenv.OpenTable(m_rule.InputOS.Count + 3, tableLen, 0, VwAlignment.kvaCenter, VwFramePosition.kvfpVoid, VwRule.kvrlNone, 0, 4000, false);
					vwenv.MakeColumns(1, headerLen);
					vwenv.MakeColumns(1, leftEmptyLen);
					foreach (VwLength ctxtLen in ctxtLens)
						vwenv.MakeColumns(1, ctxtLen);
					vwenv.MakeColumns(1, rightEmptyLen);

					vwenv.OpenTableBody();
					vwenv.OpenTableRow();

					// input header cell
					vwenv.Props = m_headerProps;
					vwenv.OpenTableCell(1, 1);
					vwenv.AddString(m_inputStr);
					vwenv.CloseTableCell();

					// input left empty cell
					vwenv.Props = m_ctxtProps;
					vwenv.set_IntProperty((int)FwTextPropType.ktptBorderLeading, (int)FwTextPropVar.ktpvMilliPoint, 1000);
					vwenv.OpenTableCell(1, 1);
					vwenv.OpenParagraph();
					OpenContextPile(vwenv, false);
					vwenv.Props = m_bracketProps;
					vwenv.AddProp(ktagLeftEmpty, this, kfragEmpty);
					CloseContextPile(vwenv, false);
					vwenv.CloseParagraph();
					vwenv.CloseTableCell();

					// input context cells
					vwenv.AddObjVec(MoAffixProcessTags.kflidInput, this, kfragInput);

					// input right empty cell
					vwenv.Props = m_ctxtProps;
					vwenv.OpenTableCell(1, 1);
					vwenv.OpenParagraph();
					OpenContextPile(vwenv, false);
					vwenv.Props = m_bracketProps;
					vwenv.AddProp(ktagRightEmpty, this, kfragEmpty);
					CloseContextPile(vwenv, false);
					vwenv.CloseParagraph();
					vwenv.CloseTableCell();

					vwenv.CloseTableRow();
					vwenv.OpenTableRow();

					// index header cell
					vwenv.Props = m_headerProps;
					vwenv.OpenTableCell(1, 1);
					vwenv.AddString(m_indexStr);
					vwenv.CloseTableCell();

					// index left empty cell
					vwenv.Props = m_indexProps;
					vwenv.set_IntProperty((int)FwTextPropType.ktptBorderLeading, (int)FwTextPropVar.ktpvMilliPoint, 1000);
					vwenv.OpenTableCell(1, 1);
					vwenv.CloseTableCell();

					// index cells
					for (int i = 0; i < m_rule.InputOS.Count; i++)
					{
						vwenv.Props = m_indexProps;
						vwenv.OpenTableCell(1, 1);
						vwenv.AddString(tsf.MakeString(Convert.ToString(i + 1), userWs));
						vwenv.CloseTableCell();
					}

					// index right empty cell
					vwenv.Props = m_indexProps;
					vwenv.OpenTableCell(1, 1);
					vwenv.CloseTableCell();

					vwenv.CloseTableRow();
					vwenv.CloseTableBody();
					vwenv.CloseTable();
					vwenv.CloseTableCell();

					// double arrow cell
					vwenv.Props = m_arrowProps;
					vwenv.OpenTableCell(1, 1);
					vwenv.AddString(m_doubleArrow);
					vwenv.CloseTableCell();

					// result table cell
					vwenv.OpenTableCell(1, 1);
					vwenv.OpenTable(1, tableLen, 0, VwAlignment.kvaLeft, VwFramePosition.kvfpVoid, VwRule.kvrlNone, 0, 4000, false);
					vwenv.MakeColumns(1, outputLen);

					vwenv.OpenTableBody();
					vwenv.OpenTableRow();

					// result header cell
					vwenv.Props = m_headerProps;
					vwenv.OpenTableCell(1, 1);
					vwenv.AddString(m_resultStr);
					vwenv.CloseTableCell();

					vwenv.CloseTableRow();
					vwenv.OpenTableRow();

					// result cell
					vwenv.Props = m_resultProps;
					vwenv.OpenTableCell(1, 1);
					vwenv.OpenParagraph();
					if (m_rule.OutputOS.Count == 0)
						vwenv.AddProp(MoAffixProcessTags.kflidOutput, this, kfragEmpty);
					else
						vwenv.AddObjVecItems(MoAffixProcessTags.kflidOutput, this, kfragRuleMapping);
					vwenv.CloseParagraph();
					vwenv.CloseTableCell();

					vwenv.CloseTableRow();
					vwenv.CloseTableBody();
					vwenv.CloseTable();

					vwenv.CloseTableCell();
					vwenv.CloseTableRow();
					vwenv.CloseTableBody();
					vwenv.CloseTable();
					break;

				case kfragRuleMapping:
					var mapping = m_cache.ServiceLocator.GetInstance<IMoRuleMappingRepository>().GetObject(hvo);
					switch (mapping.ClassID)
					{
						case MoCopyFromInputTags.kClassId:
							var copy = (IMoCopyFromInput) mapping;
							OpenIndexPile(vwenv);
							if (copy.ContentRA == null)
								vwenv.AddProp(ktagIndex, this, 0);
							else
								vwenv.AddProp(ktagIndex, this, copy.ContentRA.IndexInOwner + 1);
							CloseIndexPile(vwenv);
							break;

						case MoInsertPhonesTags.kClassId:
							OpenIndexPile(vwenv);
							vwenv.AddObjVecItems(MoInsertPhonesTags.kflidContent, this, kfragTerminalUnit);
							CloseIndexPile(vwenv);
							break;

						case MoModifyFromInputTags.kClassId:
							var modify = (IMoModifyFromInput) mapping;
							var numLines = modify.ModificationRA.FeaturesOA.FeatureSpecsOC.Count;
							// left bracket pile
							vwenv.set_IntProperty((int)FwTextPropType.ktptMarginLeading, (int)FwTextPropVar.ktpvMilliPoint, PILE_MARGIN);
							vwenv.OpenInnerPile();

							vwenv.Props = m_bracketProps;
							vwenv.AddProp(ktagLeftBoundary, this, kfragZeroWidthSpace);

							// put index in the left bracket pile
							if (modify.ContentRA == null)
								vwenv.AddProp(ktagIndex, this, 0);
							else
								vwenv.AddProp(ktagIndex, this, modify.ContentRA.IndexInOwner + 1);
							// right align brackets in left bracket pile, since the index could have a greater width, then the bracket
							if (numLines > 1)
							{
								vwenv.Props = m_bracketProps;
								vwenv.set_IntProperty((int)FwTextPropType.ktptAlign, (int)FwTextPropVar.ktpvEnum, (int)FwTextAlign.ktalRight);
								vwenv.AddProp(ktagLeftNonBoundary, this, kfragLeftBracketUpHook);
								for (int i = 1; i < numLines - 1; i++)
								{
									vwenv.Props = m_bracketProps;
									vwenv.set_IntProperty((int)FwTextPropType.ktptAlign, (int)FwTextPropVar.ktpvEnum, (int)FwTextAlign.ktalRight);
									vwenv.AddProp(ktagLeftNonBoundary, this, kfragLeftBracketExt);
								}
								vwenv.Props = m_bracketProps;
								vwenv.set_IntProperty((int)FwTextPropType.ktptAlign, (int)FwTextPropVar.ktpvEnum, (int)FwTextAlign.ktalRight);
								vwenv.AddProp(ktagLeftNonBoundary, this, kfragLeftBracketLowHook);
							}
							else
							{
								vwenv.set_IntProperty((int)FwTextPropType.ktptAlign, (int)FwTextPropVar.ktpvEnum, (int)FwTextAlign.ktalRight);
								vwenv.AddProp(ktagLeftNonBoundary, this, kfragLeftBracket);
							}
							vwenv.CloseInnerPile();

							// feature pile
							vwenv.set_IntProperty((int)FwTextPropType.ktptAlign, (int)FwTextPropVar.ktpvEnum, (int)FwTextAlign.ktalLeft);
							vwenv.OpenInnerPile();
							AddExtraLines(1, vwenv);
							if (numLines == 0)
								vwenv.AddProp(MoModifyFromInputTags.kflidModification, this, kfragQuestions);
							else
								vwenv.AddObjProp(MoModifyFromInputTags.kflidModification, this, kfragFeatNC);
							vwenv.CloseInnerPile();

							// right bracket pile
							vwenv.set_IntProperty((int)FwTextPropType.ktptMarginTrailing, (int)FwTextPropVar.ktpvMilliPoint, PILE_MARGIN);
							vwenv.OpenInnerPile();
							vwenv.Props = m_bracketProps;
							vwenv.AddProp(ktagRightBoundary, this, kfragSpace);
							if (numLines > 1)
							{
								vwenv.Props = m_bracketProps;
								vwenv.AddProp(ktagRightNonBoundary, this, kfragRightBracketUpHook);
								for (int i = 1; i < numLines - 1; i++)
								{
									vwenv.Props = m_bracketProps;
									vwenv.AddProp(ktagRightNonBoundary, this, kfragRightBracketExt);
								}
								vwenv.Props = m_bracketProps;
								vwenv.AddProp(ktagRightNonBoundary, this, kfragRightBracketLowHook);
							}
							else
							{
								vwenv.AddProp(ktagRightNonBoundary, this, kfragRightBracket);
							}
							vwenv.CloseInnerPile();
							break;
					}
					break;

				default:
					base.Display(vwenv, hvo, frag);
					break;
			}
		}
コード例 #6
0
        public override void Display(IVwEnv vwenv, int hvo, int frag)
        {
            int userWs = m_cache.DefaultUserWs;

            switch (frag)
            {
            case kfragRule:
                m_rule = m_cache.ServiceLocator.GetInstance <IMoAffixProcessRepository>().GetObject(hvo);

                int maxNumLines = GetMaxNumLines();

                VwLength tableLen;
                tableLen.nVal = 10000;
                tableLen.unit = VwUnit.kunPercent100;
                vwenv.OpenTable(3, tableLen, 0, VwAlignment.kvaLeft, VwFramePosition.kvfpVoid, VwRule.kvrlNone, 0, 0, false);

                VwLength inputLen;
                inputLen.nVal = 0;
                inputLen.unit = VwUnit.kunPoint1000;

                int      indexWidth = GetStrWidth(m_indexStr, m_headerProps, vwenv);
                int      inputWidth = GetStrWidth(m_inputStr, m_headerProps, vwenv);
                VwLength headerLen;
                headerLen.nVal = Math.Max(indexWidth, inputWidth) + 8000;
                headerLen.unit = VwUnit.kunPoint1000;
                inputLen.nVal += headerLen.nVal;

                VwLength leftEmptyLen;
                leftEmptyLen.nVal = 8000 + (PileMargin * 2) + 2000;
                leftEmptyLen.unit = VwUnit.kunPoint1000;
                inputLen.nVal    += leftEmptyLen.nVal;

                var ctxtLens = new VwLength[m_rule.InputOS.Count];
                vwenv.NoteDependency(new[] { m_rule.Hvo }, new[] { MoAffixProcessTags.kflidInput }, 1);
                for (int i = 0; i < m_rule.InputOS.Count; i++)
                {
                    int idxWidth  = GetStrWidth(TsStringUtils.MakeString(Convert.ToString(i + 1), userWs), m_indexProps, vwenv);
                    int ctxtWidth = GetWidth(m_rule.InputOS[i], vwenv);
                    ctxtLens[i].nVal = Math.Max(idxWidth, ctxtWidth) + 8000 + 1000;
                    ctxtLens[i].unit = VwUnit.kunPoint1000;
                    inputLen.nVal   += ctxtLens[i].nVal;
                }

                VwLength rightEmptyLen;
                rightEmptyLen.nVal = 8000 + (PileMargin * 2) + 1000;
                rightEmptyLen.unit = VwUnit.kunPoint1000;
                inputLen.nVal     += rightEmptyLen.nVal;

                vwenv.MakeColumns(1, inputLen);

                VwLength arrowLen;
                arrowLen.nVal = GetStrWidth(m_doubleArrow, m_arrowProps, vwenv) + 8000;
                arrowLen.unit = VwUnit.kunPoint1000;
                vwenv.MakeColumns(1, arrowLen);

                VwLength outputLen;
                outputLen.nVal = 1;
                outputLen.unit = VwUnit.kunRelative;
                vwenv.MakeColumns(1, outputLen);

                vwenv.OpenTableBody();
                vwenv.OpenTableRow();

                // input table cell
                vwenv.OpenTableCell(1, 1);
                vwenv.OpenTable(m_rule.InputOS.Count + 3, tableLen, 0, VwAlignment.kvaCenter, VwFramePosition.kvfpVoid, VwRule.kvrlNone, 0, 4000, false);
                vwenv.MakeColumns(1, headerLen);
                vwenv.MakeColumns(1, leftEmptyLen);
                foreach (VwLength ctxtLen in ctxtLens)
                {
                    vwenv.MakeColumns(1, ctxtLen);
                }
                vwenv.MakeColumns(1, rightEmptyLen);

                vwenv.OpenTableBody();
                vwenv.OpenTableRow();

                // input header cell
                vwenv.Props = m_headerProps;
                vwenv.OpenTableCell(1, 1);
                vwenv.AddString(m_inputStr);
                vwenv.CloseTableCell();

                // input left empty cell
                vwenv.Props = m_ctxtProps;
                vwenv.set_IntProperty((int)FwTextPropType.ktptBorderLeading, (int)FwTextPropVar.ktpvMilliPoint, 1000);
                vwenv.OpenTableCell(1, 1);
                vwenv.OpenParagraph();
                OpenSingleLinePile(vwenv, maxNumLines, false);
                vwenv.Props = m_bracketProps;
                vwenv.AddProp(ktagLeftEmpty, this, kfragEmpty);
                CloseSingleLinePile(vwenv, false);
                vwenv.CloseParagraph();
                vwenv.CloseTableCell();

                // input context cells
                vwenv.AddObjVec(MoAffixProcessTags.kflidInput, this, kfragInput);

                // input right empty cell
                vwenv.Props = m_ctxtProps;
                vwenv.OpenTableCell(1, 1);
                vwenv.OpenParagraph();
                OpenSingleLinePile(vwenv, maxNumLines, false);
                vwenv.Props = m_bracketProps;
                vwenv.AddProp(ktagRightEmpty, this, kfragEmpty);
                CloseSingleLinePile(vwenv, false);
                vwenv.CloseParagraph();
                vwenv.CloseTableCell();

                vwenv.CloseTableRow();
                vwenv.OpenTableRow();

                // index header cell
                vwenv.Props = m_headerProps;
                vwenv.OpenTableCell(1, 1);
                vwenv.AddString(m_indexStr);
                vwenv.CloseTableCell();

                // index left empty cell
                vwenv.Props = m_indexProps;
                vwenv.set_IntProperty((int)FwTextPropType.ktptBorderLeading, (int)FwTextPropVar.ktpvMilliPoint, 1000);
                vwenv.OpenTableCell(1, 1);
                vwenv.CloseTableCell();

                // index cells
                for (int i = 0; i < m_rule.InputOS.Count; i++)
                {
                    vwenv.Props = m_indexProps;
                    vwenv.OpenTableCell(1, 1);
                    vwenv.AddString(TsStringUtils.MakeString(Convert.ToString(i + 1), userWs));
                    vwenv.CloseTableCell();
                }

                // index right empty cell
                vwenv.Props = m_indexProps;
                vwenv.OpenTableCell(1, 1);
                vwenv.CloseTableCell();

                vwenv.CloseTableRow();
                vwenv.CloseTableBody();
                vwenv.CloseTable();
                vwenv.CloseTableCell();

                // double arrow cell
                vwenv.Props = m_arrowProps;
                vwenv.OpenTableCell(1, 1);
                vwenv.AddString(m_doubleArrow);
                vwenv.CloseTableCell();

                // result table cell
                vwenv.OpenTableCell(1, 1);
                vwenv.OpenTable(1, tableLen, 0, VwAlignment.kvaLeft, VwFramePosition.kvfpVoid, VwRule.kvrlNone, 0, 4000, false);
                vwenv.MakeColumns(1, outputLen);

                vwenv.OpenTableBody();
                vwenv.OpenTableRow();

                // result header cell
                vwenv.Props = m_headerProps;
                vwenv.OpenTableCell(1, 1);
                vwenv.AddString(m_resultStr);
                vwenv.CloseTableCell();

                vwenv.CloseTableRow();
                vwenv.OpenTableRow();

                // result cell
                vwenv.Props = m_resultProps;
                vwenv.OpenTableCell(1, 1);
                vwenv.OpenParagraph();
                if (m_rule.OutputOS.Count == 0)
                {
                    vwenv.AddProp(MoAffixProcessTags.kflidOutput, this, kfragEmpty);
                }
                else
                {
                    vwenv.AddObjVecItems(MoAffixProcessTags.kflidOutput, this, kfragRuleMapping);
                }
                vwenv.CloseParagraph();
                vwenv.CloseTableCell();

                vwenv.CloseTableRow();
                vwenv.CloseTableBody();
                vwenv.CloseTable();

                vwenv.CloseTableCell();
                vwenv.CloseTableRow();
                vwenv.CloseTableBody();
                vwenv.CloseTable();
                break;

            case kfragRuleMapping:
                var mapping = m_cache.ServiceLocator.GetInstance <IMoRuleMappingRepository>().GetObject(hvo);
                switch (mapping.ClassID)
                {
                case MoCopyFromInputTags.kClassId:
                    var copy = (IMoCopyFromInput)mapping;
                    OpenSingleLinePile(vwenv, GetOutputMaxNumLines());
                    if (copy.ContentRA == null)
                    {
                        vwenv.AddProp(ktagIndex, this, 0);
                    }
                    else
                    {
                        vwenv.AddProp(ktagIndex, this, copy.ContentRA.IndexInOwner + 1);
                    }
                    CloseSingleLinePile(vwenv);
                    break;

                case MoInsertPhonesTags.kClassId:
                    OpenSingleLinePile(vwenv, GetOutputMaxNumLines());
                    vwenv.AddObjVecItems(MoInsertPhonesTags.kflidContent, this, kfragTerminalUnit);
                    CloseSingleLinePile(vwenv);
                    break;

                case MoModifyFromInputTags.kClassId:
                    var modify            = (IMoModifyFromInput)mapping;
                    int outputMaxNumLines = GetOutputMaxNumLines();
                    int numLines          = modify.ModificationRA.FeaturesOA.FeatureSpecsOC.Count;

                    // index pile
                    vwenv.set_IntProperty((int)FwTextPropType.ktptMarginLeading, (int)FwTextPropVar.ktpvMilliPoint, PileMargin);
                    vwenv.OpenInnerPile();
                    AddExtraLines(outputMaxNumLines - 1, vwenv);
                    vwenv.OpenParagraph();
                    vwenv.Props = m_bracketProps;
                    vwenv.AddProp(ktagLeftBoundary, this, kfragZeroWidthSpace);
                    if (modify.ContentRA == null)
                    {
                        vwenv.AddProp(ktagIndex, this, 0);
                    }
                    else
                    {
                        vwenv.AddProp(ktagIndex, this, modify.ContentRA.IndexInOwner + 1);
                    }
                    vwenv.CloseParagraph();
                    vwenv.CloseInnerPile();

                    // left bracket pile
                    // right align brackets in left bracket pile, since the index could have a greater width, then the bracket
                    if (numLines == 1)
                    {
                        vwenv.OpenInnerPile();
                        AddExtraLines(outputMaxNumLines - 1, vwenv);
                        vwenv.set_IntProperty((int)FwTextPropType.ktptAlign, (int)FwTextPropVar.ktpvEnum, (int)FwTextAlign.ktalRight);
                        vwenv.AddProp(ktagLeftNonBoundary, this, kfragLeftBracket);
                        vwenv.CloseInnerPile();
                    }
                    else
                    {
                        vwenv.OpenInnerPile();
                        vwenv.Props = m_bracketProps;
                        vwenv.set_IntProperty((int)FwTextPropType.ktptAlign, (int)FwTextPropVar.ktpvEnum, (int)FwTextAlign.ktalRight);
                        vwenv.AddProp(ktagLeftNonBoundary, this, kfragLeftBracketUpHook);
                        for (int i = 1; i < numLines - 1; i++)
                        {
                            vwenv.Props = m_bracketProps;
                            vwenv.set_IntProperty((int)FwTextPropType.ktptAlign, (int)FwTextPropVar.ktpvEnum, (int)FwTextAlign.ktalRight);
                            vwenv.AddProp(ktagLeftNonBoundary, this, kfragLeftBracketExt);
                        }
                        vwenv.Props = m_bracketProps;
                        vwenv.set_IntProperty((int)FwTextPropType.ktptAlign, (int)FwTextPropVar.ktpvEnum, (int)FwTextAlign.ktalRight);
                        vwenv.AddProp(ktagLeftNonBoundary, this, kfragLeftBracketLowHook);
                        vwenv.CloseInnerPile();
                    }

                    // feature pile
                    vwenv.set_IntProperty((int)FwTextPropType.ktptAlign, (int)FwTextPropVar.ktpvEnum, (int)FwTextAlign.ktalLeft);
                    vwenv.OpenInnerPile();
                    AddExtraLines(outputMaxNumLines - numLines, vwenv);
                    if (numLines == 0)
                    {
                        vwenv.AddProp(MoModifyFromInputTags.kflidModification, this, kfragQuestions);
                    }
                    else
                    {
                        vwenv.AddObjProp(MoModifyFromInputTags.kflidModification, this, kfragFeatNC);
                    }
                    vwenv.CloseInnerPile();

                    // right bracket pile
                    if (numLines == 1)
                    {
                        vwenv.set_IntProperty((int)FwTextPropType.ktptMarginTrailing, (int)FwTextPropVar.ktpvMilliPoint, PileMargin);
                        AddExtraLines(outputMaxNumLines - 1, vwenv);
                        vwenv.OpenInnerPile();
                        vwenv.AddProp(ktagRightBoundary, this, kfragRightBracket);
                        vwenv.CloseInnerPile();
                    }
                    else
                    {
                        vwenv.set_IntProperty((int)FwTextPropType.ktptMarginTrailing, (int)FwTextPropVar.ktpvMilliPoint, PileMargin);
                        vwenv.OpenInnerPile();
                        AddExtraLines(outputMaxNumLines - numLines, vwenv);
                        vwenv.Props = m_bracketProps;
                        vwenv.AddProp(ktagRightNonBoundary, this, kfragRightBracketUpHook);
                        for (int i = 1; i < numLines - 1; i++)
                        {
                            vwenv.Props = m_bracketProps;
                            vwenv.AddProp(ktagRightNonBoundary, this, kfragRightBracketExt);
                        }
                        vwenv.Props = m_bracketProps;
                        vwenv.AddProp(ktagRightBoundary, this, kfragRightBracketLowHook);
                        vwenv.CloseInnerPile();
                    }
                    break;
                }
                break;

            default:
                base.Display(vwenv, hvo, frag);
                break;
            }
        }
コード例 #7
0
		protected override void Dispose(bool disposing)
		{
			if (IsDisposed)
				return;

			if (disposing)
			{
			}

			m_rule = null;

			if (m_headerProps != null)
			{
				Marshal.ReleaseComObject(m_headerProps);
				m_headerProps = null;
			}
			if (m_arrowProps != null)
			{
				Marshal.ReleaseComObject(m_arrowProps);
				m_arrowProps = null;
			}
			if (m_ctxtProps != null)
			{
				Marshal.ReleaseComObject(m_ctxtProps);
				m_ctxtProps = null;
			}
			if (m_indexProps != null)
			{
				Marshal.ReleaseComObject(m_indexProps);
				m_indexProps = null;
			}
			if (m_resultProps != null)
			{
				Marshal.ReleaseComObject(m_resultProps);
				m_resultProps = null;
			}
			if (m_inputStr != null)
			{
				Marshal.ReleaseComObject(m_inputStr);
				m_inputStr = null;
			}
			if (m_resultStr != null)
			{
				Marshal.ReleaseComObject(m_resultStr);
				m_resultStr = null;
			}
			if (m_indexStr != null)
			{
				Marshal.ReleaseComObject(m_indexStr);
				m_indexStr = null;
			}
			if (m_doubleArrow != null)
			{
				Marshal.ReleaseComObject(m_doubleArrow);
				m_doubleArrow = null;
			}
			if (m_space != null)
			{
				Marshal.ReleaseComObject(m_space);
				m_space = null;
			}

			base.Dispose(disposing);
		}