Пример #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     value++;
     if (value > max) value = max;
     FormManager.hlp.hlpRefresh(Parent.Name + "_" + Name + "_" + value);
     var args = new CustomEventArgs(value, max);
     Value_Changed(this, args);
 }
Пример #2
0
 private void bsh_onRegZadChange(object _in, CustomEventArgs e)
 {
     int sum = e.value*10 + e.value1;
     if (sum > 80 && sum < 96)
     {
         bulb2.setState(true);
     }
     bulb2.setState(sum < 73);
 }
Пример #3
0
 private void button2_Click(object sender, EventArgs e)
 {
     value--;
     if (value < 1) value = 1;
     var args = new CustomEventArgs(value, max);
     Value_Changed(this, args);
     //int Angle = Convert.ToInt16(value * 3.6 * max / 100 + 1);
     //button3.BackgroundImage = rotateImage(Resources.kanals, 20 * Angle);
     FormManager.hlp.hlpRefresh(Parent.Name + "_" + Name + "_" + value);
 }
Пример #4
0
 // обработчик здесь только будет вызываться реализуется в подписчике
 public void potenzhiomert1_Value_Changed(object sender, Potenzhiomert.SomeEventArgs e)
 {
     if (voltageX.getValue() != 0)
     {
         picture_Box_for_Oscilloscope1.Set_mX = voltageX.getValue();
         picture_Box_for_Oscilloscope1.Set_mX *= 0.001*picture_Box_for_Oscilloscope1.Set_step_X;
         picture_Box_for_Oscilloscope1.pictureBox1.Invalidate();
     }
     resX = voltageX.getValue();
     var resValue = new CustomEventArgs(voltageX.getValue(), "x");
     if (onResolutionChange != null)
         onResolutionChange(this, resValue); //если есть подписчики то вызвать событие
 }
Пример #5
0
 private void kanal_Value_Changed(object sender, CustomEventArgs e)
 {
     kanalN.Text = kanal.getValue().ToString();
 }
Пример #6
0
 private void msek_Click(object sender, EventArgs e)
 {
     FormManager.hlp.hlpRefresh(Name + "_" + msek.Name + "_" + msek.Step.ToString());
     var regZadChanged = new CustomEventArgs(regZad.Step, msek.Step);
     if (onRegZadChange != null) onRegZadChange(this, regZadChanged);
 }
Пример #7
0
 private void _bv_onSelsinCheck(object _in, CustomEventArgs e)
 {
     FormManager.hlp.hlpRefresh("bv012_selsinZero_" + e.value);
     if (e.value > 60)
     {
         left.setState(true);
         right.setState(false);
     }
     if (e.value < 40)
     {
         left.setState(false);
         right.setState(true);
     }
     if (e.value > 49 && e.value < 51)
     {
         left.setState(true);
         right.setState(true);
         //System.Threading.Thread.Sleep(1000);
         Activate();
         FormManager.hlp.hlpRefresh("");
         //this.Hide();
     }
     if (e.value > 80 && e.value < 90)
     {
         timer1.Interval = 1300;
     }
     if (e.value == 98)
     {
         //timer1.Stop();
         bulb2.setState(true);
         FormManager.OSC.Activate();
         FormManager.hlp.hlpRefresh("");
         Hide();
     }
     if (e.value == 2)
     {
         //timer1.Stop();
         bulb2.setState(true);
         FormManager.OSC.Activate();
         FormManager.hlp.hlpRefresh("");
         Hide();
     }
 }
Пример #8
0
        //создаётся местная реализация метода onResolutionChange
        private void OSC_onResolutionChange(object potezhiometer, CustomEventArgs scrollInfo)
        {
            //throw new NotImplementedException(); я не знаю что это писал не я
            // MessageBox.Show("Oscilloscope resolution changed!"); // делаем чего хотим кидаем алёрты например

            if (scrollInfo.axis == "x")
            {
                FormManager.hlp.hlpRefresh(FormManager.OSC.Name + "_voltageX_" + scrollInfo.value);
            }
            if (scrollInfo.value > 80 && scrollInfo.axis == "x")
            {
                timer3.Start();
            }
            if (scrollInfo.value < 70 && scrollInfo.axis == "x")
            {
                timer3.Stop();

                FormManager.OSC.refresh(@"graph\vhodAz.txt");
            }
        }
Пример #9
0
 public void potenzhiomert2_Value_Changed(object sender, Potenzhiomert.SomeEventArgs e)
 {
     if (voltageY.getValue() != 0)
     {
         picture_Box_for_Oscilloscope1.Set_mY = voltageY.Set_Value*gain;
         picture_Box_for_Oscilloscope1.Set_mY *= 0.001*picture_Box_for_Oscilloscope1.Set_step_Y;
         picture_Box_for_Oscilloscope1.pictureBox1.Invalidate();
     }
     resY = voltageY.getValue();
     var resValue = new CustomEventArgs(voltageY.getValue(), "y");
     if (onResolutionChange != null) onResolutionChange(this, resValue);
 }
Пример #10
0
 private void potenzhiomert1_Value_Changed(object sender, Potenzhiomert.SomeEventArgs e)
 {
     var selsinPos = new CustomEventArgs(selsinZero.getValue(), "selsin");
     if (onSelsinCheck != null) onSelsinCheck(this, selsinPos);
 }