本文整理汇总了C#中IPage.GetCaptionOrPageNumber方法的典型用法代码示例。如果您正苦于以下问题:C# IPage.GetCaptionOrPageNumber方法的具体用法?C# IPage.GetCaptionOrPageNumber怎么用?C# IPage.GetCaptionOrPageNumber使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IPage
的用法示例。
在下文中一共展示了IPage.GetCaptionOrPageNumber方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddOnePage
private void AddOnePage(IPage page, ref int pageNumber)
{
var label = PreferPageNumbers ? page.GetCaptionOrPageNumber(ref pageNumber) : page.Caption;
ListViewItem item = new ListViewItem(label, 0);
item.Tag = page;
Image thumbnail = Resources.PagePlaceHolder; ;
if (page is PlaceHolderPage)
thumbnail = _placeHolderImage;
_thumbnailImageList.Images.Add(page.Id, thumbnail);
item.ImageIndex = _thumbnailImageList.Images.Count - 1;
_listView.Items.Add(item);
if (!(page is PlaceHolderPage))
{
UpdateThumbnailAsync(page);
}
}
示例2: AddOnePage
private void AddOnePage(IPage page, ref int pageNumber)
{
string captioni18nId = page.CaptionI18nId;
var label = PreferPageNumbers ? page.GetCaptionOrPageNumber(ref pageNumber, out captioni18nId) : page.Caption;
label = I18NHandler.GetTranslationDefaultMayNotBeEnglish(captioni18nId, label);
ListViewItem item = new ListViewItem(label, 0);
item.Tag = page;
Image thumbnail = Resources.PagePlaceHolder; ;
if (page is PlaceHolderPage)
thumbnail = _placeHolderImage;
_thumbnailImageList.Images.Add(page.Id, thumbnail);
item.ImageIndex = _thumbnailImageList.Images.Count - 1;
_listView.Items.Add(item);
if (!(page is PlaceHolderPage))
{
UpdateThumbnailAsync(page);
}
}
示例3: AddOnePage
private void AddOnePage(IPage page, ref int pageNumber)
{
var label = PreferPageNumbers ? page.GetCaptionOrPageNumber(ref pageNumber) : page.Caption;
label = LocalizationManager.GetDynamicString("Bloom", "EditTab.ThumbnailCaptions." + label, label);
ListViewItem item = new ListViewItem(label, 0);
item.Tag = page;
Image thumbnail = Resources.PagePlaceHolder; ;
if (page is PlaceHolderPage)
thumbnail = _placeHolderImage;
_thumbnailImageList.Images.Add(page.Id, thumbnail);
item.ImageIndex = _thumbnailImageList.Images.Count - 1;
_listView.Items.Add(item);
if (!(page is PlaceHolderPage))
{
UpdateThumbnailAsync(page);
}
}