Example #1
0
        public void ChatUsers(ClientSockets client)
        {
            var list = new LoginClass().ChatUsers();
            var data = _SM.ChatUsers(list);

            client.SendMessage(data);
        }
        public Login()
        {
            InitializeComponent();

            lclass  = new LoginClass();
            allTabs = new List <TabPage>();
            server  = new ServerSocket(this);
            clients = new List <ClientSockets>();
        }
 private void btnMembersDelete_Click(object sender, EventArgs e)
 {
     try
     {
         if (lstMembersUserList.SelectedIndex >= 0)
         {
             var flag = new LoginClass().DeleteUser(lstMembersUserList.SelectedItem.ToString());
             if (flag)
             {
                 RefreshMembersList();
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Example #4
0
        public void UserValidation(BinaryReader br, ClientSockets client)
        {
            string   uname, pwd;
            Usertype utype;

            uname = br.ReadString().DecryptText();
            pwd   = br.ReadString().DecryptText();
            utype = (Usertype)br.ReadString().DecryptText().TextToEnum <Usertype>();

            LoginClass lc = new LoginClass();

            lc.SetValues(uname, pwd, utype);
            var IsValidated = lc.CheckLogin();

            var data = _SM.UserValidation(IsValidated);

            client.SendMessage(data);
            client.Name        = lc.GetNameOfUser(uname);
            client.IsValidated = true;
        }