예제 #1
0
        public FormPassword(DBL.LinguaManager linguaMngr)
        {
            InitializeComponent();

            this.linguaMngr = linguaMngr;

            AdjustCulture();
        }
예제 #2
0
        public FormAllarmePLC(Class.PlcMacchinaManager plcMacchinaManager, bool allarmeLicenza, DBL.LinguaManager linguaMngr)
        {
            InitializeComponent();

            this.plcMacchinaManager = plcMacchinaManager;
            this.linguaMngr         = linguaMngr;

            this.allarmeLicenza = allarmeLicenza;

            PopolaSchermataErrore(plcMacchinaManager, linguaMngr);
        }
예제 #3
0
        public FormStatistiche(DBL.LinguaManager linguaMngr)
        {
            InitializeComponent();

            this.linguaMngr = linguaMngr;

            AdjustCulture();

            FillFormatoBox();

            AggiornaDati();
        }
예제 #4
0
        public FormVisualizzaScarti(List <Utilities.CacheErrorObject> dataSource, DBL.LinguaManager linguaMngr, object repaintLock)
        {
            InitializeComponent();

            viewControl      = new HWndCtrl(hMainWndCntrl);
            this.linguaMngr  = linguaMngr;
            this.repaintLock = repaintLock;

            bdsCacheErrorObject.DataSource = dataSource;

            AdjustCulture();
        }
예제 #5
0
        public FormDatiDiProduzione(Class.PlcMacchinaManager plcMacchina, DataType.Contatori contatori, DBL.LinguaManager linguaMngr)
        {
            InitializeComponent();

            this.plcMacchina = plcMacchina;
            this.contatori   = contatori;
            this.linguaMngr  = linguaMngr;

            AdjustCulture();
            // |MP 5-2-19  gestione dei campi da visualizzare in funzione di cosa deve fare la macchina
            showCampiTappo();
            showCampiLivello();
        }
예제 #6
0
        public FormModificaPassword(Class.PasswordManager pwdManager, DBL.LinguaManager linguaMngr)
        {
            InitializeComponent();

            this.pwdManager = pwdManager;
            this.linguaMngr = linguaMngr;

            Class.PasswordManager.LivelloPassword lastLivello = this.pwdManager.GetLastLivello();

            rbLivelloTecnico.Enabled     = lastLivello >= Class.PasswordManager.LivelloPassword.Tecnico;
            rbLivelloCostruttore.Enabled = lastLivello >= Class.PasswordManager.LivelloPassword.Costruttore;

            AdjustCulture();
        }
예제 #7
0
        public FormMenuHome(Class.Core[] core, Class.PlcMacchinaManager plcMacchina, Class.PasswordManager pwdManager, DBL.LinguaManager linguaMngr, object repaintLock)
        {
            InitializeComponent();

            this.core        = core;
            this.plcMacchina = plcMacchina;
            this.pwdManager  = pwdManager;
            this.linguaMngr  = linguaMngr;
            this.repaintLock = repaintLock;

            AdjustCulture();

            if (!Properties.Settings.Default.UsaPassword)
            {
                this.Width         -= btnPassword.Width;
                btnPassword.Visible = false;
            }
        }
예제 #8
0
        public FormAbilitaControlli(int id_formato, DataType.AlgoritmoControlloTappoParam paramTappo, DataType.AlgoritmoControlloLivelloParam paramLivello, DBL.LinguaManager linguaMngr)
        {
            InitializeComponent();

            this.id_formato   = id_formato;
            this.paramTappo   = paramTappo;
            this.paramLivello = paramLivello;
            this.linguaMngr   = linguaMngr;

            Object2Form(paramTappo, paramLivello);

            AdjustCulture();

            if (!Properties.Settings.Default.UsaStelvin)
            {
                chbAbilitaPiantaggio.Location      = chbAbilitaSerraggioStelvin.Location;
                chbAbilitaSerraggioStelvin.Visible = false;
            }
        }
예제 #9
0
        public FormGestioneFormati(Class.Core[] core, Class.PlcMacchinaManager plcMacchina, int id_formato, DBL.LinguaManager linguaMngr, object repaintLock)
        {
            InitializeComponent();

            this.core        = core;
            this.plcMacchina = plcMacchina;
            this.id_formato  = id_formato;
            this.linguaMngr  = linguaMngr;
            this.repaintLock = repaintLock;

            AdjustCulture();

            DBL.FormatoManager dbmFormati = new DBL.FormatoManager(Properties.Settings.Default.ConnectionStringFormati);

            string descrizioneFormato = dbmFormati.GetDescrizioneFormato(id_formato);

            lblRicettaCorrente.Text = string.Format(linguaMngr.GetTranslation("LBL_RICETTA_CORRENTE"), descrizioneFormato);

            GestioneControlliLivello();
        }
예제 #10
0
        private void PopolaSchermataErrore(Class.PlcMacchinaManager plcMacchinaManager, DBL.LinguaManager linguaMngr)
        {
            txtDescrizioneErrore.Text = string.Empty;

            GestioneVisualizzazioneErrore(Class.PlcMacchinaManager.Allarmi.EMERGENZA_PREMUTA, linguaMngr.GetTranslation("ALLARME_EMERGENZA_PREMUTA"));
            GestioneVisualizzazioneErrore(Class.PlcMacchinaManager.Allarmi.RAGGIUNTO_NUMERO_DI_SCARTI_CONSECUTIVI, linguaMngr.GetTranslation("ALLARME_RAGGIUNTO_NUMERO_DI_SCARTI_CONSECUTIVI"));
            GestioneVisualizzazioneErrore(Class.PlcMacchinaManager.Allarmi.AVARIA_BATTERIE_UPS, linguaMngr.GetTranslation("ALLARME_AVARIA_BATTERIE_UPS"));
            GestioneVisualizzazioneErrore(Class.PlcMacchinaManager.Allarmi.AVARIA_TENSIONE_UPS, linguaMngr.GetTranslation("ALLARME_AVARIA_TENSIONE_UPS"));
            GestioneVisualizzazioneErrore(Class.PlcMacchinaManager.Allarmi.DISALLINEAMENTO, linguaMngr.GetTranslation("ALLARME_DISALLINEAMENTO"));

            if (this.allarmeLicenza)
            {
                txtDescrizioneErrore.Text = string.Format("{0}{1}\n\r\n\r", txtDescrizioneErrore.Text, "H_ERR_WDBID	 4057	 Image data management: object-ID outside the valid range");
            }
        }
예제 #11
0
 public AlgoritmoControlloLivello(DBL.LinguaManager linguaMngr)
 {
     this.linguaMngr = linguaMngr;
 }
예제 #12
0
        public bool CanOpen(LivelloPassword minLevel, DBL.LinguaManager linguaMngr, bool force)
        {
            bool ok = false;

            if (Properties.Settings.Default.UsaPassword || force)
            {
                if (this.lastLivello != LivelloPassword.NN && swTempoLogin.ElapsedMilliseconds < Properties.Settings.Default.TempoPassword * 60 * 1000 && minLevel <= this.lastLivello)
                {
                    ok = minLevel <= this.lastLivello;
                }
                else
                {
                    FormPassword frmPsw = new FormPassword(linguaMngr);

                    if (frmPsw.ShowDialog() == DialogResult.OK)
                    {
                        bool pswTrovata = false;
                        bool livBasso   = true;

                        DataType.ConfigurazioneCorrente confObj = DataType.ConfigurazioneCorrente.Deserialize(Path.Combine(Properties.Settings.Default.DatiVisionePath, "ConfigurazioneCorrente.xml"));

                        string psw = frmPsw.GetPassword();

                        if (psw == confObj.PswCostruttore)
                        {
                            ok          = true;
                            lastLivello = LivelloPassword.Costruttore;
                            swTempoLogin.Restart();

                            pswTrovata = true;
                            livBasso   = false;
                        }

                        if (!ok && psw == confObj.PswTecnico)
                        {
                            if (minLevel <= LivelloPassword.Tecnico)
                            {
                                ok          = true;
                                lastLivello = LivelloPassword.Tecnico;
                                swTempoLogin.Restart();

                                livBasso = false;
                            }

                            pswTrovata = true;
                        }

                        if (!ok && psw == confObj.PswOperatore)
                        {
                            if (minLevel <= LivelloPassword.Operatore)
                            {
                                ok          = true;
                                lastLivello = LivelloPassword.Operatore;
                                swTempoLogin.Restart();

                                livBasso = false;
                            }

                            pswTrovata = true;
                        }

                        if (!pswTrovata)
                        {
                            MessageBox.Show(linguaMngr.GetTranslation("MSG_PSW_ERRATA"), linguaMngr.GetTranslation("MSG_ERRORE"), MessageBoxButtons.OK, MessageBoxIcon.Error);
                        }
                        else if (livBasso)
                        {
                            MessageBox.Show(linguaMngr.GetTranslation("MSG_LIVELLO_PSW_BASSO"), linguaMngr.GetTranslation("MSG_ATTENZIONE"), MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                        }
                    }
                }
            }
            else
            {
                ok = true;
            }

            return(ok);
        }
예제 #13
0
 public bool CanOpen(LivelloPassword minLevel, DBL.LinguaManager linguaMngr)
 {
     return(CanOpen(minLevel, linguaMngr, false));
 }