Código que junto o arquivo original (Inglês) e traduzido

By: CAOS on Jan 28th, 2012  |  syntax: None  |  size: 1.34 KB  |  hits: 9  |  expires: Never
download  |  raw  |  embed  |  report abuse
Copied
  1.  Dim oArquivo As System.IO.File
  2.     Dim oEscrever As System.IO.StreamWriter
  3.  
  4.  
  5.     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  6.         Dim fileContents As String
  7.         Dim fileContents2 As String
  8.         fileContents = My.Computer.FileSystem.ReadAllText("C:\tmp\arquivo1.txt")
  9.         fileContents2 = My.Computer.FileSystem.ReadAllText("C:\tmp\arquivo1.txt")
  10.         oEscrever = IO.File.CreateText("c:\tmp\arquivonovo.txt")
  11.         Dim fluxoTexto1, fluxotexto2 As IO.StreamReader
  12.         Dim linhaTexto1, linhatexto2 As String
  13.         Dim arquivo1 As String = "C:\tmp\arquivo1.txt"
  14.         Dim arquivo2 As String = "c:\tmp\arquivo2.txt"
  15.  
  16.         fluxoTexto1 = New IO.StreamReader(arquivo1)
  17.         fluxotexto2 = New IO.StreamReader(arquivo2)
  18.         linhaTexto1 = fluxoTexto1.ReadLine
  19.         linhatexto2 = fluxotexto2.ReadLine
  20.         Dim contador1 As Double = 0
  21.  
  22.         While contador1 < 2794
  23.             'txtLinhas.Text &= linhaTexto & vbCrLf
  24.             oEscrever.WriteLine("En:" & linhaTexto1)
  25.             oEscrever.WriteLine("Br:" & linhatexto2)
  26.             linhaTexto1 = fluxoTexto1.ReadLine
  27.             linhatexto2 = fluxotexto2.ReadLine
  28.             contador1 += 1
  29.         End While
  30.         fluxoTexto1.Close()
  31.         fluxotexto2.Close()
  32.         MsgBox("ok")
  33.     End Sub