コード例 #1
0
 protected override void loginHandler(UserThread client, CSMessage msg)
 {
     try
     {
         if ((bool)msg.get(MessageType.STATE))
         {
             client.ClientUser = (CSUser)msg.get(MessageType.USER);
             if (view.isOpened())
             {
                 view.loginHandler(client.ClientUser);
             }
         }
         else
         {
             if (view.isOpened())
             {
                 view.showRegisterOption();
                 view.connectionHandler(client.ClientUser);
             }
             log(Severiry.ERROR, (string)msg.get(MessageType.ERROR));
         }
     }
     catch (Exception e)
     {
         log(Severiry.ERROR, "Controller - " + e.Message);
     }
 }