本文整理汇总了C#中ITarget.GetPoint方法的典型用法代码示例。如果您正苦于以下问题:C# ITarget.GetPoint方法的具体用法?C# ITarget.GetPoint怎么用?C# ITarget.GetPoint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ITarget
的用法示例。
在下文中一共展示了ITarget.GetPoint方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetShowcase
public void SetShowcase(ITarget target, bool animate)
{
PostDelayed(() =>
{
if (target != null && target.GetPoint() != null)
{
var targetPoint = target.GetPoint();
mHasNoTarget = false;
if (animate)
{
var animator = PointAnimator.OfPoints(this, targetPoint);
animator.SetDuration(ConfigurationOptions.FadeInDuration);
animator.SetInterpolator(INTERPOLATOR);
animator.Start();
// as long as the Export attribute is used is this unnessessary
// var values = new Point[]{targetPoint};
//
// var set = new Android.Animation.AnimatorSet();
// set.SetDuration(ConfigurationOptions.FadeInDuration);
//
// var xValues = new int[values.Length];
// var yValues = new int[values.Length];
//
// for (int i = 0; i < values.Length; i++)
// {
// xValues[i] = values[i].X;
// yValues[i] = values[i].Y;
// }
//
//
// var xAnimator = Android.Animation.ObjectAnimator.OfInt(this, "showcaseX", xValues);
// var yAnimator = Android.Animation.ObjectAnimator.OfInt(this, "showcaseY", yValues);
//
//
// var xAnimator = Android.Animation.ObjectAnimator.OfInt(xValues);
// xAnimator.Update+= delegate(object sender, Android.Animation.ValueAnimator.AnimatorUpdateEventArgs e) {
// ShowcaseX = (int) e.Animation.AnimatedValue;
// Console.WriteLine("x: " + ShowcaseX);
// };
//
// var yAnimator = Android.Animation.ObjectAnimator.OfInt(yValues);
// yAnimator.Update += delegate(object sender, Android.Animation.ValueAnimator.AnimatorUpdateEventArgs e) {
// ShowcaseY = (int)e.Animation.AnimatedValue;
// Console.WriteLine("y: " + ShowcaseY);
// };
//
// set.PlayTogether(new List<Android.Animation.Animator>(){xAnimator, yAnimator});
//
// //set.Play(xAnimator).Before(yAnimator);
//
// set.SetInterpolator(INTERPOLATOR);
// set.Start();
}
else
{
SetShowcasePosition(targetPoint);
}
}
else
{
mHasNoTarget = true;
Invalidate();
}
}, 100);
}
示例2: PointTo
/// <summary>
/// Point to a specific point on the screen.
/// </summary>
/// <param name="target">The target to point to.</param>
public void PointTo(ITarget target)
{
Post(() =>
{
mHandy = GetHand();
Point targetPoint = target.GetPoint();
SharpShowcaseView.Animation.AnimationUtils.CreateMovementAnimation(mHandy, targetPoint.X, targetPoint.Y).Start();
});
}