private void button1_Click(object sender, EventArgs e)
{
int index = 1;
string[] split;
while (index != ArrayStrings.Length)
{
split = ArrayStrings[index].Split('|');
if (split[1] == textBox1.Text && split[2] == textBox2.Text) { b = true; break; }
index++;
}
if (b == true)
{
Form1.ActiveForm.Hide();
Form2 fmr = new Form2(textBox1.Text);
fmr.ShowDialog();
Close();
}
else
{
MessageBox.Show("Wrong login or password! ",
"Error",
MessageBoxButtons.OK,
MessageBoxIcon.Error);
textBox1.Text = "";
textBox2.Text = "";
}