本文整理汇总了C#中MatterHackers.MatterControl.PrintLibrary.Provider.LibraryProvider.RegisterForProgress方法的典型用法代码示例。如果您正苦于以下问题:C# LibraryProvider.RegisterForProgress方法的具体用法?C# LibraryProvider.RegisterForProgress怎么用?C# LibraryProvider.RegisterForProgress使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MatterHackers.MatterControl.PrintLibrary.Provider.LibraryProvider
的用法示例。
在下文中一共展示了LibraryProvider.RegisterForProgress方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LibraryRowItemPart
public LibraryRowItemPart(LibraryProvider libraryProvider, int itemIndex, LibraryDataView libraryDataView, GuiWidget thumbnailWidget)
: base(libraryDataView, thumbnailWidget)
{
thumbnailWidth = thumbnailWidget.Width;
var widget = thumbnailWidget as IClickable;
if (widget != null)
{
widget.Click += onViewPartClick;
}
this.ItemName = libraryProvider.GetPrintItemName(itemIndex);
this.libraryProvider = libraryProvider;
this.ItemIndex = itemIndex;
CreateGuiElements();
AddLoadingProgressBar();
libraryProvider.RegisterForProgress(itemIndex, ReportProgressRatio);
}
示例2: LibraryRowItemPart
public LibraryRowItemPart(LibraryProvider libraryProvider, int itemIndex, LibraryDataView libraryDataView, GuiWidget thumbnailWidget)
: base(libraryDataView, thumbnailWidget)
{
thumbnailWidth = thumbnailWidget.Width;
var widget = thumbnailWidget as IClickable;
if (widget != null)
{
widget.Click += onViewPartClick;
}
this.ItemName = libraryProvider.GetPrintItemName(itemIndex);
if(this.ItemName == LibraryRowItem.LoadingPlaceholderToken)
{
this.ItemName = "Retrieving Contents...".Localize();
this.IsViewHelperItem = true;
this.EnableSlideInActions = false;
}
this.libraryProvider = libraryProvider;
this.ItemIndex = itemIndex;
CreateGuiElements();
AddLoadingProgressBar();
libraryProvider.RegisterForProgress(itemIndex, ReportProgressRatio);
}