示例#1
0
        private void timer1_Tick_1(object sender, EventArgs e)
        {
            switch (this.action)
            {
            case AlertForm.actionEnum.wait:
                this.timer1.Interval = 5000;
                this.action          = AlertForm.actionEnum.close;
                break;

            case AlertForm.actionEnum.start:
                this.timer1.Interval = 1;
                this.Opacity        += 0.1;
                if (this.x < this.Location.X)
                {
                    this.Left--;
                }
                else
                {
                    if (this.Opacity == 1.0)
                    {
                        this.action = AlertForm.actionEnum.wait;
                    }
                }
                break;

            case AlertForm.actionEnum.close:
                this.timer1.Interval = 1;
                this.Opacity        -= 0.1;

                this.Left -= 3;
                if (base.Opacity == 0.0)
                {
                    base.Close();
                }
                break;
            }
        }
示例#2
0
 private void gunaPictureBox2_Click_1(object sender, EventArgs e)
 {
     this.timer1.Interval = 1;
     this.action          = AlertForm.actionEnum.close;
 }