Пример #1
0
        private void LogIn_Load(object sender, EventArgs e)
        {
            switch ((this.Owner).GetType().Name)
            {
            case "EditDelUser":
                frmEDU    = (EditDelUser)this.Owner;
                plcThread = frmEDU.GetPLCThread();
                plcDB     = 3003;
                break;

            case "AddUser":
                frmAU     = (AddUser)this.Owner;
                plcThread = frmAU.GetPLCThread();
                plcDB     = 3003;
                break;

            case "MainPage":
                frmMain   = (MainPage)this.Owner;
                plcThread = frmMain.GetPLC_Threads();
                plcDB     = 3003;
                break;

            default: break;
            }

            Thread rfidThread = new Thread(new ThreadStart(ReadRFID));

            rfidThread.Start();
        }
Пример #2
0
        private void Dgv_UserManagement_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            userRowIndex = e.RowIndex;
            using (EditDelUser frmEditDelUser = new EditDelUser())
            {
                frmEditDelUser.Owner = this;
                frmEditDelUser.ShowDialog();
            }

            LoadUsers();
        }