Пример #1
0
        private void switchOffset_CheckedChanged(object sender, Bunifu.UI.WinForms.BunifuToggleSwitch.CheckedChangedEventArgs e)
        {
            try
            {
                if (switchOffset.Checked)
                {
                    CSerialDeserial.ReadFile(ref this.db1);
                    S7.SetDIntAt(this.db1Buffer, 212, Convert.ToByte(nudDelayTime.Value));

                    this.result = this.Client.DBWrite(1, 0, this.db1Buffer.Length, this.db1Buffer);

                    Alert($"Offset impostato a {nudDelayTime.Value}s", AlertDLL.Alert.enmType.Success);
                }
                else
                {
                    CSerialDeserial.ReadFile(ref this.db1);
                    S7.SetDIntAt(this.db1Buffer, 212, 0);

                    this.result = this.Client.DBWrite(1, 0, this.db1Buffer.Length, this.db1Buffer);

                    Alert("Offset rimosso", AlertDLL.Alert.enmType.Success);
                }
            }
            catch (Exception)
            {
                Alert("Errore non gestito", AlertDLL.Alert.enmType.Error);
            }
        }
Пример #2
0
        private void switchTampografia_CheckedChanged(object sender, Bunifu.UI.WinForms.BunifuToggleSwitch.CheckedChangedEventArgs e)
        {
            if (switchTampografia.Checked)
            {
                listaGuasti.Add("tampografia");
            }
            else
            {
                listaGuasti.Remove("tampografia");
            }

            simulaGuasto();
        }
Пример #3
0
        private void switchAriaImpianto_CheckedChanged(object sender, Bunifu.UI.WinForms.BunifuToggleSwitch.CheckedChangedEventArgs e)
        {
            if (switchAriaImpianto.Checked)
            {
                listaGuasti.Add("aria impianto");
            }
            else
            {
                listaGuasti.Remove("aria impianto");
            }

            simulaGuasto();
        }
Пример #4
0
        private void switchMancanzaPezzi_CheckedChanged(object sender, Bunifu.UI.WinForms.BunifuToggleSwitch.CheckedChangedEventArgs e)
        {
            if (switchMancanzaPezzi.Checked)
            {
                listaGuasti.Add("mancanza pezzi");
            }
            else
            {
                listaGuasti.Remove("mancanza pezzi");
            }

            simulaGuasto();
        }
Пример #5
0
        private void switchScaricoPieno_CheckedChanged(object sender, Bunifu.UI.WinForms.BunifuToggleSwitch.CheckedChangedEventArgs e)
        {
            if (switchScaricoPieno.Checked)
            {
                listaGuasti.Add("scarico pieno");
            }
            else
            {
                listaGuasti.Remove("scarico pieno");
            }

            simulaGuasto();
        }
Пример #6
0
        private void switchEVTraslazione_CheckedChanged(object sender, Bunifu.UI.WinForms.BunifuToggleSwitch.CheckedChangedEventArgs e)
        {
            if (switchEVTraslazione.Checked)
            {
                listaGuasti.Add("EV traslazione");
            }
            else
            {
                listaGuasti.Remove("EV traslazione");
            }

            simulaGuasto();
        }
Пример #7
0
        private void switchEVMovVert_CheckedChanged(object sender, Bunifu.UI.WinForms.BunifuToggleSwitch.CheckedChangedEventArgs e)
        {
            if (switchEVMovVert.Checked)
            {
                listaGuasti.Add("EV movimento verticale");
            }
            else
            {
                listaGuasti.Remove("EV movimento verticale");
            }

            simulaGuasto();
        }
Пример #8
0
        //se cambia lo stato del bottone che attiva la simulazione
        private void switchStatoSimulazione_CheckedChanged(object sender, Bunifu.UI.WinForms.BunifuToggleSwitch.CheckedChangedEventArgs e)
        {
            if (switchStatoSimulazione.Checked)
            {
                txtStatoSimulazione.Text = "ON";

                //avvio simulazione
                setSwitchGuastiStatus(true);
                Alert("Simulazione avviata", AlertDLL.Alert.enmType.Success);
                simulaGuasto();
            }
            else
            {
                txtStatoSimulazione.Text = "OFF";
                //blocco simulazione
                setSwitchGuastiStatus(false);
                Alert("Simulazione bloccata", AlertDLL.Alert.enmType.Success);
                cancellaSimulazioneGuasto();
            }
        }
Пример #9
0
 private void BunifuToggleSwitch1_CheckedChanged(object sender, Bunifu.UI.WinForms.BunifuToggleSwitch.CheckedChangedEventArgs e)
 {
     check_toggle();
 }
 private void twXemHocPhan_CheckedChanged(object sender, Bunifu.UI.WinForms.BunifuToggleSwitch.CheckedChangedEventArgs e)
 {
     gbTimKiemHP.Visible = twXemHocPhan.Value;
     dgvHP.Visible       = twXemHocPhan.Value;
 }