Beispiel #1
0
        void timer_Tick(object sender, EventArgs e)
        {
            if (Math.Abs(label1.ForeColor.R - label1.BackColor.R) < Math.Abs(dR / 10))
            {
                sign       *= -1;
                label1.Text = "Neily";
            }
            label1.ForeColor = Color.FromArgb(255, label1.ForeColor.R + sign * dR / 10, label1.ForeColor.G + sign * dG / 10, label1.ForeColor.B + sign * dB / 10);
            if (label1.BackColor.R == label1.ForeColor.R + dR)
            {
                Neily_menu.Thread.Sleep(2000);



                Main_menu frm = new Main_menu();
                frm.Show();

                while (this.Opacity != 0)
                {
                    Neily_menu.Thread.Sleep(10);
                    this.Opacity -= 0.009;
                }

                ((Timer)sender).Stop();

                this.Hide();
            }
        }
Beispiel #2
0
        private void button6_Click(object sender, EventArgs e)
        {
            Main_menu frm = new Main_menu();

            frm.Show();

            this.Close();
        }
 private void button2_Click(object sender, EventArgs e)
 {
     try
     {
         Main_menu frm = new Main_menu();
         frm.Show();
         this.Hide();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                serialPort1.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }

            Main_menu frm = new Main_menu();

            frm.Show();

            this.Close();
        }