using jp.Properties; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace jp { public partial class Form2 : Form { public int a = 0; public int b = 107; public int inx = 0; public int correct = 0; public int error = 0; public int[] Alphabet = new int[107]; public string cor_answ1 = string.Empty; public string cor_answ2 = string.Empty; public string cor_answ3 = string.Empty; public AssemblyName asml = new AssemblyName(); public int t = 0; public int temp; public int rnd; public Form2() { InitializeComponent(); this.check.Enabled = false; this.textBox1.ReadOnly = true; this.Randoming(); this.label.Text = this.t.ToString(); this.asml.Name = "Катакана от vk.com/trimetral"; this.asml.Version = new Version("1.2.20.03"); } public void Randoming() { string empty = string.Empty; Random random = new Random(); for (int index1 = 0; index1 < this.Alphabet.Length; ++index1) { label_1: this.temp = random.Next(this.a, this.b); for (int index2 = 0; index2 < index1; ++index2) { if (this.temp == this.Alphabet[index2]) goto label_1; } this.Alphabet[index1] = this.temp; } } private void button1_Click(object sender, EventArgs e) { this.textBox1.Text = ""; this.pictureBox1.Height = 110; this.next.Enabled = false; this.check.Enabled = true; this.pictureBox2.Visible = false; this.answ.Visible = false; this.textBox1.ReadOnly = false; this.textBox1.Focus(); try { switch (this.Alphabet[this.inx]) { case 0: this.pictureBox1.Image = (Image)Resources.a; this.cor_answ1 = "a"; this.cor_answ2 = "а"; ++this.inx; break; case 1: this.pictureBox1.Image = (Image)Resources.i; this.cor_answ1 = "i"; this.cor_answ2 = "и"; ++this.inx; break; case 2: this.pictureBox1.Image = (Image)Resources.u; this.cor_answ1 = "u"; this.cor_answ2 = "у"; ++this.inx; break; case 3: this.pictureBox1.Image = (Image)Resources.e; this.cor_answ1 = nameof(e); this.cor_answ2 = "э"; ++this.inx; break; case 4: this.pictureBox1.Image = (Image)Resources.o; this.cor_answ1 = "o"; this.cor_answ2 = "о"; ++this.inx; break; case 5: this.pictureBox1.Image = (Image)Resources.ka; this.cor_answ1 = "ka"; this.cor_answ2 = "ка"; ++this.inx; break; case 6: this.pictureBox1.Image = (Image)Resources.ki; this.cor_answ1 = "ki"; this.cor_answ2 = "ки"; ++this.inx; break; case 7: this.pictureBox1.Image = (Image)Resources.ku; this.cor_answ1 = "ku"; this.cor_answ2 = "ку"; ++this.inx; break; case 8: this.pictureBox1.Image = (Image)Resources.ke; this.cor_answ1 = "ke"; this.cor_answ2 = "кэ"; ++this.inx; break; case 9: this.pictureBox1.Image = (Image)Resources.ko; this.cor_answ1 = "ko"; this.cor_answ2 = "ко"; ++this.inx; break; case 10: this.pictureBox1.Image = (Image)Resources.sa; this.cor_answ1 = "sa"; this.cor_answ2 = "са"; ++this.inx; break; case 11: this.pictureBox1.Image = (Image)Resources.shi; this.cor_answ1 = "shi"; this.cor_answ2 = "си"; this.cor_answ3 = "ши"; ++this.inx; break; case 12: this.pictureBox1.Image = (Image)Resources.su; this.cor_answ1 = "su"; this.cor_answ2 = "су"; ++this.inx; break; case 13: this.pictureBox1.Image = (Image)Resources.se; this.cor_answ1 = "se"; this.cor_answ2 = "сэ"; ++this.inx; break; case 14: this.pictureBox1.Image = (Image)Resources.so; this.cor_answ1 = "so"; this.cor_answ2 = "со"; ++this.inx; break; case 15: this.pictureBox1.Image = (Image)Resources.ta; this.cor_answ1 = "ta"; this.cor_answ2 = "та"; ++this.inx; break; case 16: this.pictureBox1.Image = (Image)Resources.chi; this.cor_answ1 = "chi"; this.cor_answ2 = "ти"; this.cor_answ3 = "чи"; ++this.inx; break; case 17: this.pictureBox1.Image = (Image)Resources.tsu; this.cor_answ1 = "tsu"; this.cor_answ2 = "цу"; this.cor_answ3 = "тсу"; ++this.inx; break; case 18: this.pictureBox1.Image = (Image)Resources.te; this.cor_answ1 = "te"; this.cor_answ2 = "тэ"; ++this.inx; break; case 19: this.pictureBox1.Image = (Image)Resources.to; this.cor_answ1 = "to"; this.cor_answ2 = "то"; ++this.inx; break; case 20: this.pictureBox1.Image = (Image)Resources.na; this.cor_answ1 = "na"; this.cor_answ2 = "на"; ++this.inx; break; case 21: this.pictureBox1.Image = (Image)Resources.ni; this.cor_answ1 = "ni"; this.cor_answ2 = "ни"; ++this.inx; break; case 22: this.pictureBox1.Image = (Image)Resources.nu; this.cor_answ1 = "nu"; this.cor_answ2 = "ну"; ++this.inx; break; case 23: this.pictureBox1.Image = (Image)Resources.ne; this.cor_answ1 = "ne"; this.cor_answ2 = "нэ"; ++this.inx; break; case 24: this.pictureBox1.Image = (Image)Resources.no; this.cor_answ1 = "no"; this.cor_answ2 = "но"; ++this.inx; break; case 25: this.pictureBox1.Image = (Image)Resources.ha; this.cor_answ1 = "ha"; this.cor_answ2 = "ха"; ++this.inx; break; case 26: this.pictureBox1.Image = (Image)Resources.hi; this.cor_answ1 = "hi"; this.cor_answ2 = "хи"; ++this.inx; break; case 27: this.pictureBox1.Image = (Image)Resources.fu; this.cor_answ1 = "fu"; this.cor_answ2 = "фу"; ++this.inx; break; case 28: this.pictureBox1.Image = (Image)Resources.he; this.cor_answ1 = "he"; this.cor_answ2 = "хэ"; ++this.inx; break; case 29: this.pictureBox1.Image = (Image)Resources.ho; this.cor_answ1 = "ho"; this.cor_answ2 = "хо"; ++this.inx; break; case 30: this.pictureBox1.Image = (Image)Resources.ya; this.cor_answ1 = "ya"; this.cor_answ2 = "я"; this.cor_answ3 = "йа"; ++this.inx; break; case 31: this.pictureBox1.Image = (Image)Resources.yu; this.cor_answ1 = "yu"; this.cor_answ2 = "ю"; this.cor_answ3 = "йу"; ++this.inx; break; case 32: this.pictureBox1.Image = (Image)Resources.yo; this.cor_answ1 = "yo"; this.cor_answ2 = "ё"; this.cor_answ3 = "йо"; ++this.inx; break; case 33: this.pictureBox1.Image = (Image)Resources.ma; this.cor_answ1 = "ma"; this.cor_answ2 = "ма"; ++this.inx; break; case 34: this.pictureBox1.Image = (Image)Resources.mi; this.cor_answ1 = "mi"; this.cor_answ2 = "ми"; ++this.inx; break; case 35: this.pictureBox1.Image = (Image)Resources.mu; this.cor_answ1 = "mu"; this.cor_answ2 = "му"; ++this.inx; break; case 36: this.pictureBox1.Image = (Image)Resources.me; this.cor_answ1 = "me"; this.cor_answ2 = "мэ"; ++this.inx; break; case 37: this.pictureBox1.Image = (Image)Resources.mo; this.cor_answ1 = "mo"; this.cor_answ2 = "мо"; ++this.inx; break; case 38: this.pictureBox1.Image = (Image)Resources.ra; this.cor_answ1 = "ra"; this.cor_answ2 = "ра"; ++this.inx; break; case 39: this.pictureBox1.Image = (Image)Resources.ri; this.cor_answ1 = "ri"; this.cor_answ2 = "ри"; ++this.inx; break; case 40: this.pictureBox1.Image = (Image)Resources.ru; this.cor_answ1 = "ru"; this.cor_answ2 = "ру"; ++this.inx; break; case 41: this.pictureBox1.Image = (Image)Resources.re; this.cor_answ1 = "re"; this.cor_answ2 = "рэ"; ++this.inx; break; case 42: this.pictureBox1.Image = (Image)Resources.ro; this.cor_answ1 = "ro"; this.cor_answ2 = "ро"; ++this.inx; break; case 43: this.pictureBox1.Image = (Image)Resources.wa; this.cor_answ1 = "wa"; this.cor_answ2 = "ва"; ++this.inx; break; case 44: this.pictureBox1.Image = (Image)Resources.wo; this.cor_answ1 = "wo"; this.cor_answ2 = "во"; ++this.inx; break; case 45: this.pictureBox1.Image = (Image)Resources.n; this.cor_answ1 = "n"; this.cor_answ2 = "н"; ++this.inx; break; case 46: this.pictureBox1.Image = (Image)Resources.ga; this.cor_answ1 = "ga"; this.cor_answ2 = "га"; ++this.inx; break; case 47: this.pictureBox1.Image = (Image)Resources.gi; this.cor_answ1 = "gi"; this.cor_answ2 = "ги"; ++this.inx; break; case 48: this.pictureBox1.Image = (Image)Resources.gu; this.cor_answ1 = "gu"; this.cor_answ2 = "гу"; ++this.inx; break; case 49: this.pictureBox1.Image = (Image)Resources.ge; this.cor_answ1 = "ge"; this.cor_answ2 = "гэ"; ++this.inx; break; case 50: this.pictureBox1.Image = (Image)Resources.go; this.cor_answ1 = "go"; this.cor_answ2 = "го"; ++this.inx; break; case 51: this.pictureBox1.Image = (Image)Resources.za; this.cor_answ1 = "za"; this.cor_answ2 = "дза"; ++this.inx; break; case 52: this.pictureBox1.Image = (Image)Resources.ji_s_; this.cor_answ1 = "zi"; this.cor_answ2 = "дзи"; ++this.inx; break; case 53: this.pictureBox1.Image = (Image)Resources.zu; this.cor_answ1 = "zu"; this.cor_answ2 = "дзу"; ++this.inx; break; case 54: this.pictureBox1.Image = (Image)Resources.ze; this.cor_answ1 = "ze"; this.cor_answ2 = "дзэ"; ++this.inx; break; case 55: this.pictureBox1.Image = (Image)Resources.zo; this.cor_answ1 = "zo"; this.cor_answ2 = "дзо"; ++this.inx; break; case 56: this.pictureBox1.Image = (Image)Resources.da; this.cor_answ1 = "da"; this.cor_answ2 = "да"; ++this.inx; break; case 57: this.pictureBox1.Image = (Image)Resources.ji; this.cor_answ1 = "ji"; this.cor_answ2 = "дзи"; ++this.inx; break; case 58: this.pictureBox1.Image = (Image)Resources.zu_t_; this.cor_answ1 = "zu"; this.cor_answ2 = "дзу"; ++this.inx; break; case 59: this.pictureBox1.Image = (Image)Resources.de; this.cor_answ1 = "de"; this.cor_answ2 = "дэ"; ++this.inx; break; case 60: this.pictureBox1.Image = (Image)Resources._do; this.cor_answ1 = "do"; this.cor_answ2 = "до"; ++this.inx; break; case 61: this.pictureBox1.Image = (Image)Resources.ba; this.cor_answ1 = "ba"; this.cor_answ2 = "ба"; ++this.inx; break; case 62: this.pictureBox1.Image = (Image)Resources.bi; this.cor_answ1 = "bi"; this.cor_answ2 = "би"; ++this.inx; break; case 63: this.pictureBox1.Image = (Image)Resources.bu; this.cor_answ1 = "bu"; this.cor_answ2 = "бу"; ++this.inx; break; case 64: this.pictureBox1.Image = (Image)Resources.be; this.cor_answ1 = "be"; this.cor_answ2 = "бэ"; ++this.inx; break; case 65: this.pictureBox1.Image = (Image)Resources.bo; this.cor_answ1 = "bo"; this.cor_answ2 = "бо"; ++this.inx; break; case 66: this.pictureBox1.Image = (Image)Resources.pa; this.cor_answ1 = "pa"; this.cor_answ2 = "па"; ++this.inx; break; case 67: this.pictureBox1.Image = (Image)Resources.pi; this.cor_answ1 = "pi"; this.cor_answ2 = "пи"; ++this.inx; break; case 68: this.pictureBox1.Image = (Image)Resources.pu; this.cor_answ1 = "pu"; this.cor_answ2 = "пу"; ++this.inx; break; case 69: this.pictureBox1.Image = (Image)Resources.pe; this.cor_answ1 = "pe"; this.cor_answ2 = "пэ"; ++this.inx; break; case 70: this.pictureBox1.Image = (Image)Resources.po; this.cor_answ1 = "po"; this.cor_answ2 = "по"; ++this.inx; break; case 71: this.pictureBox1.Image = (Image)Resources.cha; this.cor_answ1 = "cha"; this.cor_answ2 = "тя"; ++this.inx; break; case 72: this.pictureBox1.Image = (Image)Resources.chu; this.cor_answ1 = "chu"; this.cor_answ2 = "тю"; ++this.inx; break; case 73: this.pictureBox1.Image = (Image)Resources.cho; this.cor_answ1 = "cho"; this.cor_answ2 = "тё"; ++this.inx; break; case 74: this.pictureBox1.Image = (Image)Resources.kya; this.cor_answ1 = "kya"; this.cor_answ2 = "кя"; ++this.inx; break; case 75: this.pictureBox1.Image = (Image)Resources.kyu; this.cor_answ1 = "kyu"; this.cor_answ2 = "кю"; ++this.inx; break; case 76: this.pictureBox1.Image = (Image)Resources.kyo; this.cor_answ1 = "kyo"; this.cor_answ2 = "кё"; ++this.inx; break; case 77: this.pictureBox1.Image = (Image)Resources.hya; this.cor_answ1 = "hya"; this.cor_answ2 = "хя"; ++this.inx; break; case 78: this.pictureBox1.Image = (Image)Resources.hyu; this.cor_answ1 = "hyu"; this.cor_answ2 = "хю"; ++this.inx; break; case 79: this.pictureBox1.Image = (Image)Resources.hyo; this.cor_answ1 = "hyo"; this.cor_answ2 = "хё"; ++this.inx; break; case 80: this.pictureBox1.Image = (Image)Resources.mya; this.cor_answ1 = "mya"; this.cor_answ2 = "мя"; ++this.inx; break; case 81: this.pictureBox1.Image = (Image)Resources.myu; this.cor_answ1 = "myu"; this.cor_answ2 = "мю"; ++this.inx; break; case 82: this.pictureBox1.Image = (Image)Resources.myo; this.cor_answ1 = "myo"; this.cor_answ2 = "мё"; ++this.inx; break; case 83: this.pictureBox1.Image = (Image)Resources.nya; this.cor_answ1 = "nya"; this.cor_answ2 = "ня"; ++this.inx; break; case 84: this.pictureBox1.Image = (Image)Resources.nyu; this.cor_answ1 = "nyu"; this.cor_answ2 = "ню"; ++this.inx; break; case 85: this.pictureBox1.Image = (Image)Resources.nyo; this.cor_answ1 = "nyo"; this.cor_answ2 = "нё"; ++this.inx; break; case 86: this.pictureBox1.Image = (Image)Resources.sha; this.cor_answ1 = "sha"; this.cor_answ2 = "ся"; ++this.inx; break; case 87: this.pictureBox1.Image = (Image)Resources.shu; this.cor_answ1 = "shu"; this.cor_answ2 = "сю"; ++this.inx; break; case 88: this.pictureBox1.Image = (Image)Resources.sho; this.cor_answ1 = "sho"; this.cor_answ2 = "сё"; ++this.inx; break; case 89: this.pictureBox1.Image = (Image)Resources.rya; this.cor_answ1 = "rya"; this.cor_answ2 = "ря"; ++this.inx; break; case 90: this.pictureBox1.Image = (Image)Resources.ryu; this.cor_answ1 = "ryu"; this.cor_answ2 = "рю"; ++this.inx; break; case 91: this.pictureBox1.Image = (Image)Resources.ryo; this.cor_answ1 = "ryo"; this.cor_answ2 = "рё"; ++this.inx; break; case 92: this.pictureBox1.Image = (Image)Resources.pya; this.cor_answ1 = "pya"; this.cor_answ2 = "пя"; ++this.inx; break; case 93: this.pictureBox1.Image = (Image)Resources.pyu; this.cor_answ1 = "pyu"; this.cor_answ2 = "пю"; ++this.inx; break; case 94: this.pictureBox1.Image = (Image)Resources.pyo; this.cor_answ1 = "pyo"; this.cor_answ2 = "пё"; ++this.inx; break; case 95: this.pictureBox1.Image = (Image)Resources.bya; this.cor_answ1 = "bya"; this.cor_answ2 = "бя"; ++this.inx; break; case 96: this.pictureBox1.Image = (Image)Resources.byu; this.cor_answ1 = "byu"; this.cor_answ2 = "бю"; ++this.inx; break; case 97: this.pictureBox1.Image = (Image)Resources.byo; this.cor_answ1 = "byo"; this.cor_answ2 = "бё"; ++this.inx; break; case 98: this.pictureBox1.Image = (Image)Resources.gya; this.cor_answ1 = "gya"; this.cor_answ2 = "гя"; ++this.inx; break; case 99: this.pictureBox1.Image = (Image)Resources.gyu; this.cor_answ1 = "gyu"; this.cor_answ2 = "гю"; ++this.inx; break; case 100: this.pictureBox1.Image = (Image)Resources.gyo; this.cor_answ1 = "gyo"; this.cor_answ2 = "гё"; ++this.inx; break; case 101: this.pictureBox1.Image = (Image)Resources.jya; this.cor_answ1 = "jya"; this.cor_answ2 = "дзя"; ++this.inx; break; case 102: this.pictureBox1.Image = (Image)Resources.jyu; this.cor_answ1 = "jyu"; this.cor_answ2 = "дзю"; ++this.inx; break; case 103: this.pictureBox1.Image = (Image)Resources.jyo; this.cor_answ1 = "jyo"; this.cor_answ2 = "дзё"; ++this.inx; break; case 104: this.pictureBox1.Image = (Image)Resources.jya_s_; this.cor_answ1 = "jya"; this.cor_answ2 = "дзя"; ++this.inx; break; case 105: this.pictureBox1.Image = (Image)Resources.jyu_s_; this.cor_answ1 = "jyu"; this.cor_answ2 = "дзю"; ++this.inx; break; case 106: this.pictureBox1.Image = (Image)Resources.jyo_s_; this.cor_answ1 = "jyo"; this.cor_answ2 = "дзё"; ++this.inx; break; } } catch (IndexOutOfRangeException ex) { this.pictureBox1.Image = (Image)Resources.e; this.cor_answ1 = nameof(e); this.cor_answ2 = "э"; this.inx = 0; this.Randoming(); } } private void check_Click(object sender, EventArgs e) { this.Checking(); } private void textBox1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode != Keys.Return) return; this.Checking(); } public void Checking() { string lower = this.textBox1.Text.ToLower().Trim(); if (lower == "") { int num = (int)MessageBox.Show("Введите ответ"); this.textBox1.Text = ""; } else { this.textBox1.ReadOnly = true; if (lower == this.cor_answ1.Trim() | lower == this.cor_answ2.Trim() | lower == this.cor_answ3.Trim()) { ++this.correct; this.cor.Text = this.correct.ToString(); this.answ.Visible = true; this.answ.Text = "Верно!"; this.pictureBox2.Visible = true; this.pictureBox2.Image = (Image)Resources.correct; this.pictureBox1.Height = 208; } else { ++this.error; this.err.Text = this.error.ToString(); this.answ.Visible = true; this.answ.Text = "Неверно!"; this.pictureBox2.Visible = true; this.pictureBox2.Image = (Image)Resources.error; this.pictureBox1.Height = 208; } this.check.Enabled = false; this.next.Enabled = true; this.next.Focus(); } } private void next_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode != Keys.Return) return; this.textBox1.Focus(); } private void HintKaBt_Click(object sender, EventArgs e) { new HintKat().Show(); } private void Erase_Click(object sender, EventArgs e) { this.err.Text = "0"; this.cor.Text = "0"; this.label.Text = "0"; this.t = 0; } private void but_Click(object sender, EventArgs e) { if (!this.timer1.Enabled) this.timer1.Enabled = true; else this.timer1.Enabled = false; } private void timer1_Tick(object sender, EventArgs e) { ++this.t; this.label.Text = this.t.ToString(); } private void about_Click(object sender, EventArgs e) { int num = (int)MessageBox.Show(string.Format("{0} \nver. {1}", (object)this.asml.Name, (object)this.asml.Version)); } } }