• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IScrBook类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IScrBook的典型用法代码示例。如果您正苦于以下问题:C# IScrBook类的具体用法?C# IScrBook怎么用?C# IScrBook使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IScrBook类属于命名空间,在下文中一共展示了IScrBook类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: DiffViewProxy

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="T:DiffViewProxy"/> class.
		/// </summary>
		/// <param name="dlg">The instance of the DiffDialog displaying this view.</param>
		/// <param name="name">The (internal) name of the view.</param>
		/// <param name="book">The book to display.</param>
		/// <param name="fRev"><c>true</c> if this proxy is for the side representing the saved
		/// or imported version</param>
		/// ------------------------------------------------------------------------------------
		internal DiffViewProxy(DiffDialog dlg, string name, IScrBook book, bool fRev)
			: base(name, false)
		{
			m_dlg = dlg;
			m_book = book;
			m_fIsRevision = fRev;
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:17,代码来源:DiffViewProxy.cs


示例2: BookPropertiesDialog

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="BookPropertiesDialog"/> class.
		/// </summary>
		/// <param name="book">the current book</param>
		/// <param name="stylesheet">The stylesheet.</param>
		/// <param name="helpTopicProvider">The help topic provider.</param>
		/// ------------------------------------------------------------------------------------
		public BookPropertiesDialog(IScrBook book, IVwStylesheet stylesheet, IHelpTopicProvider helpTopicProvider)
		{
			m_currentBook = book;
			m_helpTopicProvider = helpTopicProvider;
			// TE-5663: make sure the book's name and abbreviation are updated if some were added
			IScrRefSystem scrRefSystem = book.Cache.ServiceLocator.GetInstance<IScrRefSystemRepository>().AllInstances().FirstOrDefault();
			book.Name.MergeAlternatives(scrRefSystem.BooksOS[book.CanonicalNum - 1].BookName);
			book.Abbrev.MergeAlternatives(scrRefSystem.BooksOS[book.CanonicalNum - 1].BookAbbrev);

			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			// Put the book name in the dialog caption
			Text = string.Format(Text, book.Name.UserDefaultWritingSystem.Text);

			m_listBookInfo.Cache = book.Cache;
			m_listBookInfo.FieldsToDisplay.Add(new FwMultilingualPropView.ColumnInfo(
				ScrBookTags.kflidName, TeResourceHelper.GetResourceString("kstidBookNameColHeader"), 60));
			m_listBookInfo.FieldsToDisplay.Add(new FwMultilingualPropView.ColumnInfo(
				ScrBookTags.kflidAbbrev, TeResourceHelper.GetResourceString("kstidBookAbbrevColHeader"), 40));
			m_listBookInfo.RootObject = book.Hvo;

			foreach (IWritingSystem ws in book.Cache.ServiceLocator.WritingSystems.AllWritingSystems)
				m_listBookInfo.WritingSystemsToDisplay.Add(ws.Handle);

			// Initialize the ID textbox.
			m_txtScrBookIdText.Text = m_currentBook.IdText;
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:38,代码来源:BookPropertiesDialog.cs


示例3: BookPropertiesDialog

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="BookPropertiesDialog"/> class.
		/// </summary>
		/// <param name="book">the current book</param>
		/// <param name="stylesheet">The stylesheet.</param>
		/// ------------------------------------------------------------------------------------
		public BookPropertiesDialog(IScrBook book, IVwStylesheet stylesheet)
		{
			m_currentBook = book;
			// TE-5663: make sure the book's name and abbreviation are updated if some were added
			book.Name.CopyAlternatives(
				((ScrBookRef)book.Cache.ScriptureReferenceSystem.BooksOS[book.CanonicalNum - 1]).BookName, true);
			book.Abbrev.CopyAlternatives(
				((ScrBookRef)book.Cache.ScriptureReferenceSystem.BooksOS[book.CanonicalNum - 1]).BookAbbrev, true);

			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			// Put the book name in the dialog caption
			Text = string.Format(Text, book.Name.UserDefaultWritingSystem);

			m_listBookInfo.Cache = book.Cache;
			m_listBookInfo.FieldsToDisplay.Add(new FwMultilingualPropView.ColumnInfo(
				(int)ScrBook.ScrBookTags.kflidName, TeResourceHelper.GetResourceString("kstidBookNameColHeader"),
				60));
			m_listBookInfo.FieldsToDisplay.Add(new FwMultilingualPropView.ColumnInfo(
				(int)ScrBook.ScrBookTags.kflidAbbrev, TeResourceHelper.GetResourceString("kstidBookAbbrevColHeader"),
				40));
			m_listBookInfo.RootObject = book.Hvo;

			foreach (int ws in book.Cache.LangProject.CurrentAnalysisAndVernWss)
				m_listBookInfo.WritingSystemsToDisplay.Add(ws);

			// Initialize the ID textbox.
			m_txtScrBookIdText.Text = m_currentBook.IdText;
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:39,代码来源:BookPropertiesDialog.cs


示例4: UndoImportModifiedBookAction

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="T:UndoImportOverriddenBookAction"/>
		/// class.
		/// </summary>
		/// <param name="manager">A class that manages undoable aspects of importing and holds
		/// the state info needed for importing and later undoing the import.</param>
		/// <param name="existingBook">The existing book.</param>
		/// <remarks>This is internal because we only want UndoImportManager to create these
		/// </remarks>
		/// ------------------------------------------------------------------------------------
		internal UndoImportModifiedBookAction(UndoImportManager manager, IScrBook existingBook)
			: base()
		{
			m_manager = manager;
			m_canonicalBookNum = existingBook.CanonicalNum;
			m_manager.ScriptureObj.AddBookToSavedVersion(manager.BackupVersion, existingBook);
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:18,代码来源:UndoImportModifiedBookAction.cs


示例5: Swap

		/// <summary>
		/// Do the actual swap. Also issues a ksyncReloadScriptureControl, which seems to be
		/// needed any time we change the list of active books.
		/// </summary>
		/// <param name="bookOld"></param>
		/// <param name="bookNew"></param>
		private void Swap(IScrBook bookOld, IScrBook bookNew)
		{
			if (m_app != null) // app may be null in tests
			{
				foreach (FwMainWnd wnd in m_app.MainWindows)
					Swap(bookOld, bookNew, wnd);
			}
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:14,代码来源:ReplaceInFilterFixer.cs


示例6: DiffFootnoteView

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the DiffFootnoteView class
		/// </summary>
		/// <param name="cache">The FDO cache.</param>
		/// <param name="book">Scripture book to be displayed as the root in this view</param>
		/// <param name="differences">the list of differences</param>
		/// <param name="fRev"><c>true</c> if we display the revision, <c>false</c> if we
		/// display the current version.</param>
		/// <param name="filterInstance">The filter instance.</param>
		/// ------------------------------------------------------------------------------------
		public DiffFootnoteView(FdoCache cache, IScrBook book, DifferenceList differences,
			bool fRev, int filterInstance) : base(cache)
		{
			m_filterInstance = filterInstance;
			m_scrBook = book;
			m_Differences = differences;
			m_fRev = fRev;
			Editable = false;
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:20,代码来源:DiffFootnoteView.cs


示例7: CreateSection

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Append a new section to the given book, having the specified text as the section
		/// head. The general section head paragraph style is used.
		/// </summary>
		/// <param name="testBase">in-memory test base class</param>
		/// <param name="book">The book to which the section is to be appended</param>
		/// <param name="sSectionHead">The text of the new section head</param>
		/// <returns>The newly created section</returns>
		/// ------------------------------------------------------------------------------------
		internal static IScrSection CreateSection(ScrInMemoryFdoTestBase testBase, IScrBook book,
			string sSectionHead)
		{
			IScrSection section = CreateSection(testBase, book, sSectionHead, ScrStyleNames.SectionHead);
			// this should be a scripture section and not an intro section
			bool isIntro = false;
			section.VerseRefEnd = book.CanonicalNum * 1000000 + 1000 + ((isIntro) ? 0 : 1);
			return section;
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:19,代码来源:ExportHelper.cs


示例8: CreateSection

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Append a new section to the given book, having the specified text as the section
		/// head. The general section head paragraph style is used.
		/// </summary>
		/// <param name="scrInMemoryCache">in-memory cache to use for testing</param>
		/// <param name="book">The book to which the section is to be appended</param>
		/// <param name="sSectionHead">The text of the new section head</param>
		/// <returns>The newly created section</returns>
		/// ------------------------------------------------------------------------------------
		internal static ScrSection CreateSection(ScrInMemoryFdoCache scrInMemoryCache, IScrBook book,
			string sSectionHead)
		{
			ScrSection section = CreateSection(scrInMemoryCache, book, sSectionHead, ScrStyleNames.SectionHead);
			// this should be a scripture section and not an intro section
			bool isIntro = false;
			section.VerseRefEnd = book.CanonicalNum * 1000000 + 1000 + ((isIntro) ? 0 : 1);
			section.AdjustReferences();
			return section;
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:20,代码来源:ExportHelper.cs


示例9: TestSetup

		/// <summary>
		///
		/// </summary>
		public override void TestSetup()
		{
			base.TestSetup();

			m_wsVern = Cache.DefaultVernWs;
			m_wsTrans = Cache.DefaultAnalWs;
			m_book = Cache.ServiceLocator.GetInstance<IScrBookFactory>().Create(1);
			m_section = Cache.ServiceLocator.GetInstance<IScrSectionFactory>().Create();
			m_book.SectionsOS.Add(m_section);
			m_section.ContentOA = m_text = Cache.ServiceLocator.GetInstance<IStTextFactory>().Create(); ;
			m_para = m_text.AddNewTextPara(ScrStyleNames.NormalParagraph);
		}
开发者ID:sillsdev,项目名称:FieldWorks,代码行数:15,代码来源:FreeTransEditMonitorTests.cs


示例10: DiffView

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the DiffView class
		/// </summary>
		/// <param name="cache">The cache.</param>
		/// <param name="book">Scripture book to be displayed as the root in this view</param>
		/// <param name="differences">List of differences</param>
		/// <param name="fRev"><c>true</c> if we display the revision, <c>false</c> if we
		/// display the current version.</param>
		/// <param name="filterInstance">The filter instance.</param>
		/// ------------------------------------------------------------------------------------
		public DiffView(FdoCache cache, IScrBook book, DifferenceList differences, bool fRev,
			int filterInstance)
			: base(cache)
		{
			m_filterInstance = filterInstance;
			m_scrBook = book;
			m_Differences = differences;
			m_fRev = fRev;

			// This call is required by the Windows.Forms Form Designer.
			InitializeComponent();

			BackColor = SystemColors.Window;
			Editable = false;
			HorizMargin = 10;
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:27,代码来源:DiffView.cs


示例11: SetupSelectionInFootnote

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Setup the selection in footnote.
		/// </summary>
		/// <param name="footnote">The footnote.</param>
		/// <param name="book">The book.</param>
		/// <param name="iBook">The 0-based index of the book.</param>
		/// <param name="ichStart">The 0-based starting character index.</param>
		/// <param name="ichEnd">The 0-based ending character index.</param>
		/// ------------------------------------------------------------------------------------
		public void SetupSelectionInFootnote(IStFootnote footnote, IScrBook book,
			int iBook, int ichStart, int ichEnd)
		{
			CheckDisposed();

			DynamicMock fakeSelHelper = new DynamicMock(typeof(SelectionHelper));
			fakeSelHelper.SetupResult("GetTextPropId", StTxtParaTags.kflidContents, typeof(SelectionHelper.SelLimitType));
			fakeSelHelper.SetupResult("NumberOfLevels", 3);
			// Setup the anchor
			SelLevInfo[] topInfo = new SelLevInfo[3];
			IStTxtPara para = footnote[0];
			topInfo[0].tag = StTextTags.kflidParagraphs;
			topInfo[0].ihvo = 0;	// only one para per footnote allowed
			topInfo[0].hvo = para.Hvo;

			topInfo[1].tag = ScrBookTags.kflidFootnotes;
			topInfo[1].ihvo = footnote.IndexInOwner;
			topInfo[1].hvo = footnote.Hvo;

			topInfo[2].tag = BookFilter.Tag;
			topInfo[2].ihvo = iBook;
			topInfo[2].hvo = book.Hvo;

			// Setup the end
			SelLevInfo[] bottomInfo = new SelLevInfo[3];
			for(int i = 0; i < 3; i++)
				bottomInfo[i] = topInfo[i];

			fakeSelHelper.SetupResult("LevelInfo", topInfo);
			fakeSelHelper.SetupResult("IchAnchor", ichStart);
			fakeSelHelper.SetupResult("IchEnd", ichEnd);
			fakeSelHelper.SetupResultForParams("GetLevelInfo", topInfo,
				SelectionHelper.SelLimitType.Top);
			fakeSelHelper.SetupResultForParams("GetLevelInfo", topInfo,
				SelectionHelper.SelLimitType.Anchor);
			fakeSelHelper.SetupResultForParams("GetLevelInfo", bottomInfo,
				SelectionHelper.SelLimitType.Bottom);
			fakeSelHelper.SetupResultForParams("GetLevelInfo", bottomInfo,
				SelectionHelper.SelLimitType.End);
			fakeSelHelper.SetupResultForParams("GetIch", ichStart,
				SelectionHelper.SelLimitType.Top);
			fakeSelHelper.SetupResultForParams("GetIch", ichEnd,
				SelectionHelper.SelLimitType.Bottom);
			m_currentSelection = (SelectionHelper)fakeSelHelper.MockInstance;
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:55,代码来源:FootnoteEditingHelperTests.cs


示例12: TestTearDown

		public override void TestTearDown()
		{
			m_genesis = null;
			m_genesisRevision = null;

			base.TestTearDown();
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:7,代码来源:ClusterTests.cs


示例13: CreateTestData

		/// ------------------------------------------------------------------------------------
		/// <summary>
		///
		/// </summary>
		/// ------------------------------------------------------------------------------------
		protected override void CreateTestData()
		{
			m_stylesheet = new FwStyleSheet();
			m_stylesheet.Init(Cache, m_scr.Hvo, ScriptureTags.kflidStyles);

			m_exodus = AddBookToMockedScripture(2, "Exodus");
			AddTitleToMockedBook(m_exodus, "Exodus");

			IScrSection section = AddSectionToMockedBook(m_exodus);
			AddSectionHeadParaToSection(section, "Section Heading", ScrStyleNames.SectionHead);
			IScrTxtPara para = AddParaToMockedSectionContent(section, ScrStyleNames.NormalParagraph);
			AddRunToMockedPara(para, "1", ScrStyleNames.ChapterNumber);
			AddRunToMockedPara(para, "1", ScrStyleNames.VerseNumber);
			AddRunToMockedPara(para, "Verse one. ", null);
			AddRunToMockedPara(para, "2", ScrStyleNames.VerseNumber);
			AddRunToMockedPara(para, "Verse two.", null);
			AddRunToMockedPara(para, "3", ScrStyleNames.VerseNumber);
			AddRunToMockedPara(para, "Verse three.", null);
			AddRunToMockedPara(para, "4", ScrStyleNames.VerseNumber);
			AddRunToMockedPara(para, "Verse four. ", null);
			AddRunToMockedPara(para, "5", ScrStyleNames.VerseNumber);
			AddRunToMockedPara(para, "Verse five.", null);
			AddRunToMockedPara(para, "6", ScrStyleNames.VerseNumber);
			AddRunToMockedPara(para, "Verse six. ", null);
			AddRunToMockedPara(para, "7", ScrStyleNames.VerseNumber);
			AddRunToMockedPara(para, "Verse seven.", null);
			AddRunToMockedPara(para, "8", ScrStyleNames.VerseNumber);
			AddRunToMockedPara(para, "Verse seven.", null);
			AddRunToMockedPara(para, "9", ScrStyleNames.VerseNumber);
			AddRunToMockedPara(para, "Verse seven.", null);
			AddRunToMockedPara(para, "10", ScrStyleNames.VerseNumber);
			AddRunToMockedPara(para, "Verse seven.", null);
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:38,代码来源:ScripturePropertiesTests.cs


示例14: TestSetup

		/// <summary>
		///
		/// </summary>
		public override void TestSetup()
		{
			base.TestSetup();

			m_vc = new DummyTeNotesVc(Cache);
			m_gen = AddBookWithTwoSections(1, "Genesis");
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:10,代码来源:TeNotesVcTests.cs


示例15: CreateTestData

		private ITsString m_tssVerse; // text to include in a verse

		#region Setup

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Overridden to only create a book with no content, heading, title, etc.
		/// </summary>
		/// ------------------------------------------------------------------------------------
		protected override void CreateTestData()
		{
			m_genesis = AddBookToMockedScripture(1, "Genesis");
			m_genesisRevision = AddArchiveBookToMockedScripture(1, "Genesis");

			m_tssVerse = TsStringUtils.MakeTss("verse text", Cache.DefaultVernWs);
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:16,代码来源:ClusterTests.cs


示例16: Exit

		public override void Exit()
		{
			CheckDisposed();

			m_genesis = null;

			base.Exit();
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:8,代码来源:ScrVerseTests.cs


示例17: TestTearDown

		public override void TestTearDown()
		{
			m_booksToMerge.Dispose();
			m_booksToMerge = null;
			m_genesisRevision = null;

			base.TestTearDown();
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:8,代码来源:BookRevListTests.cs


示例18: TestTearDown

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Override to end the undoable UOW, Undo everything, and 'commit',
		/// which will essentially clear out the Redo stack.
		/// </summary>
		/// ------------------------------------------------------------------------------------
		public override void TestTearDown()
		{
			m_philemon = null;
			m_section = null;
			m_para = null;

			base.TestTearDown();
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:14,代码来源:TeEditingHelper_FindFootnoteNearSelectionTests.cs


示例19: TestTearDown

		public override void TestTearDown()
		{
			m_phm = null;
			m_phmBkRef = null;
			m_stylesheet = null;

			base.TestTearDown();
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:8,代码来源:BookPropertiesTests.cs


示例20: TestTearDown

		/// -----------------------------------------------------------------------------------
		/// <summary>
		/// Close the footnote view
		/// </summary>
		/// -----------------------------------------------------------------------------------
		public override void TestTearDown()
		{
			m_footnoteView = null; // m_footnoteForm made it, and disposes it.
			m_footnoteForm.Close(); // This should also dispose it.
			m_footnoteForm = null;
			m_Jude = null;

			base.TestTearDown(); // If it isn't last, we get some C++ error
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:14,代码来源:FootnoteViewTests.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IScreen类代码示例发布时间:2022-05-24
下一篇:
C# IScope类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap