public int CheckSubscribe(string profile, string sub)
        {
            string[] arrParm     = { "@profile", "@sub", "@isSub" };
            string[] arrParmData = { profile, sub };
            string[] arrParmOut  = MySqlClass.MySQLInOut("CheckToSubscribe", arrParm, arrParmData);

            return(Int32.Parse(arrParmOut[0]));
        }
        /// <summary>
        /// Проверяет логин\email на уникальность
        /// </summary>
        /// <param name="client">Сокет клиента</param>
        /// <param name="login">Логин</param>
        /// <param name="email">Почта</param>
        /// <param name="idOperation">Номер операции которая выполнется в клиенте</param>
        public static void CheckUnique(Socket client, string login, string email, int idOperation = 2)
        {
            string[] arrParm     = { "@loginIn", "@emailIn", "@loginOutBool" };
            string[] arrParmData = { login, email };
            string[] arrParmOut  = MySqlClass.MySQLInOut("CheckUnique", arrParm, arrParmData);

            ServerClass.SendMsgClient(client, 64, idOperation, Int32.Parse(arrParmOut[0]));
        }
        /// <summary>
        /// Добавление свойства проекта в базу
        /// </summary>
        /// <param name="client">Сокет клиента</param>
        /// <param name="login">Логин пользователя</param>
        /// <param name="nameProject">Имя проекта</param>
        public static void AddNewProject(Socket client, string login, string nameProject)
        {
            string[] arrParm     = { "@nameUserIn", "@nameProjectIn", "@datePublication", "@idProjectOut" };
            string[] arrParmData = { login, nameProject, DateTime.Now.ToString("yyyy-MM-dd") };
            string[] arrParmOut  = MySqlClass.MySQLInOut("AddProject", arrParm, arrParmData);

            ServerClass.SendMsgClient(client, 64, 1006, arrParmOut[0]);
        }
        /// <summary>
        /// Получение всей информации о проекте из базы
        /// </summary>
        /// <param name="client">Клиент</param>
        /// <param name="loginUser">Логин</param>
        /// <param name="nameProject">Имя проекта</param>
        public static void GetFullInfoForProject(Socket client, string loginUser, string nameProject)
        {
            string[] arrParm     = { "@loginUserIn", "@nameProjectIn", "@datePub", "@rating", "@countVote", "@note", "@image", "@viewApp" };
            string[] arrParmData = { loginUser, nameProject };
            string[] arrParmOut  = MySqlClass.MySQLInOut("GetInfoProject", arrParm, arrParmData);

            ServerClass.SendMsgClient(client, 512, 8, nameProject, arrParmOut[0],
                                      arrParmOut[1], arrParmOut[2], arrParmOut[3], arrParmOut[4], arrParmOut[5]);
        }
        /// <summary>
        /// Получаем всю информацию о пользователе из базы
        /// </summary>
        /// <param name="client">Сокет клиента</param>
        /// <param name="login">Логин</param>
        /// <param name="isThisUser"></param>
        public static void CheckFullInfoOfPerson(Socket client, string login, bool isThisUser)
        {
            string[] arrParm     = { "@loginUser", "@nameOut", "@lastnameOut", "@levelOut", "@likeOut", "@imageOut", "@emailOut", "@countProjectOut", "@noteOut", "@countSubOut" };
            string[] arrParmData = { login };
            string[] arrParmOut  = MySqlClass.MySQLInOut("CheckFullInfoPerson", arrParm, arrParmData);


            ServerClass.SendMsgClient(client, 1024, 3, isThisUser, arrParmOut[0], arrParmOut[1], Int32.Parse(arrParmOut[2]),
                                      Int32.Parse(arrParmOut[3]), arrParmOut[4], arrParmOut[5], arrParmOut[6], arrParmOut[7], arrParmOut[8]);
        }
        internal static List <FileSett> listFileSend = new List <FileSett>(); // Список файлов который в данный момент скачиваются из сервера


        #region База - Сервер

        /// <summary>
        /// Читает данные о пользователе и отправляет ответ клиенту
        /// </summary>
        /// <param name="client">Сокет клиента</param>
        /// <param name="login">Логин</param>
        /// <param name="password">Пароль</param>
        public static void CheckLoginAndPasswordUser(Socket client, string login, string password)
        {
            string[] arrParm     = { "@loginIn", "@passIn", "@loginOut" };
            string[] arrParmData = { login, password };
            string[] arrParmOut  = MySqlClass.MySQLInOut("CheckLoginAndPassUser", arrParm, arrParmData);

            Connect(ServerClass.nextID++, login, client);

            ServerClass.SendMsgClient(client, 64, 1, Int32.Parse(arrParmOut[0]));
        }
        /// <summary>
        /// Изменяет данные у проекта в базе
        /// </summary>
        /// <param name="client">Клиент</param>
        /// <param name="id">id проекта</param>
        /// <param name="name">Имя</param>
        /// <param name="viewApp">Категория</param>
        /// <param name="note">Описание</param>
        /// <param name="hrefImage">Ссылка на изображение</param>
        public static void UpdateInfoForProject(Socket client, int id, string name, int viewApp, string note, string hrefImage)
        {
            string[] arrParm     = { "@idProj", "@nameProj", "@viewApp", "@note", "@hrefImage", "@isRenameProj", "@oldNameProj" };
            string[] arrParmData = { id.ToString(), name, viewApp.ToString(), note, hrefImage };
            string[] arrParmOut  = MySqlClass.MySQLInOut("UpdateInfoForProject", arrParm, arrParmData);

            if (arrParmOut[0].Equals("1"))
            {
                ServerClass.SendMsgClient(client, 512, 1007, name);

                string nameUser = ServerClass.clients.FirstOrDefault(f => f.socket == client).name;
                File.Move(ServerClass.pathProjectFile + "\\" + nameUser + "\\" + arrParmOut[1], ServerClass.pathProjectFile + "\\" + nameUser + "\\" + name);
            }
        }
        /// <summary>
        /// Проверяем изменение в количестве лайков у пользователя
        /// </summary>
        /// <param name="client">Сокет клиента</param>
        /// <param name="login">Логин</param>
        public static void CheckNewLike(Socket client, string login)
        {
            string[] arrParm     = { "@loginUser", "@likeOut" };
            string[] arrParmData = { login };
            string[] arrParmOut  = MySqlClass.MySQLInOut("CheckNewLike", arrParm, arrParmData);

            //foreach (var clientU in ServerClass.clients)
            //{
            //    if (clientU.socket == client)
            //    {
            //        if(clientU.countLike != Int32.Parse(arrParmOut[0]))
            //        {
            //            clientU.countLike = Int32.Parse(arrParmOut[0]);
            //            ServerClass.SendMsgClient(client, 64, 5, arrParmOut[0]);
            //        }
            //    }
            //}
        }