本文整理汇总了C#中MatterHackers.MatterControl.PrintQueue.PrintItemWrapper.OnFileHasChanged方法的典型用法代码示例。如果您正苦于以下问题:C# PrintItemWrapper.OnFileHasChanged方法的具体用法?C# PrintItemWrapper.OnFileHasChanged怎么用?C# PrintItemWrapper.OnFileHasChanged使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MatterHackers.MatterControl.PrintQueue.PrintItemWrapper
的用法示例。
在下文中一共展示了PrintItemWrapper.OnFileHasChanged方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SaveToLibraryFolder
static public void SaveToLibraryFolder(PrintItemWrapper printItemWrapper, List<MeshGroup> meshGroups, bool AbsolutePositioned)
{
string[] metaData = { "Created By", "MatterControl" };
if (AbsolutePositioned)
{
metaData = new string[] { "Created By", "MatterControl", "BedPosition", "Absolute" };
}
if (printItemWrapper.FileLocation.Contains(ApplicationDataStorage.Instance.ApplicationLibraryDataPath))
{
MeshOutputSettings outputInfo = new MeshOutputSettings(MeshOutputSettings.OutputType.Binary, metaData);
MeshFileIo.Save(meshGroups, printItemWrapper.FileLocation, outputInfo);
}
else // save a copy to the library and update this to point at it
{
string fileName = Path.ChangeExtension(Path.GetRandomFileName(), ".amf");
printItemWrapper.FileLocation = Path.Combine(ApplicationDataStorage.Instance.ApplicationLibraryDataPath, fileName);
MeshOutputSettings outputInfo = new MeshOutputSettings(MeshOutputSettings.OutputType.Binary, metaData);
MeshFileIo.Save(meshGroups, printItemWrapper.FileLocation, outputInfo);
printItemWrapper.PrintItem.Commit();
// let the queue know that the item has changed so it load the correct part
QueueData.Instance.SaveDefaultQueue();
}
printItemWrapper.OnFileHasChanged();
}