Beispiel #1
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (!stateBut)
     {
         ad        = new adminDocuments(currentIdUser);
         ad.Height = this.Height;
         ad.Show();
         ad.Location = new Point(this.Location.X + this.Width - 15, this.Location.Y);
     }
     else
     {
         ad.Close();
     }
     stateBut = !stateBut;
 }
Beispiel #2
0
        private void listBox1_DoubleClick(object sender, EventArgs e)
        {
            MouseEventArgs ee    = e as MouseEventArgs;
            int            index = listBox1.IndexFromPoint(ee.Location);

            if (index > -1)
            {
                //MessageBox.Show(userList[index].SelectSingleNode("@id").Value);
                textBox1.Text = userList[index].SelectSingleNode("login").InnerText;
                textBox2.Text = userList[index].SelectSingleNode("password").InnerText;
                currentIdUser = Convert.ToInt32(userList[index].SelectSingleNode("@id").Value);
            }
            if (stateBut)
            {
                ad.Close();
            }
            {
                ad        = new adminDocuments(currentIdUser);
                ad.Height = this.Height;
                ad.Show();
                ad.Location = new Point(this.Location.X + this.Width - 15, this.Location.Y);
            }
            stateBut = true;
        }