예제 #1
0
        public void LoginUser()
        {
            FormLogin form1 = new FormLogin();

            form1.Close();
            shareLogin form2 = new shareLogin();

            form2.Show();
        }
예제 #2
0
        private void buttonLogin_Click(object sender, EventArgs e)
        {
            AppLogsEvents appLogsEvents = new AppLogsEvents();

            appLogsEvents.AddTable(Files.filePath);
            DataBase dataBase = new DataBase();
            String   type     = "";

            if (checkHMAC.Checked)
            {
                type = "HMAC";
            }
            else
            {
                type = "SHA512";
            }
            if (Files.filePath != "")
            {
                bool login = dataBase.LoginUser(textLogin.Text, textPassword.Text, type, Files.filePath);
                if (login == true)
                {
                    labelerror.ForeColor = Color.Black;
                    labelerror.Text      = "";
                    shareLogin main = new shareLogin();
                    main.Show();
                }
                if (login == false)
                {
                    labelerror.ForeColor = Color.Red;
                    labelerror.Text      = "Incorrect login or password ";
                }
            }
            else
            {
                labelerror.ForeColor = Color.Red;
                labelerror.Text      = "User didn't choose file";
            }
        }