[.NET] 翻譯機程式
請輸入專案類型(網站專案或者應用程式專案):
我要寫一個可以翻譯句子的程式,我寫到它可以Load我給他的.txt檔,
可是下面我就寫不出來了,我不知道怎麼讓它翻譯出來。
請大家幫幫我。
這是我現在寫的程式,感覺也有一點怪怪的。
Public Class Form1
Dim file As String
Dim filename As String
Dim linenum As Integer = 1
Dim tmp1() As String
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
TextBox1.Clear()
TextBox2.Clear()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim x As String
x = TextBox1.Text
Dim sr As New IO.StreamReader(file)
Dim str As String = ""
While Not sr.EndOfStream
linenum += 1
str = str & sr.ReadLine & " "
End While
tmp1 = Split(Trim(str), " ")
TextBox2.Text = str
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
OpenFileDialog1.Filter = "純文字(*.txt)|*.txt|Rich Text 文件(*.RTF)|*.RTF"
OpenFileDialog1.FileName = "JVA04.txt"
If OpenFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
file = OpenFileDialog1.FileName
filename = My.Computer.FileSystem.GetName(file)
End If
End Sub
End Class
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 203.187.77.51
→
06/07 19:00, , 1F
06/07 19:00, 1F
→
06/07 22:03, , 2F
06/07 22:03, 2F
→
06/08 02:00, , 3F
06/08 02:00, 3F
→
06/08 09:55, , 4F
06/08 09:55, 4F