Exemple #1
0
    protected void OnButton2Clicked(object sender, EventArgs e)
    {   //autorization
        if (entry1.Text == "" || entry2.Text == "")
        {
            EmptyRegistration reg = new EmptyRegistration();
            reg.Show();
        }
        else
        {
            Client client = new Client();
            string a      = (DateTime.DaysInMonth(2018, 5).GetHashCode() + "word".GetHashCode()) + "";

            client.sendmsg(entry1.Text, a);
        }
        entry1.Text = "";
        entry2.Text = "";
    }
Exemple #2
0
    protected void OnButton1Clicked(object sender, EventArgs e)
    {   //registration
        if (entry1.Text == "" || entry2.Text == "")
        {
            EmptyRegistration reg = new EmptyRegistration();
            reg.Show();
        }
        else if (workFile.readFromFile(entry1.Text))
        {
            NotCurrentLogic notCurrentLogic = new NotCurrentLogic();
            notCurrentLogic.Show();
        }
        else
        {
            string login    = entry1.Text;
            string password = getMD5(entry2.Text);

            workFile.writeInFile(login, password);
        }
        entry1.Text = "";
        entry2.Text = "";
    }