public void Menu_Load(object sender, EventArgs e) { Shifr.raskl(); Shifr.read(); for (int i = 0; i < Config.names.Length; i++) { if (Config.names[i] == button_settings.Name) { button_settings.Text = Config.names[i + 1]; } if (Config.names[i] == Create.Name) { Create.Text = Config.names[i + 1]; } if (Config.names[i] == Get.Name) { Get.Text = Config.names[i + 1]; } if (Config.names[i] == Help.Name) { Help.Text = Config.names[i + 1]; } if (Config.names[i] == "error") { Config.error = Config.names[i + 1]; } } }
private void button_change_Click(object sender, EventArgs e) { if (!Config.rus_lang) { Config.rus_lang = true; } else { Config.rus_lang = false; } Shifr.read(); Settings_Load(sender, e); }
private void Get_Load(object sender, EventArgs e) { comboBox_site.Items.Clear(); Shifr.raskl(); Shifr.read(); for (int i = 0; i < Config.names.Length; i++) { if (Config.names[i] == label_choose.Name) { // label_choose.Text = " "; label_choose.Text = Config.names[i + 1]; } if (Config.names[i] == this.Name) { this.Text = Config.names[i + 1]; } if (Config.names[i] == label_password.Name) { label_password.Text = Config.names[i + 1]; } if (Config.names[i] == button_get.Name) { button_get.Text = Config.names[i + 1]; } if (Config.names[i] == label_name.Name) { label_name.Text = Config.names[i + 1]; } } String pas = File.ReadAllText("pas.txt"); Config.vs = pas.Split(new char[] { ':', '\r', '\n', '|', }, StringSplitOptions.RemoveEmptyEntries); for (int i = 0; i < Config.vs.Length; i++) { if (i % 3 == 0) { comboBox_site.Items.Add(Config.vs[i]); } } }
private void Help_Load(object sender, EventArgs e) { if (Config.rus_lang) { pictureBox4.Image = new Bitmap("Resours\\Mainrus.jpg"); pictureBox1.Image = new Bitmap("Resours\\Create_rus.jpg"); pictureBox2.Image = new Bitmap("Resours\\Get_rus.jpg"); pictureBox3.Image = new Bitmap("Resours\\Editing_rus.jpg"); pictureBox5.Image = new Bitmap("Resours\\Add_rus.jpg"); } else { pictureBox4.Image = new Bitmap("Resours\\Maineng.jpg"); pictureBox1.Image = new Bitmap("Resours\\Create.jpg"); pictureBox2.Image = new Bitmap("Resours\\Get.jpg"); pictureBox3.Image = new Bitmap("Resours\\Editing.jpg"); pictureBox5.Image = new Bitmap("Resours\\Add.jpg"); } Shifr.read(); for (int i = 0; i < Config.names.Length; i++) { if (Config.names[i] == textBox_about.Name) { textBox_about.Text = Config.names[i + 1]; } if (Config.names[i] == textBox_add.Name) { textBox_add.Text = Config.names[i + 1]; } if (Config.names[i] == textBox_ed.Name) { textBox_ed.Text = Config.names[i + 1]; } if (Config.names[i] == textBox_create.Name) { textBox_create.Text = Config.names[i + 1]; } if (Config.names[i] == textBox_get.Name) { textBox_get.Text = Config.names[i + 1]; } if (Config.names[i] == tabControl.TabPages[0].Name) { tabControl.TabPages[0].Text = Config.names[i + 1]; } if (Config.names[i] == tabControl.TabPages[1].Name) { tabControl.TabPages[1].Text = Config.names[i + 1]; } if (Config.names[i] == tabControl.TabPages[2].Name) { tabControl.TabPages[2].Text = Config.names[i + 1]; } if (Config.names[i] == tabControl.TabPages[3].Name) { tabControl.TabPages[3].Text = Config.names[i + 1]; } if (Config.names[i] == tabControl.TabPages[4].Name) { tabControl.TabPages[4].Text = Config.names[i + 1]; } } }