Exemple #1
0
        private void SignIn_Click(object sender, EventArgs e)
        {
            if (LoginBox.Text.Length == 0)
            {
                Message.Warning("Empty login!", Text);
                return;
            }
            if (PasswordBox.Text.Length == 0)
            {
                Message.Warning("Empty password!", Text);
                return;
            }
            bool success = DB.Login(LoginBox.Text, PasswordBox.Text);

            if (!success)
            {
                Message.Error(DB.Status, Text);
                PasswordBox.Clear();
                PasswordBox.Focus();
            }
            else
            {
                LoginBox.Clear();
                PasswordBox.Clear();
                MainForm form = new MainForm();
                form.Show(this);
                Hide();
            }
        }
        private void RegisterButton_Click(object sender, RoutedEventArgs e)
        {
            using (SQLiteConnection Base = new SQLiteConnection("Data source=Users.db"))
            {
                Base.Open();

                if (M.FindUser(Base, LoginBox.Text) == null)
                {
                    if (M.PasswordHash(PasswordBox.Password) == M.PasswordHash(PasswordBox_Double.Password))
                    {
                        ((App)Application.Current).log.Trace("Пользователь успешно зарегистрирован");

                        M.NewUser(Base, LoginBox.Text, M.PasswordHash(PasswordBox.Password));

                        NavigationService.Navigate(Pages.LoginPage);
                    }
                    else
                    {
                        PasswordBox.Clear(); PasswordBox_Double.Clear(); MessageBox.Show("Вы ввели несовпадающие пароли");
                    }
                }
                else
                {
                    LoginBox.Clear(); MessageBox.Show("Имя пользователя занято");
                }
            }
        }
Exemple #3
0
        private void SignUp_Click(object sender, EventArgs e)
        {
            if (LoginBox.Text.Length == 0)
            {
                Message.Warning("Empty login!", Text);
                return;
            }
            if (PasswordBox.Text.Length == 0)
            {
                Message.Warning("Empty password!", Text);
                return;
            }
            bool result = DB.CheckLogin(LoginBox.Text);

            if (!result)
            {
                Message.Error(DB.Status, Text);
            }
            else
            {
                result = DB.Register(LoginBox.Text, PasswordBox.Text);
                if (!result)
                {
                    Message.Error(DB.Status, Text);
                }
                else
                {
                    Message.Info("You have successfully registered!" + Environment.NewLine + "Log in using the registration data.", Text);
                }
                Journal.Append(String.Format("{0} registered", LoginBox.Text));
            }
            LoginBox.Clear();
            PasswordBox.Clear();
            LoginBox.Focus();
        }
Exemple #4
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            User        usr      = new User();
            bool        isUsed   = false;
            List <User> allUsers = _userRepo.getAllUsers();

            usr.Login    = LoginBox.Text;
            usr.Password = _PasswordBox.Password;
            foreach (var usrs in allUsers)
            {
                if (usr.Login == usrs.Login)
                {
                    LoginBox.Clear();
                    _PasswordBox.Clear();
                    isUsed = true;
                }
            }
            if (isUsed)
            {
                MessageBox.Show("This login is already used");
            }
            else
            {
                _userRepo.RegisterUser(usr);
                _buyService.BuyGame(_gameRepo.FindByFullName("CSGO"), usr);
                new LibraryPage(_gameRepo, _userRepo, _buyService, _calcStrat, null, usr).Show();
                this.Hide();
            }
        }
        /// <summary>
        /// Отправление данных выбранному клиенту.
        /// </summary>
        /// /// <param name="sender"></param>
        /// <param name="e"></param>
        private void SendButton_Click(object sender, RoutedEventArgs e)
        {
            if (clientComboBox.Items.Count != 0)
            {
                object selectItem = clientComboBox.SelectedItem; // определение номера выбранного клиента

                if (selectItem != null)
                {
                    int cbNum = (int)selectItem;

                    StateObject currentClient = clients.First((item) => item.clientNum == cbNum);                 // поиск нужного клиента в списке подлючений, его выбор

                    if (currentClient.sizePacket == currentClient.sizeReceived && currentClient.sizeReceived > 0) // если данные были корректно приняты
                    {
                        // считывание данных с полей ввода
                        string login    = LoginBox.Text;
                        string password = PasswordBox.Text;

                        if (login != string.Empty && password != string.Empty)
                        {
                            string message = "\nАдминистратор успешно проверил информацию." +
                                             "\nВаши авторизационные данные представлены ниже." +
                                             "\n\n----------\nЛогин: " + login + "\n" + "Пароль: " + password + "\n----------"; // отправляемая строка данных

                            // отправление данных, закрытие подлючения
                            bool state = Send(currentClient.workSocket, message);

                            if (state == true)
                            {
                                _ = sendDone.WaitOne(); // ожидание завершения передачи
                            }

                            // удаление клиента из общего списка и из "clientComboBox" по завершению передачи данных
                            _ = clients.Remove(currentClient);
                            clientComboBox.Items.Remove(clientComboBox.SelectedItem);
                            LoginBox.Clear();
                            PasswordBox.Clear();
                        }
                        else
                        {
                            _ = MessageBox.Show("Введите логин и пароль!", "Ошибка!");
                        }
                    }
                    else
                    {
                        _ = MessageBox.Show("Сначала необходимо получить и проверить данные от пользователя (фотографию, документ)!", "Ошибка!");
                    }
                }
                else
                {
                    _ = MessageBox.Show("Выберите пользователя, которому хотите отправить данные!", "Ошибка!");
                }
            }
            else
            {
                _ = MessageBox.Show("Нет доступных подключений!", "Ошибка!");
            }
        }
Exemple #6
0
        void Polacznie1()
        {
            MySqlConnection  polaczenie = new MySqlConnection("server=localhost; user=root; database=food; port=3306; pooling=false");
            MySqlDataAdapter komenda    = new MySqlDataAdapter("SELECT count(id) FROM data where Login='******'", polaczenie);

            try
            {
                DataTable dt = new DataTable();
                komenda.Fill(dt);
                if (dt.Rows[0][0].ToString() == "1")
                {
                    MD5    hashMd5 = MD5.Create();
                    string haslo   = GetMd5Hash(hashMd5, PasswodBox.Text);

                    MySqlDataAdapter komenda1 = new MySqlDataAdapter("SELECT Password FROM data where Login='******'", polaczenie);
                    DataTable        dt1      = new DataTable();
                    komenda1.Fill(dt1);

                    string haslozBazy = dt1.Rows[0][0].ToString();

                    if (VerifyMd5Hash(hashMd5, PasswodBox.Text, haslozBazy))
                    {
                        Set_Login = "******" + LoginBox.Text;
                        MessageBox.Show("Login Succes.", "Congrates", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        this.Hide();
                        Form1 NewPanel = new Form1();
                        NewPanel.Show();
                    }
                    else
                    {
                        MessageBox.Show("Either your Password is incorrect.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        LoginBox.Clear();
                        PasswodBox.Clear();
                    }
                }
                else
                {
                    MessageBox.Show("This Login not Exist.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    LoginBox.Clear();
                    PasswodBox.Clear();
                }
            }
            catch (Exception ex)
            {
                string byk = string.Format("Problem registering user: \n{0}.", ex.Message);
                MessageBox.Show(byk, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            finally
            {
                if (polaczenie.State == ConnectionState.Open)
                {
                    polaczenie.Close();
                }
            }
        }
        void Rejestracja()
        {
            MySqlConnection polaczenie = new MySqlConnection("server=localhost; user=root; database=food; port=3306; pooling=false");
            MySqlCommand    komenda    = polaczenie.CreateCommand();
            MySqlCommand    komenda1   = polaczenie.CreateCommand();

            try
            {
                if (polaczenie.State == ConnectionState.Closed)
                {
                    polaczenie.Open();

                    string haslo = PasswordBox.Text;

                    using (MD5 hash = MD5.Create())
                    {
                        haslo = GetMd5Hash(hash, haslo);
                    }

                    komenda1.CommandText = string.Format("SELECT count(id) FROM data where Login='******'");
                    int wartosc = Convert.ToInt32(komenda1.ExecuteScalar());
                    if (wartosc == 1)
                    {
                        MessageBox.Show(String.Format("Login: {0}, already exists.", LoginBox.Text), "Error", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                    else
                    {
                        komenda.CommandText = string.Format("INSERT INTO data(Login,Password,Resort,Street,NumerHouse) VALUES('{0}','{1}','{2}','{3}','{4}')", LoginBox.Text, haslo, ResortBox.Text, StreetBox.Text, HostNumberBox.Text);
                        if (komenda.ExecuteNonQuery() == 1)
                        {
                            MessageBox.Show("You have logged successfuly. Now you can Login!", "Informacja", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        }
                        else
                        {
                            MessageBox.Show("Login Error.", "Informacja", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        }
                    }
                    HostNumberBox.Clear(); StreetBox.Clear(); ResortBox.Clear(); LoginBox.Clear(); PasswordBox.Clear(); LoginBox.Focus();
                }
            }
            catch (Exception ex)
            {
                string byk = string.Format("Problem register with user: \n{0}.", ex.Message);
                MessageBox.Show(byk, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            finally
            {
                if (polaczenie.State == ConnectionState.Open)
                {
                    polaczenie.Close();
                }
            }
        }
Exemple #8
0
        private void LoginButton_Click(object sender, RoutedEventArgs e)
        {
            string Hash;

            using (SQLiteConnection Base = new SQLiteConnection("Data source=Users.db"))
            {
                Base.Open();

                Hash = M.FindUser(Base, LoginBox.Text);

                if (Hash != null)
                {
                    if (Hash == M.PasswordHash(PasswordBox.Password))
                    {
                        ((App)Application.Current).log.Trace("Пользователь успешно вошёл в систему");

                        ((App)Application.Current).CurrentUser = LoginBox.Text;

                        try
                        {
                            ((App)Application.Current).S = M.DeSerialise(((App)Application.Current).CurrentUser); // Загрузка файла настроек

                            Pages.SettingsPage.Refresh();

                            ((App)Application.Current).log.Trace("Загружены настройки");
                        }
                        catch
                        { ((App)Application.Current).log.Trace("Файл настроек не найден и будет создан в дальнейшем");
                          try
                          {
                              M.OpenReadMe();
                          }
                          catch { MessageBox.Show("Кажется, кто-то удалил руководство пользователя"); } }

                        Base.Close();

                        NavigationService.Navigate(Pages.MainPage);
                    }
                    else
                    {
                        PasswordBox.Clear(); MessageBox.Show("Введён неверный пароль");
                    }
                }
                else
                {
                    LoginBox.Clear(); PasswordBox.Clear(); MessageBox.Show("Пользователь не существует");
                }
            }
        }
        private void UpdateTeacherClick(object sender, RoutedEventArgs e)
        {
            string ConnectionString = @"Data Source=DESKTOP-15P21ID;Initial Catalog=kursovoi;Integrated Security=True";
            string sqlExpression    = $"SELECT id,name From facylties where name='{faculty}'";

            using (SqlConnection connection = new SqlConnection(ConnectionString))
            {
                connection.Open();
                SqlCommand    command = new SqlCommand(sqlExpression, connection);
                SqlDataReader reader  = command.ExecuteReader();
                SqlCommand    cm1     = connection.CreateCommand();
                try
                {
                    while (reader.Read())
                    {
                        object s = reader.GetValue(0);
                        fakk_id = Convert.ToInt32(s);
                    }
                    reader.Close();
                    if (fakk_id == 0)
                    {
                        MessageBox.Show("Такого факультета не существует");
                    }
                    else
                    {
                        cm1.CommandText = "update users set first_name='" + SurnameBox.Text + "',middle_name='" + NameBox.Text + "',login='******',email='" + PostBox.Text + "',faculty_id='" + fakk_id + "' where id='" + id_admin_panel + "'";
                        cm1.ExecuteNonQuery();
                        MessageBox.Show("Данные успешно обновлены!");
                    }
                }

                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
                finally
                {
                    SurnameBox.Clear();
                    NameBox.Clear();
                    LoginBox.Clear();
                    PostBox.Clear();
                    FacultyBox.Clear();
                    connection.Close();
                    reader.Close();
                }
            }
        }
Exemple #10
0
        private void enterButton_Click(object sender, RoutedEventArgs e)
        {
            if (!succes)
            {
                string login    = LoginBox.Text;
                string password = GetMd5Hash(passwordBox.Password);

                var accounts = _dataManager.Accounts.ToList();
                foreach (Account a in accounts)
                {
                    if (a.Login == login && a.Passw == password)
                    {
                        succes = true;
                        Login  = login;
                        break;
                    }
                }

                if (succes)
                {
                    statusEnter.Foreground = Brushes.Green;
                    statusEnter.Content    = $"Успешно вход через : {countTimer}";

                    timer          = new DispatcherTimer();
                    timer.Interval = new TimeSpan(0, 0, 0, 0, 250);
                    timer.Tick    += new EventHandler(timer_Tick);
                    timer.Start();



                    _mainWindow.Close();

                    BuyerWindow buyerWindow = new BuyerWindow();
                    buyerWindow.ShowDialog();

                    this.Close();
                }
                else
                {
                    statusEnter.Content = "Неверные данные!";
                }
                LoginBox.Clear();
                passwordBox.Clear();
            }
        }
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            bool TrueType = false;

            foreach (var usr in _userRepo.getAllUsers())
            {
                if (LoginBox.Text == usr.Login && PasswordBox.Password == usr.Password)
                {
                    ActiveUser = _userRepo.getUserByLogin(LoginBox.Text);
                    new LibraryPage(_gameRepo, _userRepo, _buyService, _calcStrat, null, ActiveUser).Show();
                    //nextWindow.Show();
                    TrueType = true;
                }
            }
            if (!TrueType)
            {
                MessageBox.Show("Invalid login or password");
                LoginBox.Clear();
                PasswordBox.Clear();
            }

            this.Hide();
        }
Exemple #12
0
        /// <summary>
        /// Głowna funkcja rejestrująca użytkownika.
        /// </summary>
        /// <returns>
        /// Funkcja Rejestracja() odpowiada za połączenie z bazą danych, zabezpieczenie hasła wprowadzonego przez użytkownika,
        /// a także przesłania danych do bazy danych.
        /// </returns>
        void Rejestracja()
        {
            //Połączenie z lokalną bazą danych.
            MySqlConnection polaczenie = new MySqlConnection("server=localhost; user=root; database=user; port=3306; pooling=false");
            MySqlCommand    komenda    = polaczenie.CreateCommand();
            MySqlCommand    komenda1   = polaczenie.CreateCommand();

            try
            {
                if (polaczenie.State == ConnectionState.Closed)
                {
                    polaczenie.Open();
                    //Sprawdza radiobutona, aby moc wprowadzić płeć użytkownika.
                    if (radioButtonMale.Checked == true)
                    {
                        plec = "male";
                    }
                    else if (radioButtonfemale.Checked == true)
                    {
                        plec = "female";
                    }
                    //Sprawdza które checboxy sa zaznaczone.
                    if (checkBox1.Checked == true && checkBox2.Checked == true && checkBox3.Checked == true && checkBox4.Checked == true)
                    {
                        wybor = "Rock,Pop,Metal,Other";
                    }
                    else if (checkBox1.Checked == true && checkBox2.Checked == true && checkBox3.Checked == true)
                    {
                        wybor = "Rock,Pop,Metal";
                    }
                    else if (checkBox1.Checked == true && checkBox2.Checked == true)
                    {
                        wybor = "Rock,Pop";
                    }
                    else if (checkBox1.Checked == true && checkBox3.Checked == true)
                    {
                        wybor = "Rock,Metal";
                    }
                    else if (checkBox1.Checked == true && checkBox4.Checked == true)
                    {
                        wybor = "Rock,Other";
                    }
                    else if (checkBox2.Checked == true && checkBox3.Checked == true)
                    {
                        wybor = "Pop,Metal";
                    }
                    else if (checkBox2.Checked == true && checkBox4.Checked == true)
                    {
                        wybor = "Pop,Other";
                    }
                    else if (checkBox3.Checked == true && checkBox4.Checked == true)
                    {
                        wybor = "Metal,Other";
                    }
                    else if (checkBox1.Checked == true)
                    {
                        wybor = "Rock";
                    }
                    else if (checkBox2.Checked == true)
                    {
                        wybor = "Pop";
                    }
                    else if (checkBox3.Checked == true)
                    {
                        wybor = "Metal";
                    }
                    else if (checkBox4.Checked == true)
                    {
                        wybor = "Other";
                    }
                    string haslo = PasswordBox.Text;
                    //hashowanie hasel.
                    using (MD5 hash = MD5.Create())
                    {
                        haslo = GetMd5Hash(hash, haslo);
                    }

                    komenda1.CommandText = string.Format("SELECT count(id) FROM user1 where Login='******'");
                    int wartosc = Convert.ToInt32(komenda1.ExecuteScalar());
                    if (wartosc == 1)
                    {
                        MessageBox.Show(String.Format("Login: {0}, already exists.", LoginBox.Text), "Error", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                    else
                    {
                        //komeda wstawiaajca dane z pol tekstowych.
                        komenda.CommandText = string.Format("INSERT INTO user1(Name,Surname,Login,Password,Music,Sex) VALUES('{0}','{1}','{2}','{3}','{4}','{5}')", NameBox.Text, SurnameBox.Text, LoginBox.Text, haslo, wybor, plec);
                        //if sprawdzajacy czy komeda sie wykonala poprawnie --- czy zwrocila ilosc rzedow.
                        if (komenda.ExecuteNonQuery() == 1)
                        {
                            //komunkiat o poprawnym zajestestrowaniu uzytkownika.
                            MessageBox.Show("You have logged successfuly.", "Informacja", MessageBoxButtons.OK, MessageBoxIcon.Information);
                            //przejscie do panelu logownia
                            this.Hide();
                            LogPanel NewLogPanel = new LogPanel();
                            NewLogPanel.Show();
                        }
                        else
                        {
                            MessageBox.Show("Login Error.", "Informacja", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        }
                    }
                    NameBox.Clear(); SurnameBox.Clear(); LoginBox.Clear(); PasswordBox.Clear(); NameBox.Focus();
                }
            }
            catch (Exception ex)
            {
                string byk = string.Format("Problem registering user: \n{0}.", ex.Message);
                MessageBox.Show(byk, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            finally
            {
                //jesli polaczenie jest otwarte, to zamnknij.
                if (polaczenie.State == ConnectionState.Open)
                {
                    polaczenie.Close();
                }
            }
        }
Exemple #13
0
        /// <summary>
        /// Głowna funkcja logujaca użytkownika.
        /// </summary>
        /// <returns>
        /// Funkcja Polacznie1() odpowiada za połaczenie z baza danych, sprawdzenie czy podany login istnieje,
        /// weryfikacje hasła wprowadzonego i hasła z bazy danych.
        /// </returns>
        void Polacznie1()
        {
            //Polacznie z lokalna baza danych.
            MySqlConnection polaczenie = new MySqlConnection("server=localhost; user=root; database=user; port=3306; pooling=false");
            //Stworznie komedy wyszykujacej login i haslo uzytkownika
            MySqlDataAdapter komenda = new MySqlDataAdapter("SELECT count(id) FROM user1 where Login='******'", polaczenie);

            try
            {
                //Stworzenie nowego obiektu DataTable
                DataTable dt = new DataTable();
                //metody Fill pozwala załadować dane (z komedy) do obiektów DataTable
                komenda.Fill(dt);
                //if sprawdza czy zwraca dokladnie 1
                if (dt.Rows[0][0].ToString() == "1")
                {
                    //hasla
                    MD5    hashMd5 = MD5.Create();
                    string haslo   = GetMd5Hash(hashMd5, PasswodBox.Text);

                    MySqlDataAdapter komenda1 = new MySqlDataAdapter("SELECT Password FROM user1 where Login='******'", polaczenie);
                    DataTable        dt1      = new DataTable();
                    komenda1.Fill(dt1);

                    string haslozBazy = dt1.Rows[0][0].ToString();

                    if (VerifyMd5Hash(hashMd5, PasswodBox.Text, haslozBazy))
                    {
                        //przypisz dane so wartosi Set_Name dzieki, ktorej przkazujemy wartosc do wyswietlenia w kolejnym panelu
                        Set_Name = LoginBox.Text;
                        //komunkiat o poprawnym zajeztreowniu uzytkownika
                        MessageBox.Show("Login Succes.", "Congrates", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        //przejscie do panelu uzytkownika
                        this.Hide();
                        MainPanel NewPanel = new MainPanel();
                        NewPanel.Show();
                    }
                    else
                    {
                        //Error gdy wpiszemy zle login lub haslo
                        MessageBox.Show("Either your Password is incorrect.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        //czysci pola tesktowe
                        LoginBox.Clear();
                        PasswodBox.Clear();
                    }
                }
                else
                {
                    //Error gdy wpiszemy zle email lub haslo
                    MessageBox.Show("nie ma takie Loginu.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    //czysci pola tesktowe
                    LoginBox.Clear();
                    PasswodBox.Clear();
                }
            }
            catch (Exception ex)
            {
                string byk = string.Format("Problem registering user: \n{0}.", ex.Message);
                MessageBox.Show(byk, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            finally
            {
                //jesli polaczenie jest otwarte, to zamnknij.
                if (polaczenie.State == ConnectionState.Open)
                {
                    polaczenie.Close();
                }
            }
        }
 //Cleans the field of textbox
 private void LoginBox_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e)
 {
     LoginBox.Clear();
 }
Exemple #15
0
        //_______________________________

        /** Coding Login Panel  **/

        //________________________________


        private void Connection_Click(object sender, EventArgs e)
        {
            int        i = 0;
            string     Mode;
            SqlCommand cmd = con.CreateCommand();

            cmd.CommandType = CommandType.Text;
            cmd.CommandText = "select * from registration where login='******' and motdepasse='" + PassBox.Text + "' ";
            cmd.ExecuteNonQuery();
            DataTable      dt = new DataTable();
            SqlDataAdapter da = new SqlDataAdapter(cmd);

            da.Fill(dt);
            i = Convert.ToInt32(dt.Rows.Count.ToString());


            foreach (DataRow dr in dt.Rows)
            {
                Mode                  = dr["UserMode"].ToString();
                UserMod.Text          = Mode.ToString();
                utilisateurname.Text  = dr["nom"].ToString();
                utilisateurfname.Text = dr["prenom"].ToString();
            }



            if (i == 0)
            {
                WrongFill.Visible = true;
                // MessageBox.Show("This username password does not match");
            }


            else if (UserMod.Text == "Admin")
            {
                UsersSecurity.Hide();
                Login.Hide();
                LoginBox.Clear();
                PassBox.Clear();
                WelcomePage.BringToFront();
                Header.Show();
                Waiting.Show();
                WaitingTimer.Start();
                WrongFill.Visible = false;
            }
            else
            {
                // button1.Enabled = false;
                // SupprimerCommande.Enabled = false;
                // commander.Enabled = false;
                dataGridView1.Hide();
                UsersSecurity.Show();
                ajoutstock.Enabled     = false;
                Ajouterbutton.Enabled  = false;
                Annulation.Enabled     = false;
                Moduser.Enabled        = false;
                Suppbutton.Enabled     = false;
                DelDealer.Enabled      = false;
                SaveDealer.Enabled     = false;
                SupprimerUnite.Enabled = false;
                AjouterUnite.Enabled   = false;
                Delbutton.Enabled      = false;
                Modbutton.Enabled      = false;
                AjoutButton.Enabled    = false;
                UserAddPanel.Enabled   = false;
                Fournisseurs.Enabled   = false;
                pictureBox5.Visible    = false;


                Login.Hide();
                LoginBox.Clear();
                PassBox.Clear();
                WelcomePage.BringToFront();
                Header.Show();
                Waiting.Show();
                WaitingTimer.Start();
                WrongFill.Visible = false;
            }
        }