Beispiel #1
0
 private void EditBtn_Click(object sender, EventArgs e)
 {
     if (isControlExist())
     {
         TodoType = "edit";
         if (cmbCntrlType.Text == "Column")
         {
             click_btn = "None";
             ColumnFrm Clmfrm = new ColumnFrm();
             Clmfrm.MdiParent = this.MdiParent;
             Clmfrm.Show();
         }
         else if (cmbCntrlType.Text == "Beam")
         {
             click_btn = "None";
             BeamFrm Bmfrm = new BeamFrm();
             Bmfrm.MdiParent = this.MdiParent;
             Bmfrm.Show();
         }
         else if (cmbCntrlType.Text == "Wall")
         {
             click_btn = "None";
             WallFrm Wlfrm = new WallFrm();
             Wlfrm.MdiParent = this.MdiParent;
             Wlfrm.Show();
         }
         else if (cmbCntrlType.Text == "Window" || cmbCntrlType.Text == "Door")
         {
             click_btn = "None";
             WinFrm Winfrm = new WinFrm();
             Winfrm.MdiParent = this.MdiParent;
             Winfrm.Show();
         }
         else if (cmbCntrlType.Text == "Base")
         {
             click_btn = "None";
             BaseFrm Bsfrm = new BaseFrm();
             Bsfrm.MdiParent = this.MdiParent;
             Bsfrm.Show();
         }
         else if (cmbCntrlType.Text == "Roof")
         {
             click_btn = "None";
             RoofFrm Rffrm = new RoofFrm();
             Rffrm.MdiParent = this.MdiParent;
             Rffrm.Show();
         }
         else
         {
             ;
         }
     }
 }
Beispiel #2
0
 private void picBox_MouseUp(object sender, MouseEventArgs e)
 {
     if (click_btn == "Column")
     {
         TodoType  = "new";
         SX        = e.X;
         SY        = e.Y;
         click_btn = "None";
         ColumnFrm Clmfrm = new ColumnFrm();
         Clmfrm.MdiParent = this.MdiParent;
         Clmfrm.Show();
     }
     else if (click_btn == "Beam")
     {
         TodoType  = "new";
         EX        = e.X;
         EY        = e.Y;
         click_btn = "None";
         BeamFrm Bmfrm = new BeamFrm();
         Bmfrm.MdiParent = this.MdiParent;
         Bmfrm.Show();
     }
     else if (click_btn == "Wall")
     {
         TodoType  = "new";
         EX        = e.X;
         EY        = e.Y;
         click_btn = "None";
         WallFrm Wlfrm = new WallFrm();
         Wlfrm.MdiParent = this.MdiParent;
         Wlfrm.Show();
     }
     else if (click_btn == "Window" || click_btn == "Door")
     {
         TodoType  = "new";
         SX        = e.X;
         SY        = e.Y;
         click_btn = "None";
         WinFrm Winfrm = new WinFrm();
         Winfrm.MdiParent = this.MdiParent;
         Winfrm.Show();
     }
     else if (click_btn == "Base")
     {
         TodoType  = "new";
         EX        = e.X;
         EY        = e.Y;
         click_btn = "None";
         BaseFrm Bsfrm = new BaseFrm();
         Bsfrm.MdiParent = this.MdiParent;
         Bsfrm.Show();
     }
     else if (click_btn == "Roof")
     {
         TodoType  = "new";
         EX        = e.X;
         EY        = e.Y;
         click_btn = "None";
         RoofFrm Rffrm = new RoofFrm();
         Rffrm.MdiParent = this.MdiParent;
         Rffrm.Show();
     }
     else
     {
         ;
     }
 }