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


C# IScripture.FindOrCreateDefaultImportSettings方法代码示例

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


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

示例1: ImportWizard

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Constructor for runtime.
		/// </summary>
		/// <param name="langProjName">Name of the lang proj.</param>
		/// <param name="scr">The Scripture object.</param>
		/// <param name="styleSheet">The styleSheet</param>
		/// <param name="helpTopicProvider">The help topic provider.</param>
		/// <param name="app">The app.</param>
		/// ------------------------------------------------------------------------------------
		public ImportWizard(string langProjName, IScripture scr, FwStyleSheet styleSheet,
			IHelpTopicProvider helpTopicProvider, IApp app) : this()
		{
			m_LangProjName = langProjName;
			m_scr = scr;
			m_helpTopicProvider = helpTopicProvider;
			m_app = app;
			m_StyleSheet = styleSheet;
			m_resolver = new ConfirmOverlappingFileReplaceDialog(helpTopicProvider);
			m_cache = scr.Cache;

			// Attempt to get the default import settings.
			m_settings = m_scr.FindOrCreateDefaultImportSettings(TypeOfImport.Unknown);
			if (m_settings.ImportTypeEnum == TypeOfImport.Unknown)
				m_settings.ImportTypeEnum = TypeOfImport.Paratext6;

			InitializeScrImportSettings();

			// Initialize controls based on settings provided
			switch (m_settings.ImportTypeEnum)
			{
				case TypeOfImport.Paratext6:
					rbParatext6.Checked = true;
					break;
				case TypeOfImport.Other:
					rbOther.Checked = true;
					break;
				case TypeOfImport.Paratext5:
					rbParatext5.Checked = true;
					break;
			}
			if (m_helpTopicProvider == null)
				m_btnHelp.Visible = false;
			if (m_app != null)
			{
				m_LatestImportFolder = new RegistryStringSetting(FwSubKey.TE, m_scr.Cache.ProjectId.Name,
					"LatestImportDirectory", string.Empty);
				sfFileListBuilder.LatestImportFolder = m_LatestImportFolder.Value;
			}
			sfFileListBuilder.Initialize(m_helpTopicProvider, m_app);

			if (m_StyleSheet != null)
			{
				m_scrViewHelper = new StyleListViewHelper(lvScrMappings, 1);
				m_scrViewHelper.AddStyles(m_StyleSheet, MappingDetailsCtrl.AllPseudoStyles);
				m_annotationViewHelper = new StyleListViewHelper(lvAnnotationMappings, 1);
				m_annotationViewHelper.AddStyles(m_StyleSheet,
					MappingDetailsCtrl.AllPseudoStyles);
			}
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:60,代码来源:ImportWizard.cs


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