Exemple #1
0
        void tmservicio_qr_Elapsed(object sender, ElapsedEventArgs e)
        {
            //string varchivov = "c://valida_hash.txt";
            Int32 _valor = 0;

            try
            {
                //if (!(System.IO.File.Exists(varchivov)))
                if (_valida_service_qr == 0)
                {
                    _valor             = 1;
                    _valida_service_qr = 1;
                    //TextWriter tw = new StreamWriter(varchivov, true);
                    //tw.WriteLine(DateTime.Now.ToString() + "====>>>ejecutando procesos");
                    //tw.Close();
                    string _error = "";
                    Basico.ejecuta_impresion_qr(ref _error);
                    //if (System.IO.File.Exists(varchivov))
                    //{
                    _valida_service_qr = 0;
                    //System.IO.File.Delete(varchivov);
                    //}
                }
                //****************************************************************************
            }
            catch
            {
                //if (System.IO.File.Exists(varchivov))
                //{
                _valida_service_qr = 0;
                //System.IO.File.Delete(varchivov);
                //}
            }

            if (_valor == 1)
            {
                //if (System.IO.File.Exists(varchivov))
                //{
                _valida_service_qr = 0;
                //System.IO.File.Delete(varchivov);
                //}
            }
        }