コード例 #1
0
 private void btn_Continuar_Click(object sender, EventArgs e)
 {
     if (File.Exists(Global.pathCarregamento))
     {
         Leitura form = new Leitura();
         form.statusBar1.Text = statusBar1.Text;
         this.Close();
         form.ShowDialog();
     }
     else
     {
         MessageBox.Show("Não há nenhum carregamento em andamento neste aparelho, inicie um novo carregamento.", "Atenção", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1);
     }
 }
コード例 #2
0
 private void btn_Iniciar_Click(object sender, EventArgs e)
 {
     if (File.Exists(Global.pathCarregamento))
     {
         DialogResult result = MessageBox.Show("Quer deletar todos dados salvos e iniciar um novo carregamento?", "Atenção", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1);
         if (result == DialogResult.Yes)
         {
             File.Delete(Global.pathCarregamento);
             File.Create(Global.pathCarregamento).Close();
             Leitura form = new Leitura();
             form.statusBar1.Text = statusBar1.Text;
             this.Close();
             form.Show();
         }
     }
     else
     {
         File.Create(Global.pathCarregamento).Close();
         Leitura form = new Leitura();
         form.statusBar1.Text = statusBar1.Text;
         this.Close();
         form.Show();
     }
 }