public FormAddEditLogin(int staffID) { InitializeComponent(); this.staffID = staffID; access = MiscStuff.GetAccessLevel(staffID); }
private void Form1_Load(object sender, EventArgs e) { Thread broadcastThread = new Thread(() => { Thread.Sleep(2500); while (_threadBroadcast) { lock (_locker) { if (broadCastQueue.Count != 0) { textBoxBroadcast.Invoke((MethodInvoker) delegate { textBoxBroadcast.Text = broadCastQueue.Dequeue(); }); } } Thread.Sleep(2500); } }); broadcastThread.Start(); var access = MiscStuff.GetAccessLevel(staffID); SetAccessLevels(access); }