Exemplo n.º 1
0
 private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
 {
     sheetIndex = ((TabControl)sender).SelectedIndex;
     PlacementController.draw();
     ConnectionController.draw();
     StructuralController.draw();
     BoxController.draw();
 }
Exemplo n.º 2
0
 private void Schemes_Editor_Resize(object sender, EventArgs e)
 {
     try
     {
         for (int i = 0; i < 4; i++)
         {
             bitmaps[i] = new Bitmap(sheets[sheetIndex].Width, sheets[sheetIndex].Height);
         }
         for (int i = 0; i < 4; i++)
         {
             gr[i] = Graphics.FromImage(bitmaps[i]);
             gr[i].SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
         }
         BoxController.draw();
     }
     catch (Exception ex) { }
 }
Exemplo n.º 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (button1.Text == "Режим масштабирования выключен")
            {
                button1.Text              = "Режим масштабирования включен";
                button1.BackColor         = System.Drawing.Color.LightGreen;
                BoxController.Mode        = modeShkaf.doNothing_SCALEMODE;
                StructuralController.Mode = modeStruct.doNothing_SCALEMODE;
                PlacementController.Mode  = modePlacement.doNothing_SCALEMODE;
                ConnectionController.Mode = modeConnection.doNothing_SCALEMODE;

                button2.Text      = "Режим редактирования кабеля выключен";
                button2.BackColor = System.Drawing.Color.Pink;
            }
            else if (BoxController.Mode == modeShkaf.doNothing_SCALEMODE)
            {
                button1.Text              = "Режим масштабирования выключен";
                button1.BackColor         = System.Drawing.Color.Pink;
                BoxController.Mode        = modeShkaf.doNothing_NOSCALEMODE;
                StructuralController.Mode = modeStruct.doNothing_NOSCALEMODE;
                PlacementController.Mode  = modePlacement.doNothing_NOSCALEMODE;
                ConnectionController.Mode = modeConnection.doNothing_NOSCALEMODE;

                button2.Text      = "Режим редактирования кабеля выключен";
                button2.BackColor = System.Drawing.Color.Pink;
            }
            ;
            if (sheetIndex == 0)
            {
                PlacementController.draw();
            }
            if (sheetIndex == 2)
            {
                BoxController.draw();
            }
            if (sheetIndex == 3)
            {
                StructuralController.draw();
            }

            if (sheetIndex == 1)
            {
                ConnectionController.draw();
            }
        }