private void BirimAdiAyarla() { lblBirimAdi.Content = String.Empty; ArtefactAnimator.AddEase(birimRectangle, AnimationTypes.X, this.ActualWidth, 1.1, AnimationTransitions.BackEaseIn, 0); EaseObject baslikEase = ArtefactAnimator.AddEase(birimRectangle, AnimationTypes.Y, 51, 1.1, AnimationTransitions.BackEaseIn, 0); baslikEase.Complete += new EaseObjectHandler(birimBaslikEase_Complete); }
private void BirimAdiAyarla() { lblBirimAdi.Content = String.Empty; ArtefactAnimator.AddEase(ball, AnimationTypes.X, 680, .7, AnimationTransitions.BackEaseIn, 0); EaseObject baslikEase = ArtefactAnimator.AddEase(ball, AnimationTypes.Y, 10, .7, AnimationTransitions.BackEaseIn, 0); baslikEase.Complete += new EaseObjectHandler(baslikEase_Complete); }
private void UnvanAdiAyarla() { lblUnvanAdi.Content = String.Empty; ArtefactAnimator.AddEase(unvanRectangle, AnimationTypes.X, this.ActualWidth, 1.1, AnimationTransitions.BackEaseIn, 0); EaseObject unvanBaslikEase = ArtefactAnimator.AddEase(unvanRectangle, AnimationTypes.Y, 0, 1.1, AnimationTransitions.BackEaseIn, 0); unvanBaslikEase.Complete += new EaseObjectHandler(unvanBaslikEase_Complete); }
private void BtnClick(object sender, System.Windows.RoutedEventArgs e) { EaseObjectGroup eog = new EaseObjectGroup(); for (int i = 0; i < 4; i++) { double star = .3 + (_rnd.NextDouble() * 2.7); EaseObject eo = ArtefactAnimator.AddEase(col, new[] { AnimationTypes.ColumWidthStar }, new object[] { star }, 1, AnimationTransitions.ElasticEaseOut, i * .5); eog.AddEaseObject(eo); } }
void obj_Complete(EaseObject easeObject, double percent) { if (birimeAtananKisiler.Length - 1 == index) { index = 0; birimIndex++; BirimAdiAyarla(); } else { index++; ListeyeElemanEkle(); } }
public void AnimateToDropShadow() { if (DropShadowAnimation != null) { DropShadowAnimation.Stop(); } if (DropShadowOpacity < 1) { Events.OnIdleOnce( () => { DropShadowAnimation = ArtefactAnimator.AddEase(this, new[] { "DropShadowOpacity" }, new object[] { 1.0 }, 0.25d); }); } }
private void ToggleItemsFilledOpacityAnimation(bool visible) { if (opacityAnimation != null) { opacityAnimation.Stop(); } if (visible) { Opacity = 0; } else { Opacity = 1; } opacityAnimation = ArtefactAnimator.AddEase(this, "Opacity", visible ? 1 : 0, 0.5); }
protected void UpdateOpacity(bool visibility) { if (activeOpacityAnimation != null) { activeOpacityAnimation.Stop(); } if (visibility == false) { Opacity = 0; } else { var seconds = 0.5; activeOpacityAnimation = ArtefactAnimator.AddEase(this, new[] { "Opacity" }, new object[] { 1 }, seconds); activeOpacityAnimation.Complete += (easeObj, percent) => { activeOpacityAnimation = null; }; } }
void baslikEase_Complete(EaseObject easeObject, double percent) { if (birimBazindaAtananKisiListeleri.Count == birimIndex) { lblBirimAdi.Content = String.Empty; lbSonuclar.Items.Clear(); birimIndex = 0; return; } lblBirimAdi.Content = ((DataRow[])birimBazindaAtananKisiListeleri[birimIndex])[0][3].ToString(); ArtefactAnimator.AddEase(ball, AnimationTypes.X, 20, .7, AnimationTransitions.BackEaseOut, 0); ArtefactAnimator.AddEase(ball, AnimationTypes.Y, 10, .7, AnimationTransitions.BackEaseOut, .9); lbSonuclar.Items.Clear(); ListeyeElemanEkle(); }
void unvanBaslikEase_Complete(EaseObject easeObject, double percent) { if (unvanBazindaAtananKisiListeleri.Count == unvanIndex) { lblUnvanAdi.Content = String.Empty; unvanIndex = 0; MessageBox.Show("Atama işlemi başarı ile tamamlandı.", "Başarı", MessageBoxButton.OK, MessageBoxImage.Information); return; } lblUnvanAdi.Content = unvanBazindaAtananKisiListeleri[unvanIndex].Rows[0]["UNVAN"].ToString(); ArtefactAnimator.AddEase(unvanRectangle, AnimationTypes.X, 1, .7, AnimationTransitions.BackEaseOut, 0); ArtefactAnimator.AddEase(unvanRectangle, AnimationTypes.Y, 0, .7, AnimationTransitions.BackEaseOut, .9); BirimlereGoreVerileriAyir(); BirimAdiAyarla(); }
void birimBaslikEase_Complete(EaseObject easeObject, double percent) { if (birimBazindaAtananKisiListeleri.Count == birimIndex) { lblBirimAdi.Content = String.Empty; lbSonuclar.Items.Clear(); birimIndex = 0; unvanIndex++; UnvanAdiAyarla(); return; } lblBirimAdi.Content = ((DataRow[])birimBazindaAtananKisiListeleri[birimIndex])[0]["BIRIM_ADI"].ToString(); ArtefactAnimator.AddEase(birimRectangle, AnimationTypes.X, 1, .7, AnimationTransitions.BackEaseOut, 0); ArtefactAnimator.AddEase(birimRectangle, AnimationTypes.Y, 51, .7, AnimationTransitions.BackEaseOut, .9); lbSonuclar.Items.Clear(); ListeyeElemanEkle(); }
private void ListeyeElemanEkle() { if (birimBazindaAtananKisiListeleri.Count == birimIndex) { return; } birimeAtananKisiler = birimBazindaAtananKisiListeleri[birimIndex]; var lbi = new ListBoxItem { Content = birimeAtananKisiler[index][0].ToString() + "\t" + birimeAtananKisiler[index][1].ToString() + "\t" + birimeAtananKisiler[index][2].ToString(), RenderTransform = new TranslateTransform(-lbSonuclar.Width, 0) }; lbSonuclar.Items.Add(lbi); // Animasyon EaseObject obj = ArtefactAnimator.AddEase(lbi.RenderTransform, TranslateTransform.XProperty, 0, 1, AnimationTransitions.BackEaseOut, .2); obj.Complete += new EaseObjectHandler(obj_Complete); }
private void UpdatePosition(MouseEventArgs e) { double x = e.GetPosition(this).X - (30 / 2); double y = e.GetPosition(this).Y - (30 / 2); for (int n = 0; n < Items.Length; n++) { UIElement ball = Items[n]; double size = 20 + (_rnd.NextDouble() * 150); double delay = (n * .01) + 0; // DEPENDENCY PROPERTY // ArtefactAnimator.AddEase(ball, new[] { Canvas.LeftProperty, Canvas.TopProperty }, new[] { x, y }, 2, AnimationTransitions.ElasticEaseOut, delay); // STRINGS ball.DimensionsTo(size, size, 3, AnimationTransitions.ElasticEaseOut, 0); EaseObject eo = ball.SlideTo(x + (size / 2), y + (size / 2), 1, AnimationTransitions.CubicEaseOut, delay); ArtefactAnimator.AddEase(ball, RenderTransformProperty, new CompositeTransform { Rotation = _rnd.NextDouble() * 360 }, 4, AnimationTransitions.ElasticEaseOut, 0); } }
private void ListeyeElemanEkle() { if (birimBazindaAtananKisiListeleri.Count == birimIndex) { return; } birimeAtananKisiler = birimBazindaAtananKisiListeleri[birimIndex]; var lbi = new ListBoxItem { Content = birimeAtananKisiler[index]["AD"].ToString() + " " + birimeAtananKisiler[index]["SOYAD"].ToString(), RenderTransform = new TranslateTransform(-lbSonuclar.ActualWidth, 0), HorizontalAlignment = System.Windows.HorizontalAlignment.Center, }; lbSonuclar.Items.Add(lbi); // Animasyon ArtefactAnimator.AddEase(this, ListBoxScrollOffsetProperty, scrollViewer.ScrollableHeight + 3, 1, AnimationTransitions.BackEaseOut, 0); EaseObject obj = ArtefactAnimator.AddEase(lbi.RenderTransform, TranslateTransform.XProperty, 0, 1, AnimationTransitions.BackEaseOut, .2); obj.Complete += new EaseObjectHandler(obj_Complete); }
void _KeyDown(object sender, KeyEventArgs e) { // REMOVE ALL EASING FOR ITEMS for (var i = 0; i < Items.Length; i++) { UIElement ball = Items[i]; //// MOVEMENT if (e.Key == Key.R) { double x = _rnd.NextDouble() * LayoutRoot.ActualWidth; double y = _rnd.NextDouble() * LayoutRoot.ActualHeight; double delay = i * .02; double time = .6; PercentHandler ease = AnimationTransitions.CubicEaseOut; ball.SlideTo(x, y, time, ease, delay); } //// EFFECTS else if (e.Key == Key.D) { var effect = (DropShadowEffect)ball.Effect; if (effect == null) { effect = new DropShadowEffect(); ball.Effect = effect; } DropShadowEffect effectClone = effect.Copy(); effectClone.BlurRadius = _rnd.NextDouble() * 20; effectClone.Opacity = .7 + (_rnd.NextDouble() * .3); effectClone.ShadowDepth = _rnd.NextDouble() * 20; ArtefactAnimator.AddEase(ball, UIElement.EffectProperty, effectClone, .8, AnimationTransitions.CubicEaseOut, 0); } else if (e.Key == Key.C) { var effect = (DropShadowEffect)ball.Effect; if (effect == null) { continue; } ArtefactAnimator.AddEase(effect, DropShadowEffect.ColorProperty, new Color() { A = 1, R = (byte)(_rnd.NextDouble() * 255), G = (byte)(_rnd.NextDouble() * 255), B = (byte)(_rnd.NextDouble() * 255) } , 1, AnimationTransitions.CubicEaseOut, 0); } //// REMOVE EFFECT else if (e.Key == Key.X) { ball.Effect = null; } //// 3D else if (e.Key == Key.Z) { Canvas.SetLeft(ball, Canvas.GetLeft(ball) + 2); var pp = (PlaneProjection)ball.Projection ?? new PlaneProjection { RotationX = 0D, RotationY = 0D, RotationZ = 0D }; ball.Projection = pp; EaseObject easeObject = ArtefactAnimator.AddEase(pp, new [] { Animation3DEffects.RotationX, Animation3DEffects.RotationY, Animation3DEffects.RotationZ }, new [] { RandomDouble(-75, 75), RandomDouble(-75, 75), RandomDouble(-75, 75) }, 2, AnimationTransitions.ElasticEaseOut, 0); easeObject.Update += (eo, per) => { (eo.Data as UIElement).Projection = eo.Target as PlaneProjection; }; easeObject.Data = ball; } } }
public static double ElapsedMiliseconds(this EaseObject easeObject) { return(ArtefactAnimator.ElapsedMilliseconds - easeObject.TimeStarted); }
private void OnFilterLoadedTransitionComplete(EaseObject easeObject, double percent) { }
private void OnCloseTransitionComplete(EaseObject easeObject, double percent) { Chooser.VisualState = FilterChooserStates.DISCARDED; }
private void OnOpenTransitionComplete(EaseObject easeObject, double percent) { }