Ejemplo n.º 1
0
 private void timer2_Tick(object sender, EventArgs e)
 {
     if (this.Processamento == false)
     {
         this.CaixaDeTexto.Clear();
         CaixaDeTexto.AppendText("Iniciando varredura de arquivos FTP - " + DateTime.Now + " \n\n");
         Thread IniciaThread = new Thread(inicializaSistema);
         IniciaThread.Start();
     }
 }
Ejemplo n.º 2
0
        private void btConectar_Click(object sender, EventArgs e)
        {
            errorProv.Clear();
            if (!String.IsNullOrEmpty(textTempo.Text) && (!String.IsNullOrEmpty(TipoAplicacao.Text)))
            {
                if (TipoAplicacao.Text.Equals("V") || TipoAplicacao.Text.Equals("E"))
                {
                    limparTela();
                    CarregaListView();

                    btConectar.Enabled  = false;
                    btnDesc.Enabled     = true;
                    groupAuto.Enabled   = false;
                    groupEdit.Enabled   = false;
                    btn_Excluir.Enabled = false;

                    tipoapp = TipoAplicacao.Text.Equals("V") ? 1 : 2;

                    lb_aplicacao.Text = TipoAplicacao.Text.Equals("V") ? "ViaLivre" : "Epedido";

                    lb_aplicacao.ForeColor = TipoAplicacao.Text.Equals("V") ? Color.LimeGreen : Color.Black;

                    tabPage1.BackColor = TipoAplicacao.Text.Equals("V") ? Color.WhiteSmoke : Color.DarkSeaGreen;

                    timer2.Interval = (int.Parse(textTempo.Text) * 60000);
                    CaixaDeTexto.AppendText("Iniciando a aplicação... " + DateTime.Now + " \n\n");
                    timer1.Start();
                    timer2.Start();
                    textTempo.Enabled     = false;
                    TipoAplicacao.Enabled = false;
                }
                else
                {
                    errorProv.SetError(TipoAplicacao, "Informe o tipo da aplicação");
                }
            }
            else
            {
                if (string.IsNullOrEmpty(textTempo.Text))
                {
                    errorProv.SetError(textTempo, "Informe o tempo de varredura");
                }

                if (string.IsNullOrEmpty(TipoAplicacao.Text))
                {
                    errorProv.SetError(TipoAplicacao, "Informe o tipo da aplicação");
                }
            }
        }
Ejemplo n.º 3
0
 private void btnDesc_Click(object sender, EventArgs e)
 {
     textTempo.Enabled     = true;
     btConectar.Enabled    = true;
     btnDesc.Enabled       = false;
     groupAuto.Enabled     = true;
     groupEdit.Enabled     = true;
     TipoAplicacao.Enabled = true;
     lb_aplicacao.Text     = "";
     tabPage1.BackColor    = Color.WhiteSmoke;
     timer1.Stop();
     timer2.Stop();
     CaixaDeTexto.AppendText("Aguarde... - " + DateTime.Now + " \n\n");
     Thread.Sleep(10000);
     CaixaDeTexto.AppendText("Aplicação parada - " + DateTime.Now + " \n\n");
 }
Ejemplo n.º 4
0
 public void AtualizaForm()
 {
     CaixaDeTexto.AppendText("Aplicação em execução... " + DateTime.Now + " \n\n");
     CaixaDeTexto.Refresh();
 }