Exemplo n.º 1
0
 private void buttonGuardar_Click(object sender, EventArgs e)
 {
     try
     {
         string contenido = richTextBoxTexto.Text;
         string path      = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
         Archivador.GuardarTexto(path, "archivo" + EXTENSION_VALIDA, contenido, true);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Exemplo n.º 2
0
        private void buttonGuardar_Click(object sender, EventArgs e)
        {
            string textoGuardar = this.richTextBoxTexto.Text;

            //MessageBox.Show(textoGuardar);
            try
            {
                Archivador.GuardarTexto(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), false, "Miarchivo", textoGuardar);
            }
            catch (Exception errorPathInexistente)
            {
                MessageBox.Show(errorPathInexistente.Message);
            }
        }
Exemplo n.º 3
0
 private void ButtonGuardar_Click(object sender, EventArgs e)
 {
     Archivador.GuardarTexto(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), false, "ARCHIVO", richTextBoxTexto.Text);
     richTextBoxTexto.Clear();
 }