本文整理汇总了C#中Pane.Dismiss方法的典型用法代码示例。如果您正苦于以下问题:C# Pane.Dismiss方法的具体用法?C# Pane.Dismiss怎么用?C# Pane.Dismiss使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pane
的用法示例。
在下文中一共展示了Pane.Dismiss方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Display
/// <summary>
/// Creates a function that displays the selection to the user.
/// </summary>
public Action<GUIControlContext> Display(GameBoardView BoardView)
{
return delegate(GUIControlContext Context)
{
LayerContainer lc;
Point offset;
if (Context.FindAncestor<LayerContainer>(out lc, out offset))
{
FlowContainer options = new FlowContainer(20.0, Axis.Horizontal);
Pane pane = new Pane(new SunkenContainer(options.WithMargin(20.0)).WithBorder(1.0));
ModalOptions mo = new ModalOptions()
{
Lightbox = false,
LowestModal = pane,
MouseFallthrough = false
};
foreach (_Possible p in this._Items)
{
_Possible ip = p;
Button button = new Button(ButtonStyle.CreateSolid(Skin.Default), new _PieceIcon(p.Move.NewState).CreateControl());
options.AddChild(button, 150.0);
button.Click += delegate
{
lc.Modal = null;
pane.Dismiss();
BoardView.MakeMove(ip.Move, ip.Board);
};
}
pane.ClientSize = new Point(options.SuggestLength + 42.0, 190.0);
Rectangle merect = new Rectangle(offset, Context.Control.Size);
lc.AddControl(pane, merect.Location + merect.Size * 0.5 - pane.Size * 0.5);
lc.Modal = mo;
}
};
}