示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            int id = lbQuestion.SelectedIndex;

            if (id < 0)
            {
                return;
            }
            Utility.Question q = questionList[id];
            var playForm       = new Utility.Form1(videoFolder + @"\" + q.questionVideo);

            playForm.Show();


            Utility.Message sendPlay = new Utility.Message(Utility.Message.Type.PlayVideo, null, q.questionVideo, IP, "Server", checkBox1.Checked);
            foreach (Socket s in listClient)
            {
                try
                {
                    s.Send(MessageToByteArray(sendPlay));
                }
                catch (Exception er)
                {
                    textBox1.Text = textBox1.Text + er.Message + "\r\n";
                    s.Close();
                }
            }
        }
        private void buttonPlay_Click(object sender, EventArgs e)
        {
            int id = listBoxQuestion.SelectedIndex;

            if (id < 0)
            {
                return;
            }
            Utility.Question q = questionList[id];
            var playForm       = new Utility.Form1(videoFolder + @"\" + q.questionVideo);

            playForm.Show();
        }
        private void PlayMedia(String mediaFile)
        {
            if (this.InvokeRequired)
            {
                PlayMediaDelegate d = new PlayMediaDelegate(PlayMedia);

                this.Invoke(d, new object[] { mediaFile });
            }
            else
            {
                var playForm = new Utility.Form1(mediaFile);
                playForm.Show();
            }
        }
示例#4
0
        private void JscLabel2Click(object sender, EventArgs e)
        {
            var test = new Utility.Form1();

            test.ShowDialog();
        }