|
|
 |
|
|
|
 |
|
| |
| Want to provide new applications and services to attract more visitors? Adding translation features to your
programs or websites (such as shopping, searching, e-Commerce, content management, eLearning, ERP, chatting,
...etc.) will make you outstanding among the rivals and increase more business opportunities. |
Integrating multilingual translation of dictionary, text and web into your programs, websites, PDAs
or other applications is never easier than using Mytrans Web Service. You ONLY NEED to write lines of
commands; NO NEED to maintain translation servers; NO NEED to pay for SDK license. And "Pay As You Use",
each word costs only 0.2 point. |
Now add value to your websites or programs with Mytrans Web Service!! |
| |
|
| |
|
| |
| NOTE:
|
- To call Mytrans' Web Service, you must be a registered member in Mytrans and have available points in your member ID.
- Mytrans' online translation is based on Machine Translation technology, therefore, the translation result can only be a reference. Post-editing is necessary in the case of high accuracy. Mytrans takes no responsibility for any dealings done on the basis of this online translation. Also, users will not be allowed to offend the Intellectual Property of the authors of the original contents with the translation done here.
- Mytrans' Web Service adopts SSL 128 bit encryption to secure your data.
|
| |
| Support: |
| If you have any problem or question in using Mytrans' web services, contact us at below. |
TEL: 886-2-87971212
FAX: 886-2-87971919
EMAIL: otek@ms10.hinet.net |
| |
|
| |
| Mytrans Web Service Description |
|
- LookupDictionary
- TranslateText
- TranslateHTMLText
|
|
- Look up dictionary for a word
- Translate paragraphs of text
- Translate a webpage
|
|
| |
|
| |
| Web Reference: https://www.mytrans.com.tw/webservice/mytransservice.asmx |
|
Method: LookupDictionary
Feature: Look up dictionary for a word in general dictionary or professional dictionary. . Each word costs 0.2 point if the word can be found. |
| Parameter: |
| |
String MemberID: |
|
| |
|
Member ID in Mytrans |
| |
|
|
| |
String Password: |
|
| |
|
Password in Mytrans |
| |
|
|
| |
Int LanguageIndex: Language of the dictionary. Value and corresponding language is as below |
| |
|
1: English to traditional Chinese
2: English to simplified Chinese
3: traditional Chinese to English
4: simplified Chinese to English
5: Japanese to traditional Chinese
6: Japanese to simplified Chinese
7: traditional Chinese to Japanese
8: simplified Chinese to Japanese
9: traditional Chinese to simplified Chinese
10: simplified Chinese to traditional Chinese |
| |
|
|
| |
String ProfessionalDictionary: Name of the professional dictionary |
| |
|
"0": Look up general dictionary, otherwise look up the professional dictionary specified.
Available professional dictionaries for various languages now:
English to Chinese |
| |
|
| |
"Information and Electronics"
"Mechanic Engineering"
"Chemical Engineering"
"Civil Engineering"
"Medical"
"Law"
"Finance"
"Management"
"Trade"
"Automechanic"
"Health" |
|
| |
|
Chinese to English |
| |
|
| |
"Information and Electronics"
"Mechanic Engineering"
"Chemical Engineering"
"Civil Engineering"
"Medical"
"Law"
"Finance"
"Management"
"Trade"
"Health" |
|
| |
|
Japanese to Chinese |
| |
|
| |
"Information and Electronics"
"Mechanic Engineering"
"Chemical Engineering"
"Medical"
"Finance" |
|
| |
|
Chinese to Japanese |
| |
|
| |
"Information and Electronics"
"Mechanic Engineering"
"Chemical Engineering"
"Medical"
"Finance" |
|
| |
|
|
| |
|
String Word: The word to look up. If you are looking up a Japanese dictionary, enter Kanzi here if any. |
| |
|
|
| |
|
String Word2: If you are looking up a Japanese dictionary, enter Hiragana or Katakana here. |
|
| |
Return: a string with form as below |
| |
<ReturnCode>Return code</ReturnCode>
<PointUsed>Point used</PointUsed>
<PointLeft>Point left</PointLeft>
<WordDatas>Translation</WordDatas> |
|
| |
| In which, |
| |
Return code: 0, the word is found in specified dictionary |
| |
|
else, the word is not found |
| |
Point used: points used during this translation. Each word costs 0.2 point. |
| |
Point left: points left after this translation |
| |
Translation: the dictionary content of the word if it can be found |
|
|
|
| |
Method: TranslateText
Feature: Translate paragraphs of text. Each word costs 0.2 point. |
| Parameter: |
| |
String MemberID: |
|
| |
|
Member ID in Mytrans |
| |
|
|
| |
String Password: |
|
| |
|
Password in Mytrans |
| |
|
|
| |
Int LanguageIndex: value and corresponding language is as below |
| |
|
1: English to traditional Chinese
2: English to simplified Chinese
3: traditional Chinese to English
4: simplified Chinese to English
5: Japanese to traditional Chinese
6: Japanese to simplified Chinese
7: traditional Chinese to Japanese
8: simplified Chinese to Japanese
9: traditional Chinese to simplified Chinese
10: simplified Chinese to traditional Chinese |
| |
|
|
| |
String ProfessionalDictionary1: Name of first priority professional dictionary |
| |
|
"0": not used
Available professional dictionaries for various languages now:
English to Chinese |
| |
|
| |
"Information and Electronics"
"Mechanic Engineering"
"Chemical Engineering"
"Civil Engineering"
"Medical"
"Law"
"Finance"
"Management"
"Trade"
"Automechanic"
"Health" |
|
| |
|
Chinese to English |
| |
|
| |
"Information and Electronics"
"Mechanic Engineering"
"Chemical Engineering"
"Civil Engineering"
"Medical"
"Law"
"Finance"
"Management"
"Trade"
"Health" |
|
| |
|
Japanese to Chinese |
| |
|
| |
"Information and Electronics"
"Mechanic Engineering"
"Chemical Engineering"
"Medical"
"Finance" |
|
| |
|
Chinese to Japanese |
| |
|
| |
"Information and Electronics"
"Mechanic Engineering"
"Chemical Engineering"
"Medical"
"Finance" |
|
| |
|
|
| |
String ProfessionalDictionary2: Name of second priority professional dictionary. Usage is same as ProfessionalDictionary1. |
| |
|
|
| |
String ProfessionalDictionary3: Name of third priority professional dictionary. Usage is same as ProfessionalDictionary1. |
| |
|
|
| |
Int AlternateNum: Maximum number of alternate translation produced. No alternate translation will be produced if it is given as 0. |
| |
|
|
| |
Int TranslationMode: (For Chinese to English translation only) |
| |
|
1: normal translation
2: pinyin translation
3: address translation
4. name translation |
| |
|
|
| |
Int Formality: (For Chinese to Japanese translation only) |
| |
|
1: Informal
2: Polite |
| |
|
|
| |
Int ShowKatakanaSource: (For Japanese to Chinese and Chinese to Japanese translation only) |
| |
|
1: Show source word of Katakana word
0: Don't show |
| |
|
|
| |
Int ReplacePhrase: (For traditional Chinese/simplified Chinese translation only) |
| |
|
1: Make phrase replacement during translation.
0: Don't make phrase replacement, just make code conversion. |
| |
|
|
| |
String SourceText: The text to translate. The maximum character number of the text is 65536. |
|
| |
Return: a string with form as below |
| |
<ReturnCode>Return code</ReturnCode> |
| |
<PointUsed>Point used</PointUsed> |
| |
<PointLeft>Point left</PointLeft> |
| |
<Translation><![CDATA[Translation]]></Translation> |
|
| |
| In which, |
| |
Return code: 0, translation succeed |
| |
|
else, translation fail |
| |
Point used: points used during this translation. Each word costs 0.2 point. |
| |
Point left: points left after this translation |
| |
Translation: the translation output |
|
|
|
| |
Method: TranslateHTMLText
Feature: Translate content of a HTML file. Each word costs 0.2 point. |
| Parameter: |
| |
String MemberID: |
|
| |
|
Member ID in Mytrans |
| |
|
|
| |
String Password: |
|
| |
|
Password in Mytrans |
| |
|
|
| |
Int LanguageIndex: value and corresponding language is as below |
| |
|
1: English to traditional Chinese
2: English to simplified Chinese
3: traditional Chinese to English
4: simplified Chinese to English
5: Japanese to traditional Chinese
6: Japanese to simplified Chinese
7: traditional Chinese to Japanese
8: simplified Chinese to Japanese
9: traditional Chinese to simplified Chinese
10: simplified Chinese to traditional Chinese |
| |
|
|
| |
String ProfessionalDictionary1: Name of first priority professional dictionary |
| |
|
"0": not used
Available professional dictionaries for various languages now:
English to Chinese |
| |
|
| |
"Information and Electronics"
"Mechanic Engineering"
"Chemical Engineering"
"Civil Engineering"
"Medical"
"Law"
"Finance"
"Management"
"Trade"
"Automechanic"
"Health" |
|
| |
|
Chinese to English |
| |
|
| |
"Information and Electronics"
"Mechanic Engineering"
"Chemical Engineering"
"Civil Engineering"
"Medical"
"Law"
"Finance"
"Management"
"Trade"
"Health" |
|
| |
|
Japanese to Chinese |
| |
|
| |
"Information and Electronics"
"Mechanic Engineering"
"Chemical Engineering"
"Medical"
"Finance" |
|
| |
|
Chinese to Japanese |
| |
|
| |
"Information and Electronics"
"Mechanic Engineering"
"Chemical Engineering"
"Medical"
"Finance" |
|
| |
|
|
| |
String ProfessionalDictionary2: Name of second priority professional dictionary. Usage is same as ProfessionalDictionary1. |
| |
|
|
| |
String ProfessionalDictionary3: Name of third priority professional dictionary. Usage is same as ProfessionalDictionary1. |
| |
|
|
| |
Int AlternateNum: Maximum number of alternate translation produced. No alternate translation will be produced if it is given as 0. |
| |
|
|
| |
Int TranslationMode: (For Chinese to English translation only) |
| |
|
1: normal translation
2: pinyin translation
3: address translation
4. name translation |
| |
|
|
| |
Int Formality: (For Chinese to Japanese translation only) |
| |
|
1: Informal
2: Polite |
| |
|
|
| |
Int ShowKatakanaSource: (For Japanese to Chinese and Chinese to Japanese translation only) |
| |
|
1: Show source word of Katakana word
0: Don't show |
| |
|
|
| |
Int ReplacePhrase: (For traditional Chinese/simplified Chinese translation only) |
| |
|
1: Make phrase replacement during translation.
0: Don't make phrase replacement, just make code conversion. |
| |
|
|
| |
Int ReferenceSave: |
| |
|
nonzero: Produce translation along with its source text.
0: Produce translation only. |
| |
|
|
| |
String SourceText: Content of a HTML file. The maximum character number of the text is 65536. If this parameter is given as empty string, web service will get the webpage content for translation automatically with URLAddress parameter |
| |
|
|
| |
String URLAddress: URL address of the HTML file. |
| |
|
|
| |
Int EncodingCodePage: Specifiy encoding code page of the source webpage (for example, 20932 for Japanese EUC webpage) or give 0 to accept default code page. This parameter will be ignored if SouceText is not empty. |
|
| |
Return: a string with form as below |
| |
<ReturnCode>Return code</ReturnCode> |
| |
<PointUsed>Point used</PointUsed> |
| |
<PointLeft>Point left</PointLeft> |
| |
<Translation><![CDATA[Translation]]></Translation> |
|
| |
| In which, |
| |
Return code: 0, translation succeed |
| |
|
else, translation fail |
| |
Point used: points used during this translation. Each word costs 0.2 point. |
| |
Point left: points left after this translation |
| |
Translation: the translation output |
|
|
|
| |
| Sample Code (DOTNET Visual Basic) |
| * Look up dictionary for a word |
| |
| Public Class Form1 |
| |
Inherits System.Windows.Forms.Form |
|
| |
| #Region " Windows Form Designer generated code " |
| |
Public Sub New() |
| |
| |
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
Language.SelectedIndex = 0
ProfDictionary.SelectedIndex = 0 |
|
| |
|
| |
End Sub |
| |
|
| |
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) |
| |
| |
If disposing Then |
| |
| |
If Not (components Is Nothing) Then |
| |
|
| |
End If |
|
| |
End If |
| |
MyBase.Dispose(disposing) |
|
| |
End Sub |
| |
|
| |
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer |
| |
|
| |
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents tMemberID As System.Windows.Forms.TextBox
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents tPassword As System.Windows.Forms.TextBox
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents Language As System.Windows.Forms.ComboBox
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents ProfDictionary As System.Windows.Forms.ComboBox
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents tWord As System.Windows.Forms.TextBox
Friend WithEvents Label6 As System.Windows.Forms.Label
Friend WithEvents tWord2 As System.Windows.Forms.TextBox
Friend WithEvents Label7 As System.Windows.Forms.Label
Friend WithEvents tReturnString As System.Windows.Forms.TextBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() |
| |
| |
Me.Label1 = New System.Windows.Forms.Label
Me.tMemberID = New System.Windows.Forms.TextBox
Me.Label2 = New System.Windows.Forms.Label
Me.tPassword = New System.Windows.Forms.TextBox
Me.Label3 = New System.Windows.Forms.Label
Me.Language = New System.Windows.Forms.ComboBox
Me.Label4 = New System.Windows.Forms.Label
Me.Button1 = New System.Windows.Forms.Button
Me.ProfDictionary = New System.Windows.Forms.ComboBox
Me.Label5 = New System.Windows.Forms.Label
Me.tWord = New System.Windows.Forms.TextBox
Me.Label6 = New System.Windows.Forms.Label
Me.tWord2 = New System.Windows.Forms.TextBox
Me.Label7 = New System.Windows.Forms.Label
Me.tReturnString = New System.Windows.Forms.TextBox
Me.SuspendLayout()
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(8, 16)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(72, 16)
Me.Label1.TabIndex = 0
Me.Label1.Text = "Member ID:"
'
'tMemberID
'
Me.tMemberID.Location = New System.Drawing.Point(88, 8)
Me.tMemberID.Name = "tMemberID"
Me.tMemberID.Size = New System.Drawing.Size(168, 22)
Me.tMemberID.TabIndex = 1
Me.tMemberID.Text = ""
'
'Label2
'
Me.Label2.Location = New System.Drawing.Point(8, 40)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(72, 16)
Me.Label2.TabIndex = 2
Me.Label2.Text = "Password:"
'
'tPassword
'
Me.tPassword.Location = New System.Drawing.Point(88, 32)
Me.tPassword.Name = "tPassword"
Me.tPassword.Size = New System.Drawing.Size(168, 22)
Me.tPassword.TabIndex = 3
Me.tPassword.Text = ""
'
'Label3
'
Me.Label3.Location = New System.Drawing.Point(8, 64)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(64, 16)
Me.Label3.TabIndex = 4
Me.Label3.Text = "Language:"
'
'Language
'
Me.Language.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.Language.Items.AddRange(New Object() {"English to Traditional Chinese (BIG5)", "English to Simplified Chinese (GB)", "Traditional Chinese (BIG5) to English", "Simplified Chinese (GB) to English", "Japanese to Traditional Chinese (BIG5)", "Japanese to Simplified Chinese (GB)", "Traditional Chinese (BIG5) to Japanese", "Simplified Chinese (GB) to Japanese", "Traditional Chinese (BIG5) to Simplified Chinese (GB)", "Simplified Chinese (GB) to Traditional Chinese (BIG5)"})
Me.Language.Location = New System.Drawing.Point(88, 56)
Me.Language.MaxDropDownItems = 16
Me.Language.Name = "Language"
Me.Language.Size = New System.Drawing.Size(312, 20)
Me.Language.TabIndex = 5
'
'Label4
'
Me.Label4.Location = New System.Drawing.Point(8, 80)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(120, 16)
Me.Label4.TabIndex = 6
Me.Label4.Text = "Professional Dictionary:"
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(408, 160)
Me.Button1.Name = "Button1"
Me.Button1.TabIndex = 7
Me.Button1.Text = "Go"
'
'ProfDictionary
'
Me.ProfDictionary.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.ProfDictionary.Items.AddRange(New Object() {"0", "Information and Electronics", "Medical"})
Me.ProfDictionary.Location = New System.Drawing.Point(136, 80)
Me.ProfDictionary.Name = "ProfDictionary"
Me.ProfDictionary.Size = New System.Drawing.Size(264, 20)
Me.ProfDictionary.TabIndex = 8
'
'Label5
'
Me.Label5.Location = New System.Drawing.Point(8, 104)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(168, 16)
Me.Label5.TabIndex = 9
Me.Label5.Text = "Word: (Kanzi for Japanese word)"
'
'tWord
'
Me.tWord.Location = New System.Drawing.Point(56, 120)
Me.tWord.Name = "tWord"
Me.tWord.Size = New System.Drawing.Size(344, 22)
Me.tWord.TabIndex = 10
Me.tWord.Text = ""
'
'Label6
'
Me.Label6.Location = New System.Drawing.Point(8, 144)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(128, 16)
Me.Label6.TabIndex = 11
Me.Label6.Text = "Hiragana or Katakana:"
'
'tWord2
'
Me.tWord2.Location = New System.Drawing.Point(56, 160)
Me.tWord2.Name = "tWord2"
Me.tWord2.Size = New System.Drawing.Size(344, 22)
Me.tWord2.TabIndex = 12
Me.tWord2.Text = ""
'
'Label7
'
Me.Label7.Location = New System.Drawing.Point(8, 192)
Me.Label7.Name = "Label7"
Me.Label7.Size = New System.Drawing.Size(88, 16)
Me.Label7.TabIndex = 13
Me.Label7.Text = "Return string:"
'
'tReturnString
'
Me.tReturnString.Location = New System.Drawing.Point(8, 208)
Me.tReturnString.Multiline = True
Me.tReturnString.Name = "tReturnString"
Me.tReturnString.Size = New System.Drawing.Size(472, 168)
Me.tReturnString.TabIndex = 14
Me.tReturnString.Text = ""
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 15)
Me.ClientSize = New System.Drawing.Size(488, 382)
Me.Controls.Add(Me.tReturnString)
Me.Controls.Add(Me.Label7)
Me.Controls.Add(Me.tWord2)
Me.Controls.Add(Me.Label6)
Me.Controls.Add(Me.tWord)
Me.Controls.Add(Me.Label5)
Me.Controls.Add(Me.ProfDictionary)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.Label4)
Me.Controls.Add(Me.Language)
Me.Controls.Add(Me.Label3)
Me.Controls.Add(Me.tPassword)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.tMemberID)
Me.Controls.Add(Me.Label1)
Me.Name = "Form1"
Me.Text = "Form1"
Me.ResumeLayout(False) |
|
| |
|
| |
End Sub |
|
| |
| #End Region |
| |
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click |
| |
|
| |
| |
Dim obj As tw.com.mytrans.www.Service1
Dim sTemp As String
tReturnString.Clear()
tReturnString.Update()
obj = New tw.com.mytrans.www.Service1
sTemp = obj.LookupDictionary(tMemberID.Text, tPassword.Text, Language.SelectedIndex + 1, ProfDictionary.SelectedItem, tWord.Text, tWord2.Text)
tReturnString.Text = sTemp
obj = Nothing |
|
| |
|
| |
End Sub |
|
| End Class |
|
|
| |
| * Translate paragraphs of text |
| |
| Public Class Form1 |
| |
Inherits System.Windows.Forms.Form |
|
| |
| #Region " Windows Form Designer generated code " |
| |
Public Sub New() |
| |
| |
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
Language.SelectedIndex = 0
ProfDictionary1.SelectedIndex = 0
ProfDictionary2.SelectedIndex = 0
ProfDictionary3.SelectedIndex = 0
AlternateNumber.SelectedIndex = 0
Formality.SelectedIndex = 1
ShowKatakanaSource.SelectedIndex = 0
TranslationMode.SelectedIndex = 0
ReplacePhrase.SelectedIndex = 1 |
|
| |
|
| |
End Sub |
| |
|
| |
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) |
| |
| |
If disposing Then |
| |
| |
If Not (components Is Nothing) Then |
| |
|
| |
End If |
|
| |
End If |
| |
MyBase.Dispose(disposing) |
|
| |
End Sub |
| |
|
| |
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer |
| |
|
| |
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents ProfDictionary1 As System.Windows.Forms.ComboBox
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents Language As System.Windows.Forms.ComboBox
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents tPassword As System.Windows.Forms.TextBox
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents tMemberID As System.Windows.Forms.TextBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents ProfDictionary2 As System.Windows.Forms.ComboBox
Friend WithEvents Label6 As System.Windows.Forms.Label
Friend WithEvents ProfDictionary3 As System.Windows.Forms.ComboBox
Friend WithEvents Label7 As System.Windows.Forms.Label
Friend WithEvents tSource As System.Windows.Forms.TextBox
Friend WithEvents Label8 As System.Windows.Forms.Label
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents Label9 As System.Windows.Forms.Label
Friend WithEvents AlternateNumber As System.Windows.Forms.ComboBox
Friend WithEvents Label10 As System.Windows.Forms.Label
Friend WithEvents TranslationMode As System.Windows.Forms.ComboBox
Friend WithEvents Label11 As System.Windows.Forms.Label
Friend WithEvents Formality As System.Windows.Forms.ComboBox
Friend WithEvents Label12 As System.Windows.Forms.Label
Friend WithEvents ShowKatakanaSource As System.Windows.Forms.ComboBox
Friend WithEvents Label13 As System.Windows.Forms.Label
Friend WithEvents ReplacePhrase As System.Windows.Forms.ComboBox
Friend WithEvents tReturnString As System.Windows.Forms.TextBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() |
| |
| |
Me.ProfDictionary1 = New System.Windows.Forms.ComboBox
Me.Label4 = New System.Windows.Forms.Label
Me.Language = New System.Windows.Forms.ComboBox
Me.Label3 = New System.Windows.Forms.Label
Me.tPassword = New System.Windows.Forms.TextBox
Me.Label2 = New System.Windows.Forms.Label
Me.tMemberID = New System.Windows.Forms.TextBox
Me.Label1 = New System.Windows.Forms.Label
Me.Label5 = New System.Windows.Forms.Label
Me.ProfDictionary2 = New System.Windows.Forms.ComboBox
Me.Label6 = New System.Windows.Forms.Label
Me.ProfDictionary3 = New System.Windows.Forms.ComboBox
Me.Label7 = New System.Windows.Forms.Label
Me.tSource = New System.Windows.Forms.TextBox
Me.Label8 = New System.Windows.Forms.Label
Me.tReturnString = New System.Windows.Forms.TextBox
Me.Button1 = New System.Windows.Forms.Button
Me.Label9 = New System.Windows.Forms.Label
Me.AlternateNumber = New System.Windows.Forms.ComboBox
Me.Label10 = New System.Windows.Forms.Label
Me.TranslationMode = New System.Windows.Forms.ComboBox
Me.Label11 = New System.Windows.Forms.Label
Me.Formality = New System.Windows.Forms.ComboBox
Me.Label12 = New System.Windows.Forms.Label
Me.ShowKatakanaSource = New System.Windows.Forms.ComboBox
Me.Label13 = New System.Windows.Forms.Label
Me.ReplacePhrase = New System.Windows.Forms.ComboBox
Me.SuspendLayout()
'
'ProfDictionary1
'
Me.ProfDictionary1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.ProfDictionary1.Items.AddRange(New Object() {"0", "Information and Electronics", "Mechanic Engineering", "Medical"})
Me.ProfDictionary1.Location = New System.Drawing.Point(152, 80)
Me.ProfDictionary1.Name = "ProfDictionary1"
Me.ProfDictionary1.Size = New System.Drawing.Size(256, 20)
Me.ProfDictionary1.TabIndex = 17
'
'Label4
'
Me.Label4.Location = New System.Drawing.Point(16, 80)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(128, 16)
Me.Label4.TabIndex = 16
Me.Label4.Text = "Professional Dictionary 1:"
'
'Language
'
Me.Language.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.Language.Items.AddRange(New Object() {"English to Traditional Chinese (BIG5)", "English to Simplified Chinese (GB)", "Traditional Chinese (BIG5) to English", "Simplified Chinese (GB) to English", "Japanese to Traditional Chinese (BIG5)", "Japanese to Simplified Chinese (GB)", "Traditional Chinese (BIG5) to Japanese", "Simplified Chinese (GB) to Japanese", "Traditional Chinese (BIG5) to Simplified Chinese (GB)", "Simplified Chinese (GB) to Traditional Chinese (BIG5)"})
Me.Language.Location = New System.Drawing.Point(96, 56)
Me.Language.MaxDropDownItems = 16
Me.Language.Name = "Language"
Me.Language.Size = New System.Drawing.Size(312, 20)
Me.Language.TabIndex = 15
'
'Label3
'
Me.Label3.Location = New System.Drawing.Point(16, 64)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(64, 16)
Me.Label3.TabIndex = 14
Me.Label3.Text = "Language:"
'
'tPassword
'
Me.tPassword.Location = New System.Drawing.Point(96, 32)
Me.tPassword.Name = "tPassword"
Me.tPassword.Size = New System.Drawing.Size(168, 22)
Me.tPassword.TabIndex = 13
Me.tPassword.Text = ""
'
'Label2
'
Me.Label2.Location = New System.Drawing.Point(16, 40)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(72, 16)
Me.Label2.TabIndex = 12
Me.Label2.Text = "Password:"
'
'tMemberID
'
Me.tMemberID.Location = New System.Drawing.Point(96, 8)
Me.tMemberID.Name = "tMemberID"
Me.tMemberID.Size = New System.Drawing.Size(168, 22)
Me.tMemberID.TabIndex = 11
Me.tMemberID.Text = ""
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(16, 16)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(72, 16)
Me.Label1.TabIndex = 10
Me.Label1.Text = "Member ID:"
'
'Label5
'
Me.Label5.Location = New System.Drawing.Point(16, 112)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(128, 16)
Me.Label5.TabIndex = 18
Me.Label5.Text = "Professional Dictionary 2:"
'
'ProfDictionary2
'
Me.ProfDictionary2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.ProfDictionary2.Items.AddRange(New Object() {"0", "Information and Electronics", "Mechanic Engineering", "Medical"})
Me.ProfDictionary2.Location = New System.Drawing.Point(152, 104)
Me.ProfDictionary2.Name = "ProfDictionary2"
Me.ProfDictionary2.Size = New System.Drawing.Size(256, 20)
Me.ProfDictionary2.TabIndex = 19
'
'Label6
'
Me.Label6.Location = New System.Drawing.Point(16, 136)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(128, 16)
Me.Label6.TabIndex = 20
Me.Label6.Text = "Professional Dictionary 3:"
'
'ProfDictionary3
'
Me.ProfDictionary3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.ProfDictionary3.Items.AddRange(New Object() {"0", "Information and Electronics", "Mechanic Engineering", "Medical"})
Me.ProfDictionary3.Location = New System.Drawing.Point(152, 128)
Me.ProfDictionary3.Name = "ProfDictionary3"
Me.ProfDictionary3.Size = New System.Drawing.Size(256, 20)
Me.ProfDictionary3.TabIndex = 21
'
'Label7
'
Me.Label7.Location = New System.Drawing.Point(16, 160)
Me.Label7.Name = "Label7"
Me.Label7.Size = New System.Drawing.Size(100, 16)
Me.Label7.TabIndex = 22
Me.Label7.Text = "Text to translate:"
'
'tSource
'
Me.tSource.Location = New System.Drawing.Point(16, 176)
Me.tSource.Multiline = True
Me.tSource.Name = "tSource"
Me.tSource.Size = New System.Drawing.Size(656, 88)
Me.tSource.TabIndex = 23
Me.tSource.Text = ""
'
'Label8
'
Me.Label8.Location = New System.Drawing.Point(16, 272)
Me.Label8.Name = "Label8"
Me.Label8.Size = New System.Drawing.Size(100, 16)
Me.Label8.TabIndex = 24
Me.Label8.Text = "Return string:"
'
'tReturnString
'
Me.tReturnString.Location = New System.Drawing.Point(16, 288)
Me.tReturnString.Multiline = True
Me.tReturnString.Name = "tReturnString"
Me.tReturnString.Size = New System.Drawing.Size(656, 96)
Me.tReturnString.TabIndex = 25
Me.tReturnString.Text = ""
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(552, 136)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(120, 23)
Me.Button1.TabIndex = 26
Me.Button1.Text = "Translate"
'
'Label9
'
Me.Label9.Location = New System.Drawing.Point(424, 16)
Me.Label9.Name = "Label9"
Me.Label9.Size = New System.Drawing.Size(120, 16)
Me.Label9.TabIndex = 27
Me.Label9.Text = "Max alternate number:"
'
'AlternateNumber
'
Me.AlternateNumber.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.AlternateNumber.Items.AddRange(New Object() {"0", "1", "2", "3", "4"})
Me.AlternateNumber.Location = New System.Drawing.Point(552, 8)
Me.AlternateNumber.Name = "AlternateNumber"
Me.AlternateNumber.Size = New System.Drawing.Size(121, 20)
Me.AlternateNumber.TabIndex = 28
'
'Label10
'
Me.Label10.Location = New System.Drawing.Point(424, 40)
Me.Label10.Name = "Label10"
Me.Label10.Size = New System.Drawing.Size(100, 16)
Me.Label10.TabIndex = 29
Me.Label10.Text = "Translation Mode:"
'
'TranslationMode
'
Me.TranslationMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.TranslationMode.Items.AddRange(New Object() {"Normal", "Pinyin", "Address", "Name"})
Me.TranslationMode.Location = New System.Drawing.Point(552, 32)
Me.TranslationMode.Name = "TranslationMode"
Me.TranslationMode.Size = New System.Drawing.Size(121, 20)
Me.TranslationMode.TabIndex = 30
'
'Label11
'
Me.Label11.Location = New System.Drawing.Point(424, 64)
Me.Label11.Name = "Label11"
Me.Label11.Size = New System.Drawing.Size(100, 16)
Me.Label11.TabIndex = 31
Me.Label11.Text = "Formality:"
'
'Formality
'
Me.Formality.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.Formality.Items.AddRange(New Object() {"Informal", "Polite"})
Me.Formality.Location = New System.Drawing.Point(552, 56)
Me.Formality.Name = "Formality"
Me.Formality.Size = New System.Drawing.Size(121, 20)
Me.Formality.TabIndex = 32
'
'Label12
'
Me.Label12.Location = New System.Drawing.Point(424, 88)
Me.Label12.Name = "Label12"
Me.Label12.Size = New System.Drawing.Size(120, 16)
Me.Label12.TabIndex = 33
Me.Label12.Text = "Show Katakana Source:"
'
'ShowKatakanaSource
'
Me.ShowKatakanaSource.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.ShowKatakanaSource.Items.AddRange(New Object() {"No", "Yes"})
Me.ShowKatakanaSource.Location = New System.Drawing.Point(552, 80)
Me.ShowKatakanaSource.Name = "ShowKatakanaSource"
Me.ShowKatakanaSource.Size = New System.Drawing.Size(121, 20)
Me.ShowKatakanaSource.TabIndex = 34
'
'Label13
'
Me.Label13.Location = New System.Drawing.Point(424, 112)
Me.Label13.Name = "Label13"
Me.Label13.Size = New System.Drawing.Size(120, 16)
Me.Label13.TabIndex = 35
Me.Label13.Text = "Replace Phrase:"
'
'ReplacePhrase
'
Me.ReplacePhrase.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.ReplacePhrase.Items.AddRange(New Object() {"No", "Yes"})
Me.ReplacePhrase.Location = New System.Drawing.Point(552, 104)
Me.ReplacePhrase.Name = "ReplacePhrase"
Me.ReplacePhrase.Size = New System.Drawing.Size(121, 20)
Me.ReplacePhrase.TabIndex = 36
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 15)
Me.ClientSize = New System.Drawing.Size(688, 398)
Me.Controls.Add(Me.ReplacePhrase)
Me.Controls.Add(Me.Label13)
Me.Controls.Add(Me.ShowKatakanaSource)
Me.Controls.Add(Me.Label12)
Me.Controls.Add(Me.Formality)
Me.Controls.Add(Me.Label11)
Me.Controls.Add(Me.TranslationMode)
Me.Controls.Add(Me.Label10)
Me.Controls.Add(Me.AlternateNumber)
Me.Controls.Add(Me.Label9)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.tReturnString)
Me.Controls.Add(Me.Label8)
Me.Controls.Add(Me.tSource)
Me.Controls.Add(Me.Label7)
Me.Controls.Add(Me.ProfDictionary3)
Me.Controls.Add(Me.Label6)
Me.Controls.Add(Me.ProfDictionary2)
Me.Controls.Add(Me.Label5)
Me.Controls.Add(Me.ProfDictionary1)
Me.Controls.Add(Me.Label4)
Me.Controls.Add(Me.Language)
Me.Controls.Add(Me.Label3)
Me.Controls.Add(Me.tPassword)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.tMemberID)
Me.Controls.Add(Me.Label1)
Me.Name = "Form1"
Me.Text = "Form1"
Me.ResumeLayout(False) |
|
| |
|
| |
End Sub |
|
| |
| #End Region |
| |
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click |
| |
|
| |
| |
Dim obj As tw.com.mytrans.www.Service1
Dim sTemp As String
Dim id, pwd, pd1, pd2, pd3 As String
Dim lang As Integer
tReturnString.Clear()
tReturnString.Update()
obj = New tw.com.mytrans.www.Service1
id = tMemberID.Text
pwd = tPassword.Text
lang = Language.SelectedIndex + 1
pd1 = ProfDictionary1.SelectedItem
pd2 = ProfDictionary2.SelectedItem
pd3 = ProfDictionary3.SelectedItem
sTemp = obj.TranslateText(id, pwd, lang, pd1, pd2, pd3, AlternateNumber.SelectedIndex, TranslationMode.SelectedIndex + 1, Formality.SelectedIndex + 1, ShowKatakanaSource.SelectedIndex, ReplacePhrase.SelectedIndex, tSource.Text)
tReturnString.Text = sTemp
obj = Nothing |
|
| |
|
| |
End Sub |
|
| End Class |
|
|
| |
| * Translate a webpage |
| |
| Public Class Form1 |
| |
Inherits System.Windows.Forms.Form |
|
| |
| #Region " Windows Form Designer generated code " |
| |
| |
Public Sub New() |
| |
| |
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
Language.SelectedIndex = 0
ProfDictionary1.SelectedIndex = 0
ProfDictionary2.SelectedIndex = 0
ProfDictionary3.SelectedIndex = 0
AlternateNumber.SelectedIndex = 0
Formality.SelectedIndex = 1
ShowKatakanaSource.SelectedIndex = 0
TranslationMode.SelectedIndex = 0
ReplacePhrase.SelectedIndex = 1
ReferenceSave.SelectedIndex = 0 |
|
| |
|
| |
End Sub |
| |
|
| |
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) |
| |
| |
If disposing Then |
| |
| |
If Not (components Is Nothing) Then |
| |
|
| |
End If |
|
| |
End If |
| |
MyBase.Dispose(disposing) |
|
| |
End Sub |
| |
|
| |
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer |
| |
|
| |
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents ProfDictionary1 As System.Windows.Forms.ComboBox
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents Language As System.Windows.Forms.ComboBox
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents tPassword As System.Windows.Forms.TextBox
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents tMemberID As System.Windows.Forms.TextBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents ProfDictionary2 As System.Windows.Forms.ComboBox
Friend WithEvents Label6 As System.Windows.Forms.Label
Friend WithEvents ProfDictionary3 As System.Windows.Forms.ComboBox
Friend WithEvents Label7 As System.Windows.Forms.Label
Friend WithEvents Label8 As System.Windows.Forms.Label
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents Label9 As System.Windows.Forms.Label
Friend WithEvents AlternateNumber As System.Windows.Forms.ComboBox
Friend WithEvents Label10 As System.Windows.Forms.Label
Friend WithEvents TranslationMode As System.Windows.Forms.ComboBox
Friend WithEvents Label11 As System.Windows.Forms.Label
Friend WithEvents Formality As System.Windows.Forms.ComboBox
Friend WithEvents Label12 As System.Windows.Forms.Label
Friend WithEvents ShowKatakanaSource As System.Windows.Forms.ComboBox
Friend WithEvents Label13 As System.Windows.Forms.Label
Friend WithEvents ReplacePhrase As System.Windows.Forms.ComboBox
Friend WithEvents tReturnString As System.Windows.Forms.TextBox
Friend WithEvents tURL As System.Windows.Forms.TextBox
Friend WithEvents Label14 As System.Windows.Forms.Label
Friend WithEvents tCodePage As System.Windows.Forms.TextBox
Friend WithEvents Label15 As System.Windows.Forms.Label
Friend WithEvents ReferenceSave As System.Windows.Forms.ComboBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() |
| |
| |
Me.ProfDictionary1 = New System.Windows.Forms.ComboBox
Me.Label4 = New System.Windows.Forms.Label
Me.Language = New System.Windows.Forms.ComboBox
Me.Label3 = New System.Windows.Forms.Label
Me.tPassword = New System.Windows.Forms.TextBox
Me.Label2 = New System.Windows.Forms.Label
Me.tMemberID = New System.Windows.Forms.TextBox
Me.Label1 = New System.Windows.Forms.Label
Me.Label5 = New System.Windows.Forms.Label
Me.ProfDictionary2 = New System.Windows.Forms.ComboBox
Me.Label6 = New System.Windows.Forms.Label
Me.ProfDictionary3 = New System.Windows.Forms.ComboBox
Me.Label7 = New System.Windows.Forms.Label
Me.tURL = New System.Windows.Forms.TextBox
Me.Label8 = New System.Windows.Forms.Label
Me.tReturnString = New System.Windows.Forms.TextBox
Me.Button1 = New System.Windows.Forms.Button
Me.Label9 = New System.Windows.Forms.Label
Me.AlternateNumber = New System.Windows.Forms.ComboBox
Me.Label10 = New System.Windows.Forms.Label
Me.TranslationMode = New System.Windows.Forms.ComboBox
Me.Label11 = New System.Windows.Forms.Label
Me.Formality = New System.Windows.Forms.ComboBox
Me.Label12 = New System.Windows.Forms.Label
Me.ShowKatakanaSource = New System.Windows.Forms.ComboBox
Me.Label13 = New System.Windows.Forms.Label
Me.ReplacePhrase = New System.Windows.Forms.ComboBox
Me.Label14 = New System.Windows.Forms.Label
Me.tCodePage = New System.Windows.Forms.TextBox
Me.Label15 = New System.Windows.Forms.Label
Me.ReferenceSave = New System.Windows.Forms.ComboBox
Me.SuspendLayout()
'
'ProfDictionary1
'
Me.ProfDictionary1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.ProfDictionary1.Items.AddRange(New Object() {"0", "Information and Electronics", "Mechanic Engineering", "Medical"})
Me.ProfDictionary1.Location = New System.Drawing.Point(152, 80)
Me.ProfDictionary1.Name = "ProfDictionary1"
Me.ProfDictionary1.Size = New System.Drawing.Size(256, 20)
Me.ProfDictionary1.TabIndex = 17
'
'Label4
'
Me.Label4.Location = New System.Drawing.Point(16, 80)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(128, 16)
Me.Label4.TabIndex = 16
Me.Label4.Text = "Professional Dictionary 1:"
'
'Language
'
Me.Language.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.Language.Items.AddRange(New Object() {"English to Traditional Chinese (BIG5)", "English to Simplified Chinese (GB)", "Traditional Chinese (BIG5) to English", "Simplified Chinese (GB) to English", "Japanese to Traditional Chinese (BIG5)", "Japanese to Simplified Chinese (GB)", "Traditional Chinese (BIG5) to Japanese", "Simplified Chinese (GB) to Japanese", "Traditional Chinese (BIG5) to Simplified Chinese (GB)", "Simplified Chinese (GB) to Traditional Chinese (BIG5)"})
Me.Language.Location = New System.Drawing.Point(96, 56)
Me.Language.MaxDropDownItems = 16
Me.Language.Name = "Language"
Me.Language.Size = New System.Drawing.Size(312, 20)
Me.Language.TabIndex = 15
'
'Label3
'
Me.Label3.Location = New System.Drawing.Point(16, 64)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(64, 16)
Me.Label3.TabIndex = 14
Me.Label3.Text = "Language:"
'
'tPassword
'
Me.tPassword.Location = New System.Drawing.Point(96, 32)
Me.tPassword.Name = "tPassword"
Me.tPassword.Size = New System.Drawing.Size(168, 22)
Me.tPassword.TabIndex = 13
Me.tPassword.Text = ""
'
'Label2
'
Me.Label2.Location = New System.Drawing.Point(16, 40)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(72, 16)
Me.Label2.TabIndex = 12
Me.Label2.Text = "Password:"
'
'tMemberID
'
Me.tMemberID.Location = New System.Drawing.Point(96, 8)
Me.tMemberID.Name = "tMemberID"
Me.tMemberID.Size = New System.Drawing.Size(168, 22)
Me.tMemberID.TabIndex = 11
Me.tMemberID.Text = ""
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(16, 16)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(72, 16)
Me.Label1.TabIndex = 10
Me.Label1.Text = "Member ID:"
'
'Label5
'
Me.Label5.Location = New System.Drawing.Point(16, 112)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(128, 16)
Me.Label5.TabIndex = 18
Me.Label5.Text = "Professional Dictionary 2:"
'
'ProfDictionary2
'
Me.ProfDictionary2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.ProfDictionary2.Items.AddRange(New Object() {"0", "Information and Electronics", "Mechanic Engineering", "Medical"})
Me.ProfDictionary2.Location = New System.Drawing.Point(152, 104)
Me.ProfDictionary2.Name = "ProfDictionary2"
Me.ProfDictionary2.Size = New System.Drawing.Size(256, 20)
Me.ProfDictionary2.TabIndex = 19
'
'Label6
'
Me.Label6.Location = New System.Drawing.Point(16, 136)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(128, 16)
Me.Label6.TabIndex = 20
Me.Label6.Text = "Professional Dictionary 3:"
'
'ProfDictionary3
'
Me.ProfDictionary3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.ProfDictionary3.Items.AddRange(New Object() {"0", "Information and Electronics", "Mechanic Engineering", "Medical"})
Me.ProfDictionary3.Location = New System.Drawing.Point(152, 128)
Me.ProfDictionary3.Name = "ProfDictionary3"
Me.ProfDictionary3.Size = New System.Drawing.Size(256, 20)
Me.ProfDictionary3.TabIndex = 21
'
'Label7
'
Me.Label7.Location = New System.Drawing.Point(16, 160)
Me.Label7.Name = "Label7"
Me.Label7.Size = New System.Drawing.Size(100, 16)
Me.Label7.TabIndex = 22
Me.Label7.Text = "URL:"
'
'tURL
'
Me.tURL.Location = New System.Drawing.Point(16, 176)
Me.tURL.Name = "tURL"
Me.tURL.Size = New System.Drawing.Size(656, 22)
Me.tURL.TabIndex = 23
Me.tURL.Text = ""
'
'Label8
'
Me.Label8.Location = New System.Drawing.Point(16, 232)
Me.Label8.Name = "Label8"
Me.Label8.Size = New System.Drawing.Size(100, 16)
Me.Label8.TabIndex = 24
Me.Label8.Text = "Return string:"
'
'tReturnString
'
Me.tReturnString.Location = New System.Drawing.Point(16, 248)
Me.tReturnString.Multiline = True
Me.tReturnString.Name = "tReturnString"
Me.tReturnString.Size = New System.Drawing.Size(656, 144)
Me.tReturnString.TabIndex = 25
Me.tReturnString.Text = ""
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(552, 208)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(120, 23)
Me.Button1.TabIndex = 26
Me.Button1.Text = "Translate"
'
'Label9
'
Me.Label9.Location = New System.Drawing.Point(424, 16)
Me.Label9.Name = "Label9"
Me.Label9.Size = New System.Drawing.Size(120, 16)
Me.Label9.TabIndex = 27
Me.Label9.Text = "Max alternate number:"
'
'AlternateNumber
'
Me.AlternateNumber.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.AlternateNumber.Items.AddRange(New Object() {"0", "1", "2", "3", "4"})
Me.AlternateNumber.Location = New System.Drawing.Point(552, 8)
Me.AlternateNumber.Name = "AlternateNumber"
Me.AlternateNumber.Size = New System.Drawing.Size(121, 20)
Me.AlternateNumber.TabIndex = 28
'
'Label10
'
Me.Label10.Location = New System.Drawing.Point(424, 40)
Me.Label10.Name = "Label10"
Me.Label10.Size = New System.Drawing.Size(100, 16)
Me.Label10.TabIndex = 29
Me.Label10.Text = "Translation Mode:"
'
'TranslationMode
'
Me.TranslationMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.TranslationMode.Items.AddRange(New Object() {"Normal", "Pinyin", "Address", "Name"})
Me.TranslationMode.Location = New System.Drawing.Point(552, 32)
Me.TranslationMode.Name = "TranslationMode"
Me.TranslationMode.Size = New System.Drawing.Size(121, 20)
Me.TranslationMode.TabIndex = 30
'
'Label11
'
Me.Label11.Location = New System.Drawing.Point(424, 64)
Me.Label11.Name = "Label11"
Me.Label11.Size = New System.Drawing.Size(100, 16)
Me.Label11.TabIndex = 31
Me.Label11.Text = "Formality:"
'
'Formality
'
Me.Formality.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.Formality.Items.AddRange(New Object() {"Informal", "Polite"})
Me.Formality.Location = New System.Drawing.Point(552, 56)
Me.Formality.Name = "Formality"
Me.Formality.Size = New System.Drawing.Size(121, 20)
Me.Formality.TabIndex = 32
'
'Label12
'
Me.Label12.Location = New System.Drawing.Point(424, 88)
Me.Label12.Name = "Label12"
Me.Label12.Size = New System.Drawing.Size(120, 16)
Me.Label12.TabIndex = 33
Me.Label12.Text = "Show Katakana Source:"
'
'ShowKatakanaSource
'
Me.ShowKatakanaSource.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.ShowKatakanaSource.Items.AddRange(New Object() {"No", "Yes"})
Me.ShowKatakanaSource.Location = New System.Drawing.Point(552, 80)
Me.ShowKatakanaSource.Name = "ShowKatakanaSource"
Me.ShowKatakanaSource.Size = New System.Drawing.Size(121, 20)
Me.ShowKatakanaSource.TabIndex = 34
'
'Label13
'
Me.Label13.Location = New System.Drawing.Point(424, 112)
Me.Label13.Name = "Label13"
Me.Label13.Size = New System.Drawing.Size(120, 16)
Me.Label13.TabIndex = 35
Me.Label13.Text = "Replace Phrase:"
'
'ReplacePhrase
'
Me.ReplacePhrase.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.ReplacePhrase.Items.AddRange(New Object() {"No", "Yes"})
Me.ReplacePhrase.Location = New System.Drawing.Point(552, 104)
Me.ReplacePhrase.Name = "ReplacePhrase"
Me.ReplacePhrase.Size = New System.Drawing.Size(121, 20)
Me.ReplacePhrase.TabIndex = 36
'
'Label14
'
Me.Label14.Location = New System.Drawing.Point(16, 208)
Me.Label14.Name = "Label14"
Me.Label14.Size = New System.Drawing.Size(112, 16)
Me.Label14.TabIndex = 37
Me.Label14.Text = "Encoding code page:"
'
'tCodePage
'
Me.tCodePage.Location = New System.Drawing.Point(128, 200)
Me.tCodePage.Name = "tCodePage"
Me.tCodePage.TabIndex = 38
Me.tCodePage.Text = "0"
'
'Label15
'
Me.Label15.Location = New System.Drawing.Point(424, 136)
Me.Label15.Name = "Label15"
Me.Label15.Size = New System.Drawing.Size(100, 16)
Me.Label15.TabIndex = 39
Me.Label15.Text = "Reference Save:"
'
'ReferenceSave
'
Me.ReferenceSave.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.ReferenceSave.Items.AddRange(New Object() {"No", "Yes"})
Me.ReferenceSave.Location = New System.Drawing.Point(552, 128)
Me.ReferenceSave.Name = "ReferenceSave"
Me.ReferenceSave.Size = New System.Drawing.Size(121, 20)
Me.ReferenceSave.TabIndex = 40
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 15)
Me.ClientSize = New System.Drawing.Size(688, 398)
Me.Controls.Add(Me.ReferenceSave)
Me.Controls.Add(Me.Label15)
Me.Controls.Add(Me.tCodePage)
Me.Controls.Add(Me.Label14)
Me.Controls.Add(Me.ReplacePhrase)
Me.Controls.Add(Me.Label13)
Me.Controls.Add(Me.ShowKatakanaSource)
Me.Controls.Add(Me.Label12)
Me.Controls.Add(Me.Formality)
Me.Controls.Add(Me.Label11)
Me.Controls.Add(Me.TranslationMode)
Me.Controls.Add(Me.Label10)
Me.Controls.Add(Me.AlternateNumber)
Me.Controls.Add(Me.Label9)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.tReturnString)
Me.Controls.Add(Me.Label8)
Me.Controls.Add(Me.tURL)
Me.Controls.Add(Me.Label7)
Me.Controls.Add(Me.ProfDictionary3)
Me.Controls.Add(Me.Label6)
Me.Controls.Add(Me.ProfDictionary2)
Me.Controls.Add(Me.Label5)
Me.Controls.Add(Me.ProfDictionary1)
Me.Controls.Add(Me.Label4)
Me.Controls.Add(Me.Language)
Me.Controls.Add(Me.Label3)
Me.Controls.Add(Me.tPassword)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.tMemberID)
Me.Controls.Add(Me.Label1)
Me.Name = "Form1"
Me.Text = "Form1"
Me.ResumeLayout(False) |
|
| |
|
| |
End Sub |
|
| |
| #End Region |
| |
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click |
| |
| |
|
| |
Dim obj As tw.com.mytrans.www.Service1
Dim sTemp As String
Dim id, pwd, pd1, pd2, pd3, sPageContent As String
Dim lang As Integer
tReturnString.Clear()
tReturnString.Update()
obj = New tw.com.mytrans.www.Service1
id = tMemberID.Text
pwd = tPassword.Text
lang = Language.SelectedIndex + 1
pd1 = ProfDictionary1.SelectedItem
pd2 = ProfDictionary2.SelectedItem
pd3 = ProfDictionary3.SelectedItem
sPageContent = ""
sTemp = obj.TranslateHTMLText(id, pwd, lang, pd1, pd2, pd3, AlternateNumber.SelectedIndex, TranslationMode.SelectedIndex + 1, Formality.SelectedIndex + 1, ShowKatakanaSource.SelectedIndex, ReplacePhrase.SelectedIndex, ReferenceSave.SelectedIndex, sPageContent, tURL.Text, Int32.Parse(tCodePage.Text))
tReturnString.Text = sTemp
obj = Nothing |
|
| |
|
| |
End Sub |
|
| End Class |
|
|
| |
|
|
|
|
|