Пример #1
0
 private void ContactLeftPlus_Click(object sender, EventArgs e)
 {
     connectSource = true;
     Design.Animate(plugLeftPlusUD, GlobalData.TimePlugAnimation);
     GlobalData.deviceSource = this;
     // подключение левого плюсового контакта
     contactsDoubleSwitch[0, 0] = true;
     contactsDoubleSwitch[0, 1] = false;
     contactsDoubleSwitch[1, 0] = false;
     contactsDoubleSwitch[1, 1] = false;
     contactsDoubleSwitch[2, 0] = false;
     contactsDoubleSwitch[2, 1] = false;
 }
Пример #2
0
 private void ContactLeftMinus_Click(object sender, EventArgs e)
 {
     if (GlobalData.deviceSource != this)
     {
         connectReceiver = true;
         Design.Animate(plugLeftMinusUD, GlobalData.TimePlugAnimation);
         Design.ConnectionElements(GlobalData.deviceSource, this);
     }
     else
     {
         MessageBox.Show("Подключение невозможно...");
     }
 }
Пример #3
0
 private void ContactLeft_Click(object sender, EventArgs e)
 {
     if (GlobalData.deviceSource != this)
     {
         connectReceiver = true;
         Design.Animate(plugMinusLR, GlobalData.TimePlugAnimation);
         Design.ConnectionElements(GlobalData.deviceSource, this);
         //MessageBox.Show(Convert.ToString(GetPointLeft()));
         //MessageBox.Show(Convert.ToString(GlobalData.deviceSource.GetType()) + "" + Convert.ToString(this.GetType()));
         //MessageBox.Show(Convert.ToString(contactsSingleSwitch[0]) + " " + Convert.ToString(contactsSingleSwitch[1]) + " " + Convert.ToString(contactsSingleSwitch[2]));
     }
     else
     {
         MessageBox.Show("Подключение невозможно...");
     }
 }
Пример #4
0
        private static void SetDataToPanels()
        {
            if (numLab == 1)
            {
                types = new Elements.Type[5] {
                    Elements.Type.Ammeter,
                    Elements.Type.Voltmeter,
                    Elements.Type.VoltageSource,
                    Elements.Type.Lamp,
                    Elements.Type.Stopwatch
                };

                values = new Design.Values[2] {
                    Design.Values.Мощность,
                    Design.Values.абота_тока
                };

                Design.CreatePanelElements(panels[0], types);
                Design.CreatePanelValues(panels[0], types, values);
            }
        }
Пример #5
0
 private void ContactPlus_Click(object sender, EventArgs e)
 {
     connectSource           = true;
     GlobalData.deviceSource = this;
     Design.Animate(plugPlusDU, GlobalData.TimePlugAnimation);
 }