Esempio n. 1
0
        private void Timer1_Tick(object sender, EventArgs e)
        {
            switch (this.action)
            {
                case FormAlert.actionEnum.wait:
                    this.Timer1.Interval = 5000;
                    this.action = FormAlert.actionEnum.close;
                    break;
                case FormAlert.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 = FormAlert.actionEnum.wait;
                        }
                    }
                    break;
                case FormAlert.actionEnum.close:
                    this.Timer1.Interval = 1;
                    this.Opacity -= 0.1;

                    this.Left -= 3;
                    if (base.Opacity == 0.0)
                    {
                        base.Close();
                    }
                    break;
            }
        }
Esempio n. 2
0
 private void GunaPictureBox2_Click(object sender, EventArgs e)
 {
     this.Timer1.Interval = 1;
     this.action = FormAlert.actionEnum.close;
 }