Example #1
0
 private void FrmPrincipal_Load(object sender, EventArgs e)
 {
     lblVersion.Text = "Ver " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
     SetDoingLengthyOperation(false);
     Roteiro r = new Roteiro(this);
     camposCarregar();
     BtnSincronizar.Focus();
 }
Example #2
0
        public void Start()
        {
            r = new Roteiro(this);
            string msg = r.Iniciar();
            if (msg != "")
            {
                MessageBox.Show(msg);
                Close();
            }
            else
            {
                lblStatus.Text = "Conectado ao banco de dados: " + D.BancoAlvo;
            }

            Op.AtualizationInProgressCheck();

            tmrSincronizacao.Interval = minutosEntreExecucoes * 60 * 1000;
            btnChegouCadastro.Visible = false;
            tmrSincronizacao.Enabled = true;
            tmrPiscar.Enabled = true;
        }
Example #3
0
        void DoLengthyOperation(Object param)
        {
            MsgAppend("Iniciando a sincronização");

            if (!D.ModoTeste)
            {
                try
                {
                    Roteiro r = new Roteiro(this);
                    string msg = r.Sincronizar();
                    if (msg != "")
                        MsgAppend(msg);
                }
                catch (Exception ex)
                {
                    HandleUnhandledException(ex);
                }
            }
            else
            {
                Roteiro r = new Roteiro(this);
                string msg = r.Sincronizar();
                if (msg != "")
                    MsgAppend(msg);
            }
            // Re-enable UI
            this.SetDoingLengthyOperation(false);
        }