Ejemplo n.º 1
0
 private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
 {
     sheetIndex = ((TabControl)sender).SelectedIndex;
     PlacementController.draw();
     ConnectionController.draw();
     StructuralController.draw();
     BoxController.draw();
 }
Ejemplo n.º 2
0
        private void добавитьКомнатуToolStripMenuItem_Click(object sender, EventArgs e)
        {
            RoomCreator cr = new RoomCreator();

            if (cr.ShowDialog() == DialogResult.OK)
            {
                rooms.Add(new Room()
                {
                    labels = new string[] { cr.roomName, cr.roomName, cr.roomName, cr.roomName }
                });
                PlacementController.draw();
                ConnectionController.draw();
                StructuralController.draw();
            }
        }
Ejemplo 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();
            }
        }