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


C# IScrBook类代码示例

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


IScrBook类属于命名空间,在下文中一共展示了IScrBook类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: TestTearDown

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

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

示例10: 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

示例11: 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

示例12: 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

示例13: Exit

		public override void Exit()
		{
			CheckDisposed();

			m_genesis = null;

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

示例14: TestTearDown

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

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

示例15: 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


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