예제 #1
0
 public admin_addadmin(string[] str1, admin_alter admin1)
 {
     InitializeComponent();
     this.f = admin1;
     for (int i = 0; i < str1.Length; i++)
     {
         this.str[i] = str1[i];
     }
     textBox1.Text = str[0];
     textBox2.Text = str[1];
     textBox3.Text = str[2];
     textBox4.Text = str[3];
 }
예제 #2
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (pictureBox1.Location.X < 700)
            {
                pictureBox1.Location = new Point(pictureBox1.Location.X + 1, pictureBox1.Location.Y);
            }
            else
            {
                if (comboBox1.Text == "玩家")
                {
                    string      sql = "select *from playergame where id='" + textBox1.Text + "'and password='******'";
                    Dao         dao = new Dao();
                    IDataReader dr  = dao.read(sql);
                    dr.Read();
                    string userid = dr["id"].ToString();
                    user   user1  = new user(userid);

                    user1.Show();
                    this.Hide();
                    //this.Close();
                }
                else
                {
                    if (comboBox1.Text == "管理员")
                    {
                        admin admin1 = new admin();
                        admin1.Show();
                        this.Hide();
                        //this.Close();
                    }
                    else if (comboBox1.Text == "超级管理员")
                    {
                        admin_alter admin_alter1 = new admin_alter();
                        admin_alter1.Show();
                        this.Hide();
                    }
                }

                timer1.Stop();
            }
        }
예제 #3
0
 public admin_addadmin(admin_alter admin1)
 {
     InitializeComponent();
     this.f = admin1;
 }