Exemple #1
0
 public Toast()
 {
     InitializeComponent();
     // Display the form by sliding up.
     this.animator = new FormAnimator(this,
                                      FormAnimator.AnimationMethod.Slide,
                                      FormAnimator.AnimationDirection.Up,
                                      500);
 }
Exemple #2
0
        /// <summary>
        /// Creates a new Toast object that is displayed for the specified length of time.
        /// </summary>
        /// <param name="lifeTime">
        /// The length of time, in milliseconds, that the form will be displayed.
        /// </param>
        public Toast(int lifeTime, string message)
        {
            InitializeComponent();

            // Set the time for which the form should be displayed and the message to display.
            this.lifeTimer.Interval = lifeTime;
            this.messageLabel.Text  = message;

            // Display the form by sliding up.
            this.animator = new FormAnimator(this,
                                             FormAnimator.AnimationMethod.Slide,
                                             FormAnimator.AnimationDirection.Up,
                                             500);
        }