当前位置: 首页>>代码示例>>C#>>正文


C# FdoCache.MaxFieldLength方法代码示例

本文整理汇总了C#中SIL.FieldWorks.FDO.FdoCache.MaxFieldLength方法的典型用法代码示例。如果您正苦于以下问题:C# FdoCache.MaxFieldLength方法的具体用法?C# FdoCache.MaxFieldLength怎么用?C# FdoCache.MaxFieldLength使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SIL.FieldWorks.FDO.FdoCache的用法示例。


在下文中一共展示了FdoCache.MaxFieldLength方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetDlgInfo1

		private bool SetDlgInfo1(Mediator mediator, XmlNode configurationParameters)
		{
			using (new WaitCursor(this))
			{
				m_mediator = mediator;
				m_configurationParameters = configurationParameters;

				m_btnRefresh.Image = SIL.FieldWorks.Resources.ResourceHelper.RefreshIcon;

				m_rbDiscardAnalyses.Checked = m_mediator.PropertyTable.GetBoolProperty("RemoveAnalyses", true);
				m_rbKeepAnalyses.Checked = !m_rbDiscardAnalyses.Checked;
				m_rbDiscardAnalyses.Click += new EventHandler(m_rbDiscardAnalyses_Click);
				m_rbKeepAnalyses.Click += new EventHandler(m_rbDiscardAnalyses_Click);

				m_cbUpdateLexicon.Checked = m_mediator.PropertyTable.GetBoolProperty("UpdateLexiconIfPossible", true);
				m_cbCopyAnalyses.Checked = m_mediator.PropertyTable.GetBoolProperty("CopyAnalysesToNewSpelling", true);
				m_cbCopyAnalyses.Click += new EventHandler(m_cbCopyAnalyses_Click);
				m_cbMaintainCase.Checked = m_mediator.PropertyTable.GetBoolProperty("MaintainCaseOnChangeSpelling", true);
				m_cbMaintainCase.Click += new EventHandler(m_cbMaintainCase_Click);
				m_cache = (FdoCache)m_mediator.PropertyTable.GetValue("cache");
				m_cbNewSpelling.TextBox.MaxLength = m_cache.MaxFieldLength((int) WfiWordform.WfiWordformTags.kflidForm);
				if (m_cache.IsDummyObject(m_srcwfiWordform.Hvo))
				{
					m_srcwfiWordform = (IWfiWordform)(m_cache.LangProject.WordformInventoryOA as WordformInventory).ConvertDummyToReal(WordformInventory.ConcordanceWordformsFlid(m_cache), m_srcwfiWordform.Hvo);
					// wfClerk now has the defunct dummy wf, so it needs to be updated to include the new real wf.
					if (m_wfClerk != null)
						m_wfClerk.UpdateList(true);
				}

				// We need to use the 'best vern' ws,
				// since that is what is showing in the Words-Analyses detail edit control.
				// Access to this respeller dlg is currently (Jan. 2008) only via a context menu in the detail edit pane.
				// The user may be showing multiple wordform WSes in the left hand browse view,
				// but we have no way of knowing if the user thinks one of those alternatives is wrong without asking.
				m_vernWs = m_cache.LangProject.ActualWs(
					LangProject.kwsFirstVern,
					m_srcwfiWordform.Hvo,
					(int)WfiWordform.WfiWordformTags.kflidForm);
				// Bail out if no vernacular writing system was found (see LT-8892).
				Debug.Assert(m_vernWs != 0);
				if (m_vernWs == 0)
					return false;
				// Bail out, rather than run into a null reference exception.
				// (Should fix LT-7666.)
				if (m_srcwfiWordform.Form.GetAlternativeTss(m_vernWs) == null || m_srcwfiWordform.Form.GetAlternativeTss(m_vernWs).Length == 0)
					return false;

				m_cbNewSpelling.WritingSystemFactory = m_cache.LanguageWritingSystemFactoryAccessor;
				m_cbNewSpelling.WritingSystemCode = m_vernWs;
				m_cbNewSpelling.StyleSheet = FontHeightAdjuster.StyleSheetFromMediator(m_mediator);
				Debug.Assert(m_cbNewSpelling.StyleSheet != null); // if it is we get a HUGE default font (and can't get the correct size)
				if (m_cbNewSpelling.WritingSystemFactory.get_EngineOrNull(m_vernWs).RightToLeft)
				{
					m_cbNewSpelling.RightToLeft = RightToLeft.Yes;
				}
				m_cbNewSpelling.Tss = m_srcwfiWordform.Form.GetAlternativeTss(m_vernWs);
				m_cbNewSpelling.AdjustForStyleSheet(this, null, m_cbNewSpelling.StyleSheet);
				if (!Application.RenderWithVisualStyles)
					m_cbNewSpelling.Padding = new Padding(1, 2, 1, 1);

				SetSuggestions();

				m_btnApply.Enabled = false;
				m_cbNewSpelling.TextChanged += new EventHandler(m_dstWordform_TextChanged);

				// Setup source browse view.
				XmlNode toolNode = configurationParameters.SelectSingleNode("controls/control[@id='srcSentences']/parameters");
				m_srcClerk = RecordClerkFactory.CreateClerk(m_mediator, toolNode);
				m_srcClerk.OwningObject = m_srcwfiWordform;
				m_sourceSentences.Init(m_mediator, toolNode);

				m_sourceSentences.CheckBoxChanged += new CheckBoxChangedEventHandler(sentences_CheckBoxChanged);

				m_moreMinSize = Size;
				m_moreMinSize.Height -= m_sourceSentences.Height / 2;
				m_lessMinSize = m_moreMinSize;
				m_lessMinSize.Height -= m_optionsPanel.Height;
				AdjustHeightAndMinSize(Height - m_optionsPanel.Height, m_lessMinSize);
				m_optionsPanel.Visible = false;
				m_btnMore.Image = ResourceHelper.MoreButtonDoubleArrowIcon;
				m_btnMore.Click += new EventHandler(btnMore_Click);
				m_sMoreButtonText = m_btnMore.Text;

				m_optionsPanel.Paint += new PaintEventHandler(m_optionsPanel_Paint);
				m_btnPreviewClear.Click += new EventHandler(m_btnPreviewClear_Click);

				// no good...code in MakeRoot of XmlBrowseView happens later and overrides. Control with
				// selectionType attr in Xml configuration.
				//m_sourceSentences.BrowseViewer.SelectedRowHighlighting = XmlBrowseViewBase.SelectionHighlighting.none;

				m_lblExplainText = m_lblExplainDisabled.Text;
				// We only reload the list when refresh is pressed.
				m_srcClerk.ListLoadingSuppressed = true;
				// We initially check everything.
				m_enabledItems.AddRange(m_sourceSentences.BrowseViewer.AllItems);
				foreach (int hvoCba in m_enabledItems)
				{
					m_cache.VwCacheDaAccessor.CacheIntProp(hvoCba, m_sourceSentences.BrowseViewer.PreviewEnabledTag, 1);
					m_cache.VwCacheDaAccessor.CacheIntProp(hvoCba, XmlBrowseViewBaseVc.ktagItemSelected, 1);
				}
//.........这里部分代码省略.........
开发者ID:sillsdev,项目名称:WorldPad,代码行数:101,代码来源:RespellerDlg.cs


注:本文中的SIL.FieldWorks.FDO.FdoCache.MaxFieldLength方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。