Ejemplo n.º 1
0
 private void bUpdateUserMessage_Click(object sender, EventArgs e)
 {
     this.thisUser.UserMessage = tUserMessage.Text;
     UpdateUserMessage m = new UpdateUserMessage(this.thisUser);
     Connection.getInstance().sendMessage(m.toArray());
 }
Ejemplo n.º 2
0
 private void cbStatus_SelectedIndexChanged(object sender, EventArgs e)
 {
     string newStatus = cbStatus.SelectedItem.ToString();
     if (newStatus.Equals(STATUS_AVAILABLE))
     {
         this.thisUser.Status = User.Flag.AVAILABLE;
     }
     else if (newStatus.Equals(STATUS_BUSY))
     {
         this.thisUser.Status = User.Flag.BUSY;
     }
     else if (newStatus.Equals(STATUS_NEEDS_HELP))
     {
         this.thisUser.Status = User.Flag.NEEDS_HELP;
     }
     UpdateUserMessage m = new UpdateUserMessage(this.thisUser);
     Connection.getInstance().sendMessage(m.toArray());
 }
Ejemplo n.º 3
0
 private void updateStatus(User.Flag newStatus)
 {
     this.thisUser.Status = newStatus;
     string newStatusStr = "";
     switch (this.thisUser.Status)
     {
         case User.Flag.AVAILABLE:
             newStatusStr = STATUS_AVAILABLE;
             break;
         case User.Flag.BUSY:
             newStatusStr = STATUS_BUSY;
             break;
         case User.Flag.NEEDS_HELP:
             newStatusStr = STATUS_NEEDS_HELP;
             break;
         default:
             break;
     }
     updateCBStatus(newStatusStr);
     UpdateUserMessage um = new UpdateUserMessage(this.thisUser);
     byte[] m = um.toArray();
     Connection.getInstance().sendMessage(m);
 }