コード例 #1
0
        /// <summary>
        /// Handles the Tick event of the CloseTimer control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
        private void CloseTimer_Tick(object sender, EventArgs e)
        {
            if (Bounds.Contains(Cursor.Position))
            {
                return;
            }

            CloseTimer.Interval = MoveTimer.Interval / 2;

            if (OpacityValue == 0)
            {
                Close();
            }
            else
            {
                OpacityValue -= OpacityStep;
            }

            MessageLabel.Refresh();
        }