Beispiel #1
0
 private void pictureBox_Drop_Click(object sender, EventArgs e)
 {
     if (displayDropForm == null || displayDropForm.IsDisposed)
     {
         displayDropForm = new DisplayDropForm();
         displayDropForm.Show(this.DockPanel);
     }
     else
     {
         displayDropForm.Show(this.DockPanel);
     }
 }
 private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
 {
     TreeNode a = e.Node;
     switch (a.Text)
     {
         case "摄像头监控":
             if (displayVideoForm == null || displayVideoForm.IsDisposed)
             {
                 displayVideoForm = new DisplayVideoForm();
                 displayVideoForm.Show(this.DockPanel);
             }
             else
             {
                 displayVideoForm.Show(this.DockPanel);
             }
             break;
         case "水浸监控":
             if (displayDropForm == null || displayDropForm.IsDisposed)
             {
                 displayDropForm = new DisplayDropForm();
                 displayDropForm.Show(this.DockPanel);
             }
             else
             {
                 displayDropForm.Show(this.DockPanel);
             }
             break;
         case "温湿度监控":
             if (displayTempForm == null || displayTempForm.IsDisposed)
             {
                 displayTempForm = new DisplayTempForm();
                 displayTempForm.Show(this.DockPanel);
             }
             else
             {
                 displayTempForm.Show(this.DockPanel);
             }
             break;
         default:
             break;
     }
 }