Exemplo n.º 1
0
 //Initialize The Server Fields
 void InitializeServer(int amountofusers, string connectionString)
 {
     database               = new ConnectedData(connectionString);
     MyUsers                = new ServerUsers(amountofusers);
     MyUsers.OnUserAdded   += OnUserJoin;
     MyUsers.OnUserRemoved += OnUserLeft;
     ID      = new IDHandler(amountofusers);
     Private = new PrivateChatsHandler(MyUsers, database);
     Group   = new GroupChatHandler(MyUsers, database);
     InitializeFactory();
 }
Exemplo n.º 2
0
 public GroupChatHandler(ServerUsers ServerUsers, DAL.ConnectedData data)
 {
     this.ServerUsers = ServerUsers;
     dataBase         = data;
 }
Exemplo n.º 3
0
 public PrivateChatsHandler(ServerUsers ServerUsers, ConnectedData messageData)
 {
     this.ServerUsers = ServerUsers;
     MessageData      = messageData;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Create Entry Handler With Mail Register Verification
 /// </summary>
 /// <param name="database">The DataBase</param>
 /// <param name="myUsers">The Server Users</param>
 /// <param name="mailInfo">The Mail Info</param>
 /// <param name="OnLoginSuccess">Happens When User Logged successfully</param>
 public EntryHandler(ConnectedData database, ServerUsers myUsers, MailInfo mailInfo, Action <Connection <Entry>, LoginInfo> OnLoginSuccess)
     : this(myUsers, database, OnLoginSuccess)
 {
     mailVerificationNeeded = true;
     mailhandler            = new EmailHandler(mailInfo);
 }