/// <summary> /// Обработчик запроса на анимирование /// </summary> public void AnimateIt(object sender, AnimationEventArgs e) { if (visualFunctions.ContainsKey(e.AnimationType)) { visualFunctions[e.AnimationType].Invoke(e.ID, e.Argument); } }
protected virtual void AnimationFinishedCallback(AnimationEventArgs e) { Size animationSize = ((Rectangle)e.AnimationValue).Size; int num1 = NativeMethods.SWP_NOMOVE; num1 |= NativeMethods.SWP_HIDEWINDOW; num1 |= NativeMethods.SWP_NOZORDER; num1 |= NativeMethods.SWP_NOREDRAW; num1 |= NativeMethods.SWP_NOSIZE; NativeMethods.SetWindowPos(new HandleRef(this, this.Handle), NativeMethods.NullHandleRef, this.Left, this.Top, 0 /*animationSize.Width*/, 0/*animationSize.Height*/, num1); this.Size = backupBounds.Size; //animationSize; //Debug.WriteLine("finish Size:" + (Rectangle)e.AnimationValue); //this.UpdateStyles(); //NativeMethods.ShowWindow(new HandleRef(this, this.Handle), NativeMethods.SW_SHOW); this.Visible = false; this.Visible = true; //this.CreateControl(); //this.Refresh() //this.Invalidate(); this.ResumeLayout(true); this.RootElement.ResumeLayout(true); //Debug.WriteLine("animation end: Enabled=" + this.Enabled + ", Visible=" + this.Visible + ", Bounds=" + this.Bounds + ", Capture=" + this.Capture + ", Focused=" + this.Focused); }
protected virtual void OnTransitionChange(AnimationEventArgs e) { if (TransitionChange != null) { TransitionChange(this, e); } }
private void method_5(object sender, AnimationEventArgs e) { if (!e.IsFinal && base.IsQWindowForm) { this.UpdateWindow(e.CurrentFrame, this.opacity); } }
/// <summary> /// Handles the shoot text animation complete event. /// </summary> /// <param name="sender">Sender.</param> /// <param name="args">Arguments.</param> private void OnShootTextComplete(object sender, AnimationEventArgs args) { resultAnimationEventDispatcher.Event -= OnShootTextComplete; leftHand.ExitComplete += OnHandExitComplete; leftHand.Exit(); rightHand.Exit(); }
void animation_Scene(object sender, AnimationEventArgs e) { int value = Width * e.Value / e.EndValue; transitionFunc(value); OnTransitionChange(e); }
private void onDeathAnimationEnd(object sender, AnimationEventArgs e) { if (e.animation == AnimationType.Death) { onDestroy(); } }
private void animationFinished(object sender, AnimationEventArgs e) { if (MorphAnimations.ContainsValue(e.AnimData.Name)) { _isChangingForm = false; } }
private void animationFinished(object sender, AnimationEventArgs e) { // Stop cinematics if finished string animName = e.AnimData.Name; if (_isPlayingStoppingAnimation == false) { _isPlayingAbility = false; } _isPlayingStoppingAnimation = false; if (CinematicAnimations.ContainsKey(animName)) { _isPlayingCinematic = false; SendMessage("UnlockInput"); } if (AbilityStartAnimations.ContainsValue(animName)) { if (_abilities.State != AbilityState.AS_IDLE) { if (AbilityIdleAnimations.ContainsKey(_abilities.UsingAbility)) { _isPlayingAbility = true; playAnimation(AbilityIdleAnimations[_abilities.UsingAbility]); } } } }
private void phaserShot_AnimationStopped(object sender, AnimationEventArgs args) { if (args.StoppedReason == StoppedReason.Complete) { Debug.Log("Removing phaser " + sender); this.RemoveChild(sender as FNode); } }
private void anim_AnimationStopped(object sender, AnimationEventArgs args) { if (args.StoppedReason == StoppedReason.Complete) { AwayTeam.MissionController.RemoveChild(sender as FNode); this.AfterAbilityExecute(true); } }
private void method_3(object sender, AnimationEventArgs e) { this.int_3 = (e.CurrentFrame.Width - base.Width) / 2; this.int_4 = (e.CurrentFrame.Height - base.Height) / 2; this.size = base.Size; base.Size = e.CurrentFrame.Size; base.Location = new Point(base.Left - this.int_3, base.Top - this.int_4); }
/// <summary> /// Событие, вызываемое при запросе новой анимации у аниматора персонажа /// </summary> public void Animate(AnimationEventArgs e) { EventHandler <AnimationEventArgs> handler = AnimationEventHandler; if (handler != null) { handler(this, e); } }
void BindingScene(object sender, AnimationEventArgs e) { Animation a = (Animation)sender; int index = animIndex; OffseDeltaItemTops(index, e.Value); Invalidate(); Update(); }
protected virtual void OnAnimationStopped(StoppedReason reason) { var handler = this.AnimationStopped; if (handler != null) { var args = new AnimationEventArgs(); args.StoppedReason = reason; handler(this, args); } }
private void phaserShot_AnimationStopped(object sender, AnimationEventArgs args) { if (args.StoppedReason == StoppedReason.Complete) { if (this.hitActor != null) { this.ApplyDamage(this.attackArgs.Map, this.hitActor, this.damage); } AwayTeam.MissionController.MapContainer.RemoveChild(sender as FNode); this.AfterAbilityExecute(true); } }
private void AnimationController_AnimationEvent(object sender, AnimationEventArgs e) { if (e.AnimationEvent == CharacterAnimationEvents.DoDamage && SwordDamageTrigger != null) { var doDamageTrigger = SwordDamageTrigger.GetComponent <DoDamageTrigger>(); if (!doDamageTrigger) { return; } doDamageTrigger.DoDamageToAll(this.gameObject, 10, this.transform.position); } }
void animation_Scene(object sender, AnimationEventArgs e) { AnchorStyles anchor = Anchor; try { Anchor = AnchorStyles.Left | AnchorStyles.Top; Top = e.Value; } finally { Anchor = anchor; } }
void navigation_TransitionChange(object sender, AnimationEventArgs e) { header.AnimOffset = back ? e.EndValue - e.Value : e.Value; header.AnimLabel.Visible = true; #if SUPPORT_ALPHA int alpha2 = (255 * e.Value / e.EndValue); int alpha = 255 - alpha2; header.BackButton.Alpha = alpha; header.ButtonsAlpha = alpha; header.AnimButtons.Alpha = alpha2; header.AnimBackButton.Alpha = alpha2; #endif }
protected virtual void AnimatingCallback(AnimationEventArgs e) { Size animationSize = ((Rectangle)e.AnimationValue).Size; int num1 = NativeMethods.SWP_NOACTIVATE; num1 |= NativeMethods.SWP_NOMOVE; num1 |= NativeMethods.SWP_SHOWWINDOW; //num1 |= NativeMethods.SW; num1 |= NativeMethods.SWP_NOCOPYBITS; num1 |= NativeMethods.SWP_NOZORDER; NativeMethods.SetWindowPos(new HandleRef(null, this.Handle), NativeMethods.HWND_TOPMOST, this.Left, this.Top, animationSize.Width, animationSize.Height, num1); //this.Refresh(); //this.Size = animationSize; //Debug.WriteLine("frame Size:" + (Rectangle)e.AnimationValue); }
void navigation_TransitionCompleted(object sender, AnimationEventArgs e) { header.BeginInit(); #if SUPPORT_ALPHA animBackButton.Visible = false; header.ButtonsAlpha = 255; header.AnimButtons.Visible = false; header.BackButton.Alpha = 255; header.AnimButtons.Alpha = 0; #endif header.AnimLabel.Visible = false; header.AnimOffset = 0; header.EndInit(); header.Refresh(); inTransition = false; }
public void TriggerAnimationEvent(AnimationEvent animationEvent) { if (OnAnimationEventTriggered != null) { AnimationEventArgs eventArgs = new AnimationEventArgs(animationEvent.intParameter, animationEvent.floatParameter); if (animationEvent.stringParameter != "") { eventArgs.stringValue = animationEvent.stringParameter; } if (animationEvent.objectReferenceParameter != null) { eventArgs.objectReference = animationEvent.objectReferenceParameter; } OnAnimationEventTriggered(eventArgs); } }
void changeItemHeightScene(object sender, AnimationEventArgs e) { int index = ((ListBoxAnimation)sender).Index; lock (itemOffsets) { int h0 = itemOffsets[index + 1] - itemOffsets[index]; int h = e.Value; int delta = h - h0; for (int i = index + 1; i < itemOffsets.Count; i++) { itemOffsets[i] += delta; } } Rectangle bounds = GetItemBounds(index); bounds.Height = this.Height - bounds.Top; Invalidate(bounds); }
/// <summary> /// Flashed the <see cref="GraphUIElement"/>. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="Palmmedia.WpfGraph.UI.ViewModels.AnimationEventArgs"/> instance containing the event data.</param> protected virtual void Blinking(object sender, AnimationEventArgs e) { double repetitions = Math.Round(Math.Max(e.Duration, BLINKDURATION) / BLINKDURATION); var colorAnimation = new ColorAnimation(); colorAnimation.Duration = TimeSpan.FromMilliseconds(BLINKDURATION); colorAnimation.From = this.Color; colorAnimation.To = BLINKCOLOR; colorAnimation.AutoReverse = true; colorAnimation.RepeatBehavior = new RepeatBehavior(repetitions); colorAnimation.FillBehavior = FillBehavior.Stop; if (e.Callback != null) { colorAnimation.Completed += new EventHandler((s, a) => e.Callback()); } this.BeginAnimation(GraphUIElement.ColorProperty, colorAnimation); }
void Effect_OnStopping(Animation sender, AnimationEventArgs e) { Effect.OnStopping -= new AnimationEventHandler(Effect_OnStopping); CallOnStopping(); }
void scrollAnimation_Scene(object sender, AnimationEventArgs e) { ScrollBarVisible = true; SetTopOffset(e.Value); Debug.WriteLine("Scene"); }
private void OnAnimating(object sender, AnimationEventArgs e) { this.Invoke(callbackAnimating, e); }
private void OnAnimationFinished(object sender, AnimationEventArgs e) { this.Invoke(callbackAnimationFinished, e); }
protected virtual void OnAnimationCompleted(AnimationEventArgs e) { AnimationCompleted?.Invoke(this, e); }
void ScrollAnimationScene(object sender, AnimationEventArgs e) { ScrollBarVisible = true; SetTopOffset(e.Value); }
void alphaAnimation_Scene(object sender, AnimationEventArgs e) { Alpha = e.Value; }