本文整理汇总了C#中MatterHackers.MatterControl.PrintLibrary.Provider.LibraryProvider类的典型用法代码示例。如果您正苦于以下问题:C# LibraryProvider类的具体用法?C# LibraryProvider怎么用?C# LibraryProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LibraryProvider类属于MatterHackers.MatterControl.PrintLibrary.Provider命名空间,在下文中一共展示了LibraryProvider类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: LibraryDataView
public LibraryDataView()
{
currentLibraryProvider = new LibraryProviderSelector();
currentLibraryProvider.DataReloaded += LibraryDataReloaded;
if (libraryDataViewInstance != null)
{
throw new Exception("There should only ever be one of these, Lars.");
}
libraryDataViewInstance = this;
// set the display attributes
{
this.AnchorAll();
this.BackgroundColor = ActiveTheme.Instance.SecondaryBackgroundColor;
this.ScrollArea.Padding = new BorderDouble(3, 3, 5, 3);
}
ScrollArea.HAnchor = HAnchor.ParentLeftRight;
AutoScroll = true;
topToBottomItemList = new FlowLayoutWidget(FlowDirection.TopToBottom);
topToBottomItemList.HAnchor = HAnchor.ParentLeftRight;
AddChild(topToBottomItemList);
AddAllItems();
}
开发者ID:3660628v,项目名称:MatterControl,代码行数:27,代码来源:LibraryDataView.cs
示例2: LibraryRowItemCollection
public LibraryRowItemCollection(PrintItemCollection collection, LibraryDataView libraryDataView, LibraryProvider parentProvider, GuiWidget thumbnailWidget)
: base(libraryDataView, thumbnailWidget)
{
this.parentProvider = parentProvider;
this.printItemCollection = collection;
CreateGuiElements();
}
开发者ID:annafeldman,项目名称:MatterControl,代码行数:7,代码来源:LibraryRowItemCollection.cs
示例3: LibraryDataView
public LibraryDataView()
{
// let the application controler know about this window so it can use it to switch library providers if it needs to.
ApplicationController.Instance.CurrentLibraryDataView = this;
currentLibraryProvider = new LibraryProviderSelector(SetCurrentLibraryProvider, false);
currentLibraryProvider.DataReloaded += LibraryDataReloaded;
if (libraryDataViewInstance != null)
{
#if !__ANDROID__ // this is really just for debugging
throw new Exception("There should only ever be one of these, Lars.");
#endif
}
libraryDataViewInstance = this;
// set the display attributes
{
this.AnchorAll();
this.BackgroundColor = ActiveTheme.Instance.SecondaryBackgroundColor;
this.ScrollArea.Padding = new BorderDouble(3);
}
ScrollArea.HAnchor = HAnchor.ParentLeftRight;
AutoScroll = true;
topToBottomItemList = new FlowLayoutWidget(FlowDirection.TopToBottom);
topToBottomItemList.HAnchor = HAnchor.ParentLeftRight;
AddChild(topToBottomItemList);
AddAllItems();
}
开发者ID:ChapmanCPSC370,项目名称:MatterControl,代码行数:32,代码来源:LibraryDataView.cs
示例4: LibraryProviderFileSystem
public LibraryProviderFileSystem(
string rootPath, string name,
LibraryProvider parentLibraryProvider,
Action<LibraryProvider> setCurrentLibraryProvider,
bool useIncrementedNameDuringTypeChange = false)
: base(parentLibraryProvider, setCurrentLibraryProvider)
{
this.Name = name;
this.rootPath = rootPath;
// Indicates if the new AMF file should use the original file name incremented until no name collision occurs
this.useIncrementedNameDuringTypeChange = useIncrementedNameDuringTypeChange;
if (OsInformation.OperatingSystem == OSType.Windows)
{
directoryWatcher = new FileSystemWatcher();
directoryWatcher.Path = rootPath;
directoryWatcher.NotifyFilter = NotifyFilters.LastAccess | NotifyFilters.LastWrite
| NotifyFilters.FileName | NotifyFilters.DirectoryName;
directoryWatcher.Changed += DiretoryContentsChanged;
directoryWatcher.Created += DiretoryContentsChanged;
directoryWatcher.Deleted += DiretoryContentsChanged;
directoryWatcher.Renamed += DiretoryContentsChanged;
// Begin watching.
directoryWatcher.EnableRaisingEvents = true;
}
GetFilesAndCollectionsInCurrentDirectory();
}
开发者ID:tellingmachine,项目名称:MatterControl,代码行数:31,代码来源:LibraryProviderFileSystem.cs
示例5: LibraryProviderQueue
public LibraryProviderQueue(PrintItemCollection baseLibraryCollection, LibraryProvider parentLibraryProvider)
: base(parentLibraryProvider)
{
this.baseLibraryCollection = baseLibraryCollection;
QueueData.Instance.ItemAdded.RegisterEvent((sender, e) => OnDataReloaded(null), ref unregisterEvent);
}
开发者ID:sizanjavad,项目名称:MatterControl,代码行数:7,代码来源:LibraryProviderQueue.cs
示例6: LibraryProviderSQLite
public LibraryProviderSQLite(PrintItemCollection baseLibraryCollection, Action<LibraryProvider> setCurrentLibraryProvider, LibraryProvider parentLibraryProvider, string visibleName)
: base(parentLibraryProvider, setCurrentLibraryProvider)
{
this.Name = visibleName;
if (baseLibraryCollection == null)
{
baseLibraryCollection = GetRootLibraryCollection().Result;
}
this.baseLibraryCollection = baseLibraryCollection;
LoadLibraryItems();
sqliteDatabaseWatcher.Path = Path.GetDirectoryName(ApplicationDataStorage.Instance.DatastorePath);
sqliteDatabaseWatcher.NotifyFilter = NotifyFilters.LastAccess | NotifyFilters.LastWrite
| NotifyFilters.FileName | NotifyFilters.DirectoryName;
sqliteDatabaseWatcher.Changed += DatabaseFileChange;
sqliteDatabaseWatcher.Created += DatabaseFileChange;
sqliteDatabaseWatcher.Deleted += DatabaseFileChange;
sqliteDatabaseWatcher.Renamed += DatabaseFileChange;
// Begin watching.
sqliteDatabaseWatcher.EnableRaisingEvents = true;
}
开发者ID:fitzsimk,项目名称:MatterControl,代码行数:25,代码来源:LibraryProviderSqlite.cs
示例7: 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);
}
开发者ID:Joao-Fonseca,项目名称:MatterControl,代码行数:27,代码来源:LibraryRowItemPart.cs
示例8: CreateLibraryProvider
public virtual LibraryProvider CreateLibraryProvider(LibraryProvider parentLibraryProvider, Action<LibraryProvider> setCurrentLibraryProvider)
{
return new LibraryProviderFileSystem(
rootPath,
Description,
parentLibraryProvider,
setCurrentLibraryProvider,
this.useIncrementedNameDuringTypeChange);
}
开发者ID:tellingmachine,项目名称:MatterControl,代码行数:9,代码来源:LibraryProviderFileSystem.cs
示例9: LibraryRowItemCollection
public LibraryRowItemCollection(PrintItemCollection collection, LibraryProvider currentProvider, int collectionIndex, LibraryDataView libraryDataView, LibraryProvider parentProvider, GuiWidget thumbnailWidget)
: base(libraryDataView, thumbnailWidget)
{
this.currentProvider = currentProvider;
this.CollectionIndex = collectionIndex;
this.parentProvider = parentProvider;
this.printItemCollection = collection;
this.ItemName = printItemCollection.Name;
CreateGuiElements();
}
开发者ID:ddpruitt,项目名称:MatterControl,代码行数:11,代码来源:LibraryRowItemCollection.cs
示例10: LibraryProviderSQLite
public LibraryProviderSQLite(PrintItemCollection baseLibraryCollection, LibraryProvider parentLibraryProvider)
: base(parentLibraryProvider)
{
if (baseLibraryCollection == null)
{
baseLibraryCollection = GetRootLibraryCollection2(this);
}
this.baseLibraryCollection = baseLibraryCollection;
LoadLibraryItems();
}
开发者ID:annafeldman,项目名称:MatterControl,代码行数:11,代码来源:LibraryProviderSqlite.cs
示例11: LibrarySelectorRowItem
public LibrarySelectorRowItem(PrintItemCollection collection, int collectionIndex, LibrarySelectorWidget libraryDataView, LibraryProvider parentProvider, GuiWidget thumbnailWidget)
{
this.thumbnailWidget = thumbnailWidget;
this.libraryDataView = libraryDataView;
this.CollectionIndex = collectionIndex;
this.parentProvider = parentProvider;
this.printItemCollection = collection;
this.ItemName = printItemCollection.Name;
CreateGuiElements();
}
开发者ID:CodeMangler,项目名称:MatterControl,代码行数:12,代码来源:LibrarySelectorRowItem.cs
示例12: LibraryProviderSQLite
public LibraryProviderSQLite(PrintItemCollection baseLibraryCollection, LibraryProvider parentLibraryProvider, string visibleName)
: base(parentLibraryProvider)
{
this.visibleName = visibleName;
if (baseLibraryCollection == null)
{
baseLibraryCollection = GetRootLibraryCollection2(this);
}
this.baseLibraryCollection = baseLibraryCollection;
LoadLibraryItems();
}
开发者ID:sizanjavad,项目名称:MatterControl,代码行数:13,代码来源:LibraryProviderSqlite.cs
示例13: LibraryDataView
public LibraryDataView()
{
// let the application controler know about this window so it can use it to switch library providers if it needs to.
ApplicationController.Instance.CurrentLibraryDataView = this;
currentLibraryProvider = new LibraryProviderSelector(SetCurrentLibraryProvider);
currentLibraryProvider.DataReloaded += LibraryDataReloaded;
if (libraryDataViewInstance != null)
{
throw new Exception("There should only ever be one of these, Lars.");
}
libraryDataViewInstance = this;
// set the display attributes
{
this.AnchorAll();
this.BackgroundColor = ActiveTheme.Instance.SecondaryBackgroundColor;
this.ScrollArea.Padding = new BorderDouble(3, 3, 5, 3);
}
ScrollArea.HAnchor = HAnchor.ParentLeftRight;
AutoScroll = true;
topToBottomItemList = new FlowLayoutWidget(FlowDirection.TopToBottom);
topToBottomItemList.HAnchor = HAnchor.ParentLeftRight;
AddChild(topToBottomItemList);
AddAllItems();
providerMessageWidget = new TextWidget("")
{
PointSize = 8,
HAnchor = HAnchor.ParentRight,
VAnchor = VAnchor.ParentBottom,
TextColor = ActiveTheme.Instance.SecondaryTextColor,
Margin = new BorderDouble(6),
AutoExpandBoundsToText = true,
};
providerMessageContainer = new GuiWidget()
{
VAnchor = VAnchor.FitToChildren,
HAnchor = HAnchor.ParentLeftRight,
BackgroundColor = new RGBA_Bytes(ActiveTheme.Instance.SecondaryBackgroundColor, 220),
Visible = false,
};
providerMessageContainer.AddChild(providerMessageWidget);
this.AddChildToBackground(providerMessageContainer, -1);
}
开发者ID:gobrien4418,项目名称:MatterControl,代码行数:51,代码来源:LibraryDataView.cs
示例14: FolderBreadCrumbWidget
public FolderBreadCrumbWidget(Action<LibraryProvider> SwitchToLibraryProvider, LibraryProvider currentLibraryProvider)
{
this.Name = "FolderBreadCrumbWidget";
this.SwitchToLibraryProvider = SwitchToLibraryProvider;
UiThread.RunOnIdle(() => SetBreadCrumbs(null, currentLibraryProvider));
navigationButtonFactory.normalTextColor = ActiveTheme.Instance.PrimaryTextColor;
navigationButtonFactory.hoverTextColor = ActiveTheme.Instance.PrimaryTextColor;
navigationButtonFactory.pressedTextColor = ActiveTheme.Instance.PrimaryTextColor;
navigationButtonFactory.disabledTextColor = ActiveTheme.Instance.PrimaryTextColor;
navigationButtonFactory.disabledFillColor = navigationButtonFactory.normalFillColor;
navigationButtonFactory.Margin = new BorderDouble(10, 0);
navigationButtonFactory.borderWidth = 0;
}
开发者ID:Joao-Fonseca,项目名称:MatterControl,代码行数:14,代码来源:FolderBreadCrumbWidget.cs
示例15: LibraryProviderSQLite
public LibraryProviderSQLite(PrintItemCollection baseLibraryCollection, Action<LibraryProvider> setCurrentLibraryProvider, LibraryProvider parentLibraryProvider, string visibleName)
: base(parentLibraryProvider)
{
this.setCurrentLibraryProvider = setCurrentLibraryProvider;
this.Name = visibleName;
if (baseLibraryCollection == null)
{
baseLibraryCollection = GetRootLibraryCollection().Result;
}
this.baseLibraryCollection = baseLibraryCollection;
LoadLibraryItems();
}
开发者ID:gobrien4418,项目名称:MatterControl,代码行数:14,代码来源:LibraryProviderSqlite.cs
示例16: LibraryProviderSQLite
public LibraryProviderSQLite(PrintItemCollection baseLibraryCollection, Action<LibraryProvider> setCurrentLibraryProvider, LibraryProvider parentLibraryProvider, string visibleName)
: base(parentLibraryProvider, setCurrentLibraryProvider)
{
this.Name = visibleName;
if (baseLibraryCollection == null)
{
baseLibraryCollection = GetRootLibraryCollection().Result;
}
this.baseLibraryCollection = baseLibraryCollection;
LoadLibraryItems();
ItemAdded.RegisterEvent(DatabaseFileChange, ref unregisterEvents);
}
开发者ID:ChapmanCPSC370,项目名称:MatterControl,代码行数:15,代码来源:LibraryProviderSqlite.cs
示例17: LibraryProviderSQLite
public LibraryProviderSQLite(PrintItemCollection callerSuppliedCollection, Action<LibraryProvider> setCurrentLibraryProvider, LibraryProvider parentLibraryProvider, string visibleName)
: base(parentLibraryProvider, setCurrentLibraryProvider)
{
this.Name = visibleName;
// Lock ensures that SQLite providers initialized near the same time from different threads (which has been observed during debug)
// will run in a serial fashion and only one instance will construct and assign to .baseLibraryCollection
lock (initializingLock)
{
// Use null coalescing operator to assign either the caller supplied collection or if null, the root library collection
this.baseLibraryCollection = callerSuppliedCollection ?? GetRootLibraryCollection();
}
LoadLibraryItems();
ItemAdded.RegisterEvent(DatabaseFileChange, ref unregisterEvents);
}
开发者ID:tellingmachine,项目名称:MatterControl,代码行数:17,代码来源:LibraryProviderSqlite.cs
示例18: 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();
}
开发者ID:3660628v,项目名称:MatterControl,代码行数:18,代码来源:LibraryRowItemPart.cs
示例19: LibraryProviderFileSystem
public LibraryProviderFileSystem(string rootPath, string name, LibraryProvider parentLibraryProvider)
: base(parentLibraryProvider)
{
this.Name = name;
this.rootPath = rootPath;
directoryWatcher.Path = rootPath;
directoryWatcher.NotifyFilter = NotifyFilters.LastAccess | NotifyFilters.LastWrite
| NotifyFilters.FileName | NotifyFilters.DirectoryName;
directoryWatcher.Changed += DiretoryContentsChanged;
directoryWatcher.Created += DiretoryContentsChanged;
directoryWatcher.Deleted += DiretoryContentsChanged;
directoryWatcher.Renamed += DiretoryContentsChanged;
// Begin watching.
directoryWatcher.EnableRaisingEvents = true;
GetFilesAndCollectionsInCurrentDirectory();
}
开发者ID:gobrien4418,项目名称:MatterControl,代码行数:20,代码来源:LibraryProviderFileSystem.cs
示例20: LibraryRowItemCollection
public LibraryRowItemCollection(PrintItemCollection collection, LibraryProvider currentProvider, int collectionIndex, LibraryDataView libraryDataView, LibraryProvider parentProvider, GuiWidget thumbnailWidget, string openButtonText)
: base(libraryDataView, thumbnailWidget)
{
this.openButtonText = openButtonText;
this.currentProvider = currentProvider;
this.CollectionIndex = collectionIndex;
this.parentProvider = parentProvider;
this.printItemCollection = collection;
this.ItemName = printItemCollection.Name;
this.Name = this.ItemName + " Row Item Collection";
if (collection.Key == LibraryRowItem.LoadingPlaceholderToken)
{
this.EnableSlideInActions = false;
this.IsViewHelperItem = true;
}
CreateGuiElements();
}
开发者ID:ChapmanCPSC370,项目名称:MatterControl,代码行数:20,代码来源:LibraryRowItemCollection.cs
注:本文中的MatterHackers.MatterControl.PrintLibrary.Provider.LibraryProvider类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论