Example #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            log_in choice = new log_in();

            this.Hide();
            choice.ShowDialog();
        }
Example #2
0
        private void Reg_botton_click(object sender, EventArgs e)
        {
            string   path     = @"C:\Users\Hrach\Desktop\ArmathProj\";
            string   filename = name_text_box.Text + ".txt";
            FileInfo NewUser  = new FileInfo(path + filename);

            if (name_text_box.Text == "" || Password_text_box.Text == "" || Password_text_box2.Text == "")

            {
                MessageBox.Show("Invalid Inpud!!!!!");
                return;
            }

            if (Password_text_box.Text == Password_text_box2.Text)
            {
            }
            else
            {
                MessageBox.Show("Invalid Password!!!!!");
                this.Close();
                return;
            }

            if (NewUser.Exists)
            {
            }
            else
            {
            }

            using (FileStream fs = new FileStream(path + filename, FileMode.Create))
            {
            }
            using (FileStream fs = new FileStream(path + filename, FileMode.Create))
            { }
            using (StreamWriter sw = new StreamWriter(path + filename))
            {
                sw.WriteLine(name_text_box.Text);
                sw.WriteLine(Password_text_box.Text);
            }
            log_in log = new log_in();

            this.Hide();
            log.ShowDialog();
            this.Close();
        }