本文整理汇总了C#中MatterHackers.Agg.UI.FileDropEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# FileDropEventArgs类的具体用法?C# FileDropEventArgs怎么用?C# FileDropEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FileDropEventArgs类属于MatterHackers.Agg.UI命名空间,在下文中一共展示了FileDropEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: OnDragDrop
public override void OnDragDrop(FileDropEventArgs fileDropEventArgs)
{
libraryDataView.CurrentLibraryProvider.AddFilesToLibrary(fileDropEventArgs.DroppedFiles);
base.OnDragDrop(fileDropEventArgs);
}
开发者ID:ddpruitt,项目名称:MatterControl,代码行数:6,代码来源:PrintLibraryWidget.cs
示例2: OnDragOver
public override void OnDragOver(FileDropEventArgs fileDropEventArgs)
{
if (libraryDataView != null
&& libraryDataView.CurrentLibraryProvider != null
&& !libraryDataView.CurrentLibraryProvider.IsProtected())
{
foreach (string file in fileDropEventArgs.DroppedFiles)
{
string extension = Path.GetExtension(file).ToUpper();
if ((extension != "" && MeshFileIo.ValidFileExtensions().Contains(extension))
|| extension == ".GCODE"
|| extension == ".ZIP")
{
fileDropEventArgs.AcceptDrop = true;
break;
}
}
}
base.OnDragOver(fileDropEventArgs);
}
开发者ID:unlimitedbacon,项目名称:MatterControl,代码行数:20,代码来源:PrintLibraryWidget.cs
示例3: OnDragDrop
public override void OnDragDrop(FileDropEventArgs fileDropEventArgs)
{
foreach (string droppedFileName in fileDropEventArgs.DroppedFiles)
{
string extension = Path.GetExtension(droppedFileName).ToUpper();
if (extension == ".STL" || extension == ".GCODE")
{
QueueData.Instance.AddItem(new PrintItemWrapper(new PrintItem(Path.GetFileNameWithoutExtension(droppedFileName), Path.GetFullPath(droppedFileName))));
}
else if (extension == ".ZIP")
{
ProjectFileHandler project = new ProjectFileHandler(null);
List<PrintItem> partFiles = project.ImportFromProjectArchive(droppedFileName);
if (partFiles != null)
{
foreach (PrintItem part in partFiles)
{
QueueData.Instance.AddItem(new PrintItemWrapper(new PrintItem(part.Name, part.FileLocation)));
}
}
}
}
base.OnDragDrop(fileDropEventArgs);
}
开发者ID:klewisjohnson,项目名称:MatterControl,代码行数:25,代码来源:QueueBottomToolbar.cs
示例4: OnDragOver
public override void OnDragOver(FileDropEventArgs fileDropEventArgs)
{
foreach (string file in fileDropEventArgs.DroppedFiles)
{
string extension = Path.GetExtension(file).ToUpper();
if ((extension != "" && MeshFileIo.ValidFileExtensions().Contains(extension))
|| extension == ".GCODE"
|| extension == ".ZIP")
{
fileDropEventArgs.AcceptDrop = true;
break;
}
}
base.OnDragOver(fileDropEventArgs);
}
开发者ID:ddpruitt,项目名称:MatterControl,代码行数:15,代码来源:PrintLibraryWidget.cs
示例5: OnDragOver
public override void OnDragOver(FileDropEventArgs fileDropEventArgs)
{
foreach (string file in fileDropEventArgs.DroppedFiles)
{
string extension = Path.GetExtension(file).ToUpper();
if (extension == ".STL" || extension == ".GCODE")
{
fileDropEventArgs.AcceptDrop = true;
}
}
base.OnDragOver(fileDropEventArgs);
}
开发者ID:rubenkar,项目名称:MatterControl,代码行数:12,代码来源:PrintLibraryWidget.cs
示例6: OnDragDrop
public override void OnDragDrop(FileDropEventArgs fileDropEventArgs)
{
if (AllowDragDrop())
{
pendingPartsToLoad.Clear();
foreach (string droppedFileName in fileDropEventArgs.DroppedFiles)
{
string extension = Path.GetExtension(droppedFileName).ToLower();
if (extension != "" && ApplicationSettings.OpenDesignFileParams.Contains(extension))
{
pendingPartsToLoad.Add(droppedFileName);
}
}
if (pendingPartsToLoad.Count > 0)
{
bool enterEditModeBeforeAddingParts = enterEditButtonsContainer.Visible == true;
if (enterEditModeBeforeAddingParts)
{
EnterEditAndCreateSelectionData();
}
else
{
LoadAndAddPartsToPlate(pendingPartsToLoad.ToArray());
}
}
}
base.OnDragDrop(fileDropEventArgs);
}
开发者ID:gobrien4418,项目名称:MatterControl,代码行数:30,代码来源:View3DWidget.cs
示例7: OnDragOver
protected override void OnDragOver(DragEventArgs dragevent)
{
List<string> droppedFiles = GetDroppedFiles(dragevent);
Point appWidgetPos = GetPosForAppWidget(dragevent);
FileDropEventArgs fileDropEventArgs = new FileDropEventArgs(droppedFiles, appWidgetPos.X, appWidgetPos.Y);
aggAppWidget.OnDragOver(fileDropEventArgs);
if (fileDropEventArgs.AcceptDrop)
{
dragevent.Effect = DragDropEffects.Copy;
}
else
{
dragevent.Effect = DragDropEffects.None;
}
base.OnDragOver(dragevent);
}
开发者ID:eriser,项目名称:agg-sharp,代码行数:18,代码来源:WindowsFormsAbstract.cs
示例8: OnDragOver
public virtual void OnDragOver(FileDropEventArgs fileDropEventArgs)
{
if (PositionWithinLocalBounds(fileDropEventArgs.X, fileDropEventArgs.Y))
{
for (int i = Children.Count - 1; i >= 0; i--)
{
GuiWidget child = Children[i];
if (child.Visible)
{
double childX = fileDropEventArgs.X;
double childY = fileDropEventArgs.Y;
child.ParentToChildTransform.inverse_transform(ref childX, ref childY);
FileDropEventArgs childDropEvent = new FileDropEventArgs(fileDropEventArgs.DroppedFiles, childX, childY);
child.OnDragOver(childDropEvent);
if (childDropEvent.AcceptDrop)
{
fileDropEventArgs.AcceptDrop = true;
}
}
}
}
}
开发者ID:eriser,项目名称:agg-sharp,代码行数:23,代码来源:GUIWidget.cs
示例9: OnDragDrop
public override void OnDragDrop(FileDropEventArgs fileDropEventArgs)
{
foreach (string droppedFileName in fileDropEventArgs.DroppedFiles)
{
string extension = Path.GetExtension(droppedFileName).ToUpper();
if ((extension != "" && MeshFileIo.ValidFileExtensions().Contains(extension)))
{
meshViewerWidget.LoadMesh(droppedFileName, MeshViewerWidget.CenterPartAfterLoad.DO);
break;
}
}
base.OnDragDrop(fileDropEventArgs);
}
开发者ID:glocklueng,项目名称:agg-sharp,代码行数:14,代码来源:MeshViewerApplication.cs
示例10: OnDragDrop
public override void OnDragDrop(FileDropEventArgs fileDropEventArgs)
{
DoAddFiles(fileDropEventArgs.DroppedFiles);
base.OnDragDrop(fileDropEventArgs);
}
开发者ID:broettge,项目名称:MatterControl,代码行数:6,代码来源:QueueDataWidget.cs
示例11: OnDragDrop
public override void OnDragDrop(FileDropEventArgs fileDropEventArgs)
{
foreach (string droppedFileName in fileDropEventArgs.DroppedFiles)
{
string extension = Path.GetExtension(droppedFileName).ToUpper();
if (extension == ".STL" || extension == ".GCODE")
{
PrintItem printItem = new PrintItem();
printItem.Name = Path.GetFileNameWithoutExtension(droppedFileName);
printItem.FileLocation = Path.GetFullPath(droppedFileName);
printItem.PrintItemCollectionID = LibraryData.Instance.LibraryCollection.Id;
printItem.Commit();
LibraryData.Instance.AddItem(new PrintItemWrapper(printItem));
}
}
base.OnDragDrop(fileDropEventArgs);
}
开发者ID:klewisjohnson,项目名称:MatterControl,代码行数:19,代码来源:PrintLibraryWidget.cs
示例12: OnDragDrop
public override void OnDragDrop(FileDropEventArgs fileDropEventArgs)
{
pendingPartsToLoad.Clear();
foreach (string droppedFileName in fileDropEventArgs.DroppedFiles)
{
string extension = Path.GetExtension(droppedFileName).ToUpper();
if (extension == ".STL")
{
pendingPartsToLoad.Add(droppedFileName);
}
}
bool enterEditModeBeforeAddingParts = enterEditButtonsContainer.Visible == true;
if (enterEditModeBeforeAddingParts)
{
EnterEditAndSplitIntoMeshes();
}
else
{
LoadAndAddPartsToPlate(pendingPartsToLoad.ToArray());
}
base.OnDragDrop(fileDropEventArgs);
}
开发者ID:klewisjohnson,项目名称:MatterControl,代码行数:24,代码来源:View3DTransfromPart.cs
示例13: OnDragDrop
public override void OnDragDrop(FileDropEventArgs fileDropEventArgs)
{
LibraryData.Instance.LoadFilesIntoLibrary(fileDropEventArgs.DroppedFiles);
base.OnDragDrop(fileDropEventArgs);
}
开发者ID:fuding,项目名称:MatterControl,代码行数:6,代码来源:PrintLibraryWidget.cs
示例14: OnDragDrop
public override void OnDragDrop(FileDropEventArgs fileDropEventArgs)
{
if (libraryDataView != null
&& libraryDataView.CurrentLibraryProvider != null
&& !libraryDataView.CurrentLibraryProvider.IsProtected())
{
libraryDataView.CurrentLibraryProvider.AddFilesToLibrary(fileDropEventArgs.DroppedFiles);
}
base.OnDragDrop(fileDropEventArgs);
}
开发者ID:unlimitedbacon,项目名称:MatterControl,代码行数:11,代码来源:PrintLibraryWidget.cs
示例15: OnDragDrop
protected override void OnDragDrop(DragEventArgs dragevent)
{
List<string> droppedFiles = GetDroppedFiles(dragevent);
Point appWidgetPos = GetPosForAppWidget(dragevent);
FileDropEventArgs fileDropEventArgs = new FileDropEventArgs(droppedFiles, appWidgetPos.X, appWidgetPos.Y);
aggAppWidget.OnDragDrop(fileDropEventArgs);
base.OnDragDrop(dragevent);
}
开发者ID:eriser,项目名称:agg-sharp,代码行数:10,代码来源:WindowsFormsAbstract.cs
示例16: OnDragDrop
public override void OnDragDrop(FileDropEventArgs fileDropEventArgs)
{
foreach (string droppedFileName in fileDropEventArgs.DroppedFiles)
{
string extension = Path.GetExtension(droppedFileName).ToUpper();
if (extension == ".STL" || extension == ".GCODE")
{
PrintQueueItem queueItem = new PrintQueueItem(System.IO.Path.GetFileNameWithoutExtension(droppedFileName), System.IO.Path.GetFullPath(droppedFileName));
PrintQueueControl.Instance.AddChild(queueItem);
}
PrintQueueControl.Instance.EnsureSelection();
PrintQueueControl.Instance.Invalidate();
}
PrintQueueControl.Instance.SaveDefaultQueue();
base.OnDragDrop(fileDropEventArgs);
}
开发者ID:rubenkar,项目名称:MatterControl,代码行数:17,代码来源:QueueControlsWidget.cs
示例17: OnDragDrop
public override void OnDragDrop(FileDropEventArgs fileDropEventArgs)
{
int preAddCount = QueueData.Instance.Count;
foreach (string droppedFileName in fileDropEventArgs.DroppedFiles)
{
string extension = Path.GetExtension(droppedFileName).ToUpper();
if (MeshFileIo.ValidFileExtensions().Contains(extension)
|| extension == ".GCODE")
{
QueueData.Instance.AddItem(new PrintItemWrapper(new PrintItem(Path.GetFileNameWithoutExtension(droppedFileName), Path.GetFullPath(droppedFileName))));
}
else if (extension == ".ZIP")
{
ProjectFileHandler project = new ProjectFileHandler(null);
List<PrintItem> partFiles = project.ImportFromProjectArchive(droppedFileName);
if (partFiles != null)
{
foreach (PrintItem part in partFiles)
{
QueueData.Instance.AddItem(new PrintItemWrapper(new PrintItem(part.Name, part.FileLocation)));
}
}
}
}
if (QueueData.Instance.Count != preAddCount)
{
QueueData.Instance.SelectedIndex = QueueData.Instance.Count - 1;
}
base.OnDragDrop(fileDropEventArgs);
}
开发者ID:CodeMangler,项目名称:MatterControl,代码行数:33,代码来源:QueueDataWidget.cs
示例18: OnDragDrop
public virtual void OnDragDrop(FileDropEventArgs fileDropEventArgs)
{
// to do this we would need to implement OnDragOver (and debug it, it was a mess when I started it and don't care right now). // LBB 2013 04 30
if (PositionWithinLocalBounds(fileDropEventArgs.X, fileDropEventArgs.Y))
{
for (int i = Children.Count - 1; i >= 0; i--)
{
GuiWidget child = Children[i];
if (child.Visible)
{
double childX = fileDropEventArgs.X;
double childY = fileDropEventArgs.Y;
child.ParentToChildTransform.inverse_transform(ref childX, ref childY);
FileDropEventArgs childDropEvent = new FileDropEventArgs(fileDropEventArgs.DroppedFiles, childX, childY);
child.OnDragDrop(childDropEvent);
}
}
}
}
开发者ID:eriser,项目名称:agg-sharp,代码行数:20,代码来源:GUIWidget.cs
示例19: OnDragOver
public override void OnDragOver(FileDropEventArgs fileDropEventArgs)
{
base.OnDragOver(fileDropEventArgs);
if (!fileDropEventArgs.AcceptDrop)
{
// no child has accepted the drop
foreach (string file in fileDropEventArgs.DroppedFiles)
{
string extension = Path.GetExtension(file).ToUpper();
if ((extension != "" && MeshFileIo.ValidFileExtensions().Contains(extension))
|| extension == ".GCODE"
|| extension == ".ZIP")
{
fileDropEventArgs.AcceptDrop = true;
}
}
dropWasOnChild = false;
}
else
{
dropWasOnChild = true;
}
}
开发者ID:Wicked006,项目名称:MatterControl,代码行数:24,代码来源:MatterControlApplication.cs
示例20: OnDragDrop
public override void OnDragDrop(FileDropEventArgs fileDropEventArgs)
{
foreach (string droppedFileName in fileDropEventArgs.DroppedFiles)
{
string extension = Path.GetExtension(droppedFileName).ToUpper();
if (extension == ".STL" || extension == ".GCODE")
{
PrintItem printItem = new PrintItem();
printItem.Name = System.IO.Path.GetFileNameWithoutExtension(droppedFileName);
printItem.FileLocation = System.IO.Path.GetFullPath(droppedFileName);
printItem.PrintItemCollectionID = PrintLibraryListControl.Instance.LibraryCollection.Id;
printItem.Commit();
PrintLibraryListItem queueItem = new PrintLibraryListItem(new PrintItemWrapper(printItem));
PrintLibraryListControl.Instance.AddChild(queueItem);
}
PrintLibraryListControl.Instance.Invalidate();
}
PrintLibraryListControl.Instance.SaveLibraryItems();
base.OnDragDrop(fileDropEventArgs);
}
开发者ID:rubenkar,项目名称:MatterControl,代码行数:22,代码来源:PrintLibraryWidget.cs
注:本文中的MatterHackers.Agg.UI.FileDropEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论