本文整理汇总了C#中UMD.HCIL.Piccolo.PNode.MoveToFront方法的典型用法代码示例。如果您正苦于以下问题:C# PNode.MoveToFront方法的具体用法?C# PNode.MoveToFront怎么用?C# PNode.MoveToFront使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UMD.HCIL.Piccolo.PNode
的用法示例。
在下文中一共展示了PNode.MoveToFront方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnStartDrag
protected override void OnStartDrag(object sender, PInputEventArgs e) {
base.OnStartDrag (sender, e);
draggedNode = e.PickedNode;
draggedNode.MoveToFront();
nodeStartPosition = draggedNode.Offset;
}
示例2: HiliteSlide
/// <summary>
/// Hilite the specified slide - or unhilite all slides if hiliteIndex is -1.
/// </summary>
private void HiliteSlide(int newHiliteIndex) {
PNode newSlide = null;
if (newHiliteIndex >= 0) {
newSlide = slides[newHiliteIndex];
}
if (newSlide != hiliteSlide) {
// First unhilite previously hilited slide
if ((hiliteSlide != null) && (hiliteSlide != focusSlide)) {
// If this slide is currently animating, then kill that animation
int index = (int)hiliteSlide.Tag;
if (slideActivities[index] != null) {
slideActivities[index].Terminate();
slideActivities[index] = null;
}
(hiliteSlide as PMultiSizeImage).ShowThumb = true;
(hiliteSlide as PMultiSizeImage).Hilite = false;
PTransformActivity activity = hiliteSlide.AnimateToMatrix(GetUnfocusedMatrix(hiliteSlide, (int)hiliteSlide.Tag), SLIDEBAR_ANIMATION_TIME_MILLIS);
// Put the slide in order when the animation finishes
activity.ActivityFinished = new ActivityFinishedDelegate(HiliteActivityFinished);
hiliteSlide = null;
}
// Then hilite new slide (as long is it isn't the currently focused slide)
if (newSlide != focusSlide) {
hiliteSlide = newSlide;
if (hiliteSlide != null) {
PMatrix matrix = GetUnfocusedMatrix(hiliteSlide, (int)hiliteSlide.Tag);
matrix.ScaleBy(1.3f, (hiliteSlide.Bounds.Width / 2), hiliteSlide.Bounds.Height);
(hiliteSlide as PMultiSizeImage).Hilite = true;
hiliteSlide.MoveToFront();
currentPosition.MoveToFront();
slideActivities[newHiliteIndex] = hiliteSlide.AnimateToMatrix(matrix, SLIDEBAR_ANIMATION_TIME_MILLIS);
}
}
}
}