当前位置: 首页>>代码示例>>C#>>正文


C# PNode.MoveToFront方法代码示例

本文整理汇总了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;
			}
开发者ID:malacandrian,项目名称:Piccolo.NET,代码行数:6,代码来源:GridExample.cs

示例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);
					}
				}
			}
		}
开发者ID:malacandrian,项目名称:Piccolo.NET,代码行数:38,代码来源:SlideViewer.cs


注:本文中的UMD.HCIL.Piccolo.PNode.MoveToFront方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。