using System.Windows.Forms; namespace WindowsFormsApp2 { public partial class displayResult : UserControl { public displayResult() { InitializeComponent(); singleCam1.callback = callback; singleCam2.callback = callback; singleCam3.callback = callback; singleCam4.callback = callback; singleCam5.callback = callback; singleCam6.callback = callback; singleCam7.callback = callback; singleCam8.callback = callback; } void callback(int id) { FullScreen dial = new FullScreen(); if (id > -1) { dial.bindCam(id); dial.Show(); } } public void init() { singleCam1.setCamId(0); singleCam2.setCamId(1); singleCam3.setCamId(2); singleCam4.setCamId(3); singleCam5.setCamId(4); singleCam6.setCamId(5); singleCam7.setCamId(6); singleCam8.setCamId(7); } public void close() { singleCam1.closeSocket(); singleCam2.closeSocket(); singleCam3.closeSocket(); singleCam4.closeSocket(); singleCam5.closeSocket(); singleCam6.closeSocket(); singleCam7.closeSocket(); singleCam8.closeSocket(); userControl11.closeSocket(); } private void displayResult_Load(object sender, System.EventArgs e) { } private void userControl11_Load(object sender, System.EventArgs e) { } private void singleCam5_DoubleClick(object sender, System.EventArgs e) { } private void singleCam1_MouseDoubleClick(object sender, MouseEventArgs e) { //////双击图片时进入全屏或者还原 //if (singleCam1.pictureBox1.Size == singleCam1.pictureBox1.MaximumSize) //{ // singleCam1.pictureBox1.Size = singleCam1.pictureBox1.MinimumSize; // this.singleCam1.pictureBox1.Dock = DockStyle.None; // this.singleCam1.pictureBox1.Refresh(); //} //else //{ // singleCam1.pictureBox1.Size = singleCam1.pictureBox1.MaximumSize; // this.singleCam1.pictureBox1.Dock = DockStyle.None; // this.singleCam1.pictureBox1.Refresh(); //} } } }