本文整理匯總了C#中Sledge.UI.ViewportBase.Dispose方法的典型用法代碼示例。如果您正苦於以下問題:C# ViewportBase.Dispose方法的具體用法?C# ViewportBase.Dispose怎麽用?C# ViewportBase.Dispose使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Sledge.UI.ViewportBase
的用法示例。
在下文中一共展示了ViewportBase.Dispose方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Make3D
public static Viewport3D Make3D(ViewportBase viewport, Viewport3D.ViewType type)
{
Viewports.Remove(viewport);
var pos = MainWindowGrid.GetCellPosition(viewport);
MainWindowGrid.Controls.Remove(viewport);
viewport.Dispose();
viewport = Create3D(type);
Viewports.Add(viewport);
SubscribeExceptions(viewport);
MainWindowGrid.Controls.Add(viewport, pos.Column, pos.Row);
viewport.Run();
return (Viewport3D) viewport;
}
示例2: Make3D
public static Viewport3D Make3D(ViewportBase viewport, Viewport3D.ViewType type)
{
var parent = GetParentSplitControl(viewport);
if (parent == null) return null;
Viewports.Remove(viewport);
var newViewport = Create3D(type);
SubscribeExceptions(newViewport);
parent.ReplaceControl(viewport, newViewport);
Viewports.Add(newViewport);
viewport.Dispose();
newViewport.Run();
return newViewport;
}
示例3: Make2D
public static Viewport2D Make2D(ViewportBase viewport, Viewport2D.ViewDirection direction)
{
Viewports.Remove(viewport);
var pos = MainWindowGrid.GetCellPosition(viewport);
MainWindowGrid.Controls.Remove(viewport);
viewport.Dispose();
viewport = Create2D(direction);
Viewports.Add(viewport);
SubscribeExceptions(viewport);
MainWindowGrid.Controls.Add(viewport, pos.Column, pos.Row);
viewport.Run();
return (Viewport2D) viewport;
}