示例#1
0
文件: MainForm.cs 项目: no1see/all_in
        private void RunUserInputForm()
        {
            string   card    = "";
            UserRead newForm = new UserRead(card);

            newForm.ShowDialog();
            card = newForm.temp;
            newForm.Close();
        }
示例#2
0
文件: MainForm.cs 项目: no1see/all_in
 private void Room4_Click(object sender, EventArgs e)
 {
     if (Room4_Info.Visible == true)
     {
         bool     exist   = false;
         string   card    = "";
         UserRead newForm = new UserRead(card);
         newForm.ShowDialog();
         card = newForm.temp;
         if (card.Length != 0)
         {
             for (int i = 0; i < Program.Rooms.Count; i++)
             {
                 if (Program.Rooms[i].Contains(card))
                 {
                     exist = true;
                     if (Program.Rooms[3].Contains(card))
                     {
                         new NewService(card).ShowDialog();
                         goto m;
                     }
                     new LoginError().ShowDialog();
                 }
             }
             if (!exist)
             {
                 Program.Rooms[3].Clients.Add(new Session((UInt16)1, card));
             }
         }
         m :;
     }
     CloseAllDataGridView();
     Room4_Info.Visible   = true;
     Room4_Client.Visible = true;
     Room4_Room.Visible   = true;
 }