本文整理汇总了C#中Panel.control方法的典型用法代码示例。如果您正苦于以下问题:C# Panel.control方法的具体用法?C# Panel.control怎么用?C# Panel.control使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Panel
的用法示例。
在下文中一共展示了Panel.control方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: buildFrameViewer
public ascx_MovieEditor buildFrameViewer()
{
PreviewPanel = FrameViewer_Panel.insert_Right<Panel>();
PreviewPanel.parent<SplitContainer>().distance(300);
PreviewPanel.backColor(Color.White);
var wpfHost = FrameViewer_Panel.add_WpfHost();
FramesList = wpfHost.add_ListView_Wpf();
FramesList.onKeyPress_Wpf(System.Windows.Input.Key.Delete,
()=>{
if (OnImageDeleteAlsoDeleteFromDisk)
{
/*var pictureBox = PreviewPanel.control<PictureBox>();
if (pictureBox.notNull())
{
pictureBox.Image=null;
pictureBox.clear();
Application.DoEvents();
}*/
GC.Collect(); // because the Framework doesn't always releases immediately the file's handles
foreach(var item in FramesList.selectedValues())
{
var fileToDelete = item.str();
Files.deleteFile(fileToDelete);
if (fileToDelete.fileExists())
addFileToListOfImagesToDelete(fileToDelete);
}
}
FramesList.remove_SelectedItems();
});
FramesList.enableDrag();
FramesList.enableDrop();
FramesList.afterSelects<String>(
(imagePaths)=>{
if (imagePaths.size()==1) // if there is only one image show it an PictureBox
{
MultiImageViewer = null;
var pictureBox = PreviewPanel.control<PictureBox>();
if (pictureBox.isNull())
pictureBox = PreviewPanel.clear().add_PictureBox();
pictureBox.Image=null;
pictureBox.show(imagePaths[0]);
}
else
{
if (MultiImageViewer.isNull())
{
PreviewPanel.clear();
MultiImageViewer = PreviewPanel.add_WpfHost().add_ListView_Wpf();
MultiImageViewer.useWrapPanel();
}
else
{
MultiImageViewer.clear();
}
if (ViewMultipleSelectedImages)
foreach(var imagePath in imagePaths)
MultiImageViewer.add_Image_Wpf(imagePath, IMAGE_WIDTH, IMAGE_HEIGHT);
}
});
return this;
}