Exemplo n.º 1
0
        /// <summary>
        /// Método estático Leer
        /// Lee los datos del archivo de texto datosJornada.txt
        /// </summary>
        /// <returns>Retorna los datos leidos</returns>
        public static string Leer()
        {
            Texto  datosJornada = new Texto();
            string datos        = "";

            datosJornada.Leer("datosJornada.txt", out datos);
            return(datos);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Lee una jornada de un archivo de texto.
        /// </summary>
        /// <returns>Datos leidos.</returns>
        public static string Leer()
        {
            string salida;
            Texto  txt = new Texto();

            txt.Leer(Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "\\Jornada.txt", out salida);
            return(salida);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Lee Archivos en formato Txt
        /// </summary>
        /// <returns></returns>
        public static string Leer()
        {
            Texto txt = new Texto();

            txt.Leer("carrito.txt", out string datos);

            return(datos);
        }
Exemplo n.º 4
0
        /// <summary>
        /// metodo estatico para leer un txt
        /// </summary>
        /// <returns>los datos leidos</returns>
        public static string Leer()
        {
            Texto nuevoTexto = new Texto();

            nuevoTexto.Leer("ventas.txt", out string datos);

            return(datos);
        }
Exemplo n.º 5
0
        /// <summary>
        /// Método que lee un archivo de texto con los datos de una jornada.
        /// </summary>
        /// <returns>Un String con los datos de una jornada.</returns>
        public static String Leer()
        {
            String lectorDeJornada = String.Empty;
            Texto  archivoALeer    = new Texto();

            archivoALeer.Leer("jornadas.txt", out lectorDeJornada);
            return(lectorDeJornada);
        }
Exemplo n.º 6
0
        /// <summary>
        /// Lee la jornada en formato texto
        /// </summary>
        /// <returns></returns>
        public string Leer()
        {
            string path    = Directory.GetCurrentDirectory() + "Jornada.txt";
            Texto  texto   = new Texto();
            string jornada = string.Empty;

            texto.Leer(path, out jornada);
            return(jornada);
        }
Exemplo n.º 7
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public static string Leer()
        {
            string archivo = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + ".\\Jornada.txt";
            Texto  texto   = new Texto();

            texto.Leer(archivo, out string dato);

            return(dato);
        }
Exemplo n.º 8
0
        /// <summary>
        /// Lee un archivo de texto
        /// </summary>
        /// <returns></returns>
        public static string LeerTexto(string nombreArchivo)
        {
            string auxEmpresa = string.Empty;
            Texto  texto      = new Texto();

            texto.Leer(nombreArchivo, out auxEmpresa);

            return(auxEmpresa);
        }
Exemplo n.º 9
0
        /// <summary>
        /// Lee los datos de un concesionario de un archivo de texto
        /// </summary>
        /// <returns>True si pudo leer, sino false</returns>
        public static string Leer()
        {
            string retorno;

            Texto aux = new Texto();

            aux.Leer(Environment.GetFolderPath(System.Environment.SpecialFolder.Desktop) + @"\Concesionario.txt", out retorno);

            return(retorno);
        }
        /// <summary>
        /// Leerá la civilizacion en un archivo localizado en el escritorio
        /// </summary>
        /// <returns></returns>
        public static string LeerTexto()
        {
            Texto  texto = new Texto();
            string path  = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + @"\" + "Civilizacion.txt";

            if (!(texto.Leer(path, out string retorno)))
            {
                retorno = null;
            }
            return(retorno);
        }
Exemplo n.º 11
0
        /// <summary>
        /// Lee el archivo txt, y devuelve un string con todos los datos de la Jornada, siempre y cuando cumpla con la condicion
        /// </summary>
        /// <returns></returns>
        public static string Leer()
        {
            Texto  textoJornada = new Texto();
            string datos;

            if (textoJornada.Leer(string.Format(AppDomain.CurrentDomain.BaseDirectory + "Jornada.txt"), out datos))
            {
                return(datos);
            }
            return("");
        }
Exemplo n.º 12
0
        /// <summary>
        ///  retornará los datos de la Jornada como texto
        /// </summary>
        /// <returns></returns>
        public static string Leer()
        {
            Texto  txt     = new Texto();
            string retorno = "";

            if (!(txt is null))
            {
                txt.Leer(AppDomain.CurrentDomain.BaseDirectory + "\\Jornada.txt", out retorno);
            }
            return(retorno);
        }
Exemplo n.º 13
0
        public static string Leer()
        {
            Texto  reader = new Texto();
            string retorno;

            try
            {
                reader.Leer("Jornada.txt", out retorno);
            }
            catch (Exception e)
            {
                throw new ArchivosException(e);
            }

            return(retorno);
        }
Exemplo n.º 14
0
        /// <summary>
        /// Lee un archivos de texto con datos de las jornadas.
        /// </summary>
        /// <returns>string con datos de las jornadas</returns>
        public static string Leer()
        {
            Texto  txt    = new Texto();
            string nombre = "jornadas";
            string salida = string.Empty;

            try
            {
                txt.Leer(nombre, out salida);
            }
            catch (ArchivosException ex)
            {
                throw new ArchivosException(ex);
            }

            return(salida);
        }
Exemplo n.º 15
0
        /// <summary>
        /// Metodo que lee un carrito en un archivo con extension .txt
        /// </summary>
        /// <returns>cadena de string con los datos del carrito leido</returns>
        public static string Leer()
        {
            Texto  texto   = null;
            string carrito = null;

            try
            {
                texto = new Texto();
                texto.Leer("Jornada", out carrito);
            }
            catch (Exception)
            {
                throw;
            }

            return(carrito);
        }
Exemplo n.º 16
0
        /// <summary>
        /// Leer de clase retornará los datos de la Jornada como texto.
        /// </summary>
        /// <returns>Un string con los datos de una jornada</returns>
        public static string Leer()
        {
            string datosLeidos;
            Texto  texto = new Texto();

            try {
                string[] aux = Regex.Split(Directory.GetCurrentDirectory(), @"\\Palmieri.Matias_Ezequiel.2C.TP3");
                aux[0] += "\\Jornada.txt";
                //string fileName = AppDomain.CurrentDomain.BaseDirectory + "PruebaDeGuardarJornada.txt";
                texto.Leer(aux[0], out datosLeidos);
            }
            catch (Exception e)
            {
                throw new Exception("Ocurrio un problema posiblemente en texto.leer fijate la inner", e);
            }

            return(datosLeidos);
        }
Exemplo n.º 17
0
        public static bool Leer(this Vendedora vendedora, string path, out string datos)
        {
            Texto t = new Texto();

            return(t.Leer(path, out datos));
        }