Exemplo n.º 1
0
        private void CommandReceived(object sender, CommandReceivedEventArgs e)
        {
            Action <string> DelegateTeste_ModifyText = THREAD_MOD;

            this.messagebox.Invoke(DelegateTeste_ModifyText, e.Command.Target.ToString() + " sent a login response info");
            Command cmd = e.Command;

            switch (cmd.CommandType)
            {
            case CommandType.UserLogin:
                this.CheckUserLogin(e.Client, JsonConvert.DeserializeObject <UserLoginInfo>((string)cmd.MetaData));
                break;

            case CommandType.SendClientList:
                this.SendListUser(e.Client, users);
                break;

            case CommandType.SendFile:
                this.SaveFile((byte[])cmd.MetaData);
                break;

            default:
                break;
            }
        }
Exemplo n.º 2
0
 public virtual void OnCommandReceived(CommandReceivedEventArgs e)
 {
     if (this.CommandReceived != null)
     {
         CommandReceived(this, e);
     }
 }