Ejemplo n.º 1
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();
 }
Ejemplo n.º 2
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();
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Runs the next transition in the list.
        /// </summary>
        private void runNextTransition()
        {
            if (m_listTransitions.Count == 0)
            {
                return;
            }

            // We find the next transition and run it. We also register
            // for its completed event, so that we can start the next transition
            // when this one completes...
            Transition nextTransition = m_listTransitions.First.Value;

            nextTransition.TransitionCompletedEvent += onTransitionCompleted;
            nextTransition.run();
        }
Ejemplo n.º 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();
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 7
0
 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();
     }
 }
Ejemplo n.º 8
0
 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();
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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();
 }