Exemplo n.º 1
0
        public void GetQuestions(Object stateinfo)
        {
            TestRemote tr = (TestRemote)stateinfo;

            var questions = RemoteQuestionDAL.GetQuestions(tr.TestId);

            if (questions != null)
            {
                this.Invoke((MethodInvoker) delegate
                {
                    listBox1.DataSource = questions.ToList <Question>(); // runs on UI thread
                    button1.Enabled     = true;
                    button1.Text        = OldText;
                });
            }
            else
            {
                MessageBox.Show("No questions returned");
                this.Invoke((MethodInvoker) delegate
                {
                    button1.Enabled = true;
                    button1.Text    = OldText;
                });
            }
        }
Exemplo n.º 2
0
Arquivo: ATSUI.cs Projeto: lidbit/ATS
        private void testRemoteToolStripMenuItem_Click(object sender, EventArgs e)
        {
            TestRemote tr = new TestRemote();

            tr.Show();
        }