Advertisement
Guest User

Untitled

a guest
Aug 12th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 4.75 KB | None | 0 0
  1. Imports System.Collections.Generic
  2. Imports System.ComponentModel
  3. Imports System.Data
  4. Imports System.Drawing
  5. Imports System.Linq
  6. Imports System.Text
  7. Imports System.Windows.Forms
  8.  
  9. Public Partial Class Form1
  10.     Inherits Form
  11.     Public Sub New()
  12.         InitializeComponent()
  13.     End Sub
  14.  
  15.     'Clear
  16.     Private Sub button2_Click(sender As Object, e As EventArgs)
  17.         If textBox1.Text <> "" OrElse textBox2.Text <> "" Then
  18.             textBox1.Clear()
  19.             textBox2.Clear()
  20.         End If
  21.     End Sub
  22.  
  23.     '
  24.     Private Sub button1_Click(sender As Object, e As EventArgs)
  25.         Dim str As String = textBox1.Text
  26.         Dim i As Integer
  27.         'テキストボックスに文字列を追加する前にバッファをクリア
  28.         If textBox2.Text <> "" Then
  29.             textBox2.Clear()
  30.         End If
  31.         For i = 0 To str.Length - 1
  32.             Select Case str.Substring(i, 1)
  33.                 Case "А"
  34.                     textBox2.Text += "a"
  35.                     Exit Select
  36.                 Case "Б"
  37.                     textBox2.Text += "b"
  38.                     Exit Select
  39.                 Case "В"
  40.                     textBox2.Text += "v"
  41.                     Exit Select
  42.                 Case "Г"
  43.                     textBox2.Text += "g"
  44.                     Exit Select
  45.                 Case "Д"
  46.                     textBox2.Text += "d"
  47.                     Exit Select
  48.                 Case "Е"
  49.                     textBox2.Text += "je"
  50.                     Exit Select
  51.                 Case "Ё"
  52.                     textBox2.Text += "jo"
  53.                     Exit Select
  54.                 Case "Ж"
  55.                     textBox2.Text += "ʐ"
  56.                     Exit Select
  57.                 Case "З"
  58.                     textBox2.Text += "z"
  59.                     Exit Select
  60.                 Case "И"
  61.                     textBox2.Text += "i"
  62.                     Exit Select
  63.                 Case "Й"
  64.                     textBox2.Text += "j"
  65.                     Exit Select
  66.                 Case "К"
  67.                     textBox2.Text += "k"
  68.                     Exit Select
  69.                 Case "Л"
  70.                     textBox2.Text += "l"
  71.                     Exit Select
  72.                 Case "М"
  73.                     textBox2.Text += "m"
  74.                     Exit Select
  75.                 Case "Н"
  76.                     textBox2.Text += "n"
  77.                     Exit Select
  78.                 Case "О"
  79.                     textBox2.Text += "o"
  80.                     Exit Select
  81.                 Case "П"
  82.                     textBox2.Text += "p"
  83.                     Exit Select
  84.                 Case "Р"
  85.                     textBox2.Text += "r"
  86.                     Exit Select
  87.                 Case "С"
  88.                     textBox2.Text += "s"
  89.                     Exit Select
  90.                 Case "Т"
  91.                     textBox2.Text += "t"
  92.                     Exit Select
  93.                 Case "У"
  94.                     textBox2.Text += "u"
  95.                     Exit Select
  96.                 Case "Ф"
  97.                     textBox2.Text += "f"
  98.                     Exit Select
  99.                 Case "Х"
  100.                     textBox2.Text += "x"
  101.                     Exit Select
  102.                 Case "Ц"
  103.                     textBox2.Text += "ʦ"
  104.                     Exit Select
  105.                 Case "Ш"
  106.                     textBox2.Text += "ʃ"
  107.                     Exit Select
  108.                 Case "Щ"
  109.                     textBox2.Text += "ɕɕ"
  110.                     Exit Select
  111.                 Case "Ъ"
  112.                     textBox2.Text += "-"
  113.                     Exit Select
  114.                 Case "Ы"
  115.                     textBox2.Text += "ɨ"
  116.                     Exit Select
  117.                 Case "Ь"
  118.                     textBox2.Text += "-"
  119.                     Exit Select
  120.                 Case "Э"
  121.                     textBox2.Text += "e"
  122.                     Exit Select
  123.                 Case "Ю"
  124.                     textBox2.Text += "ju"
  125.                     Exit Select
  126.                 Case "Я"
  127.                     textBox2.Text += "ja"
  128.                     Exit Select
  129.                 Case "а"
  130.                     textBox2.Text += "a"
  131.                     Exit Select
  132.                 Case "б"
  133.                     textBox2.Text += "b"
  134.                     Exit Select
  135.                 Case "в"
  136.                     textBox2.Text += "v"
  137.                     Exit Select
  138.                 Case "г"
  139.                     textBox2.Text += "g"
  140.                     Exit Select
  141.                 Case "д"
  142.                     textBox2.Text += "d"
  143.                     Exit Select
  144.                 Case "е"
  145.                     textBox2.Text += "je"
  146.                     Exit Select
  147.                 Case "ё"
  148.                     textBox2.Text += "jo"
  149.                     Exit Select
  150.                 Case "ж"
  151.                     textBox2.Text += "ʐ"
  152.                     Exit Select
  153.                 Case "з"
  154.                     textBox2.Text += "z"
  155.                     Exit Select
  156.                 Case "и"
  157.                     textBox2.Text += "i"
  158.                     Exit Select
  159.                 Case "й"
  160.                     textBox2.Text += "j"
  161.                     Exit Select
  162.                 Case "к"
  163.                     textBox2.Text += "k"
  164.                     Exit Select
  165.                 Case "л"
  166.                     textBox2.Text += "l"
  167.                     Exit Select
  168.                 Case "м"
  169.                     textBox2.Text += "m"
  170.                     Exit Select
  171.                 Case "н"
  172.                     textBox2.Text += "n"
  173.                     Exit Select
  174.                 Case "о"
  175.                     textBox2.Text += "o"
  176.                     Exit Select
  177.                 Case "п"
  178.                     textBox2.Text += "p"
  179.                     Exit Select
  180.                 Case "р"
  181.                     textBox2.Text += "r"
  182.                     Exit Select
  183.                 Case "с"
  184.                     textBox2.Text += "s"
  185.                     Exit Select
  186.                 Case "т"
  187.                     textBox2.Text += "t"
  188.                     Exit Select
  189.                 Case "у"
  190.                     textBox2.Text += "u"
  191.                     Exit Select
  192.                 Case "ф"
  193.                     textBox2.Text += "f"
  194.                     Exit Select
  195.                 Case "х"
  196.                     textBox2.Text += "x"
  197.                     Exit Select
  198.                 Case "ч"
  199.                     textBox2.Text += "ʧ"
  200.                     Exit Select
  201.                 Case "ц"
  202.                     textBox2.Text += "ʦ"
  203.                     Exit Select
  204.                 Case "ш"
  205.                     textBox2.Text += "ʃ"
  206.                     Exit Select
  207.                 Case "щ"
  208.                     textBox2.Text += "ɕɕ"
  209.                     Exit Select
  210.                 Case "ъ"
  211.                     textBox2.Text += "-"
  212.                     Exit Select
  213.                 Case "ы"
  214.                     textBox2.Text += "ɨ"
  215.                     Exit Select
  216.                 Case "ь"
  217.                     textBox2.Text += "-"
  218.                     Exit Select
  219.                 Case "э"
  220.                     textBox2.Text += "e"
  221.                     Exit Select
  222.                 Case "ю"
  223.                     textBox2.Text += "ju"
  224.                     Exit Select
  225.                 Case "я"
  226.                     textBox2.Text += "ja"
  227.                     Exit Select
  228.                 Case Else
  229.  
  230.                     textBox2.Text += str.Substring(i, 1)
  231.                     Exit Select
  232.             End Select
  233.         Next
  234.     End Sub
  235. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement