Beispiel #1
0
        /// <summary>
        /// Creates and immediately runs a transition on the property passed in.
        /// </summary>
        public static void run(object target, string strPropertyName, object destinationValue, ITransitionType transitionMethod)
        {
            Transition t = new Transition(transitionMethod);

            t.add(target, strPropertyName, destinationValue);
            t.run();
        }
Beispiel #2
0
 private void yamuiButton4_Click(object sender, EventArgs e)
 {
     // We create a transition to animate all four properties at the same time...
     Transition t = new Transition(new TransitionType_Linear(1000));
     //t.add(yamuiButton5, "Text", "What the hell???");
     t.add(yamuiButton5, "Text", (yamuiButton5.Text == @"What the hell???") ? "Holy molly" : "What the hell???");
     t.run();
 }
Beispiel #3
0
        /// <summary>
        /// Sets the property passed in to the initial value passed in, then creates and
        /// immediately runs a transition on it. Also set an final action to execute when the transition ends
        /// </summary>
        public static void run(object target, string strPropertyName, object initialValue, object destinationValue, ITransitionType transitionMethod, EventHandler <Args> executeAtEnd)
        {
            Utility.setValue(target, strPropertyName, initialValue);
            Transition t = new Transition(transitionMethod);

            t.TransitionCompletedEvent += executeAtEnd;
            t.add(target, strPropertyName, destinationValue);
            t.run();
        }
Beispiel #4
0
 private void OnTransitionCompletedEvent(object sender, Transition.Args args)
 {
     if (string.IsNullOrEmpty(Text))
         return;
     var t = new Transition(new TransitionType_Linear(500));
     t.add(this, "ForeColor", YamuiThemeManager.Current.LabelNormalFore);
     t.run();
     LinearBlink = 0;
     var t2 = new Transition(new TransitionType_Linear(2000));
     t2.add(this, "LinearBlink", 401);
     t2.run();
 }
Beispiel #5
0
 /// <summary>
 /// Sets the property passed in to the initial value passed in, then creates and 
 /// immediately runs a transition on it. Also set an final action to execute when the transition ends
 /// </summary>
 public static void run(object target, string strPropertyName, object initialValue, object destinationValue, ITransitionType transitionMethod, EventHandler<Args> executeAtEnd)
 {
     Utility.setValue(target, strPropertyName, initialValue);
     Transition t = new Transition(transitionMethod);
     t.TransitionCompletedEvent += executeAtEnd;
     t.add(target, strPropertyName, destinationValue);
     t.run();
 }
Beispiel #6
0
 /// <summary>
 /// Creates and immediately runs a transition on the property passed in.
 /// </summary>
 public static void run(object target, string strPropertyName, object destinationValue, ITransitionType transitionMethod)
 {
     Transition t = new Transition(transitionMethod);
     t.add(target, strPropertyName, destinationValue);
     t.run();
 }
 private void YamuiNotificationsShown(object sender, EventArgs e)
 {
     // Once the animation has completed the form can receive focus
     _allowFocus = true;
     if (_duration > 0) {
         _closingTransition = new Transition(new TransitionType_Linear(_duration));
         _closingTransition.add(_progressSimplePanel, "Width", 0);
         _closingTransition.TransitionCompletedEvent += (o, args) => { Close(); };
         _closingTransition.run();
     }
 }
 private void YamuiNotificationsOnClosing(object sender, CancelEventArgs args)
 {
     if ((bool)Tag) return;
     args.Cancel = true;
     Tag = true;
     var t = new Transition(new TransitionType_Acceleration(200));
     t.add(this, "Opacity", 0d);
     t.TransitionCompletedEvent += (o, args1) => { Close(); };
     t.run();
 }
Beispiel #9
0
 // get activated window
 protected override void OnShown(EventArgs e)
 {
     // Once the animation has completed the form can receive focus
     _allowFocus = true;
     if (_duration > 0) {
         _closingTransition = new Transition(new TransitionType_Linear(_duration));
         _closingTransition.add(_progressSimplePanel, "Width", 0);
         _closingTransition.TransitionCompletedEvent += (o, args) => { Close(); };
         _closingTransition.run();
     }
     base.OnShown(e);
 }
Beispiel #10
0
 private void TabAnimatorStart()
 {
     if (!YamuiThemeManager.TabAnimationAllowed) return;
     var t = new Transition(new TransitionType_Acceleration(500));
     t.add(_animSmokeScreen, "Opacity", 0d);
     t.TransitionCompletedEvent += (sender, args) => _animSmokeScreen.GoHide = true;
     t.run();
 }