예제 #1
0
        private void cmdViewRoom(byte[] packet, int size_packet)
        {
            int room_number = BitConverter.ToInt32(packet, Macro.SIZE_HEADER + Macro.SIZE_ID);

            MyRoom my_room = UserData.ud.findMyRoom(room_number);

            if (my_room == null)
            {
                return;
            }

            if (my_room.wnd != null)
            {
                my_room.wnd.Focus();
                return;
            }

            /* cmdMyRoomList 와 cmdChattingMessage 로 업데이트를 하는데 굳이 chatting log 업데이트를 해야하나
             * if (my_room.Status == Macro.ROOM_INFO_STATUS_SECRET)
             * {
             *      byte[] buffer_plain = Rijndael.decrypt(
             *                                                      // packet
             *                                                      packet,
             *                                                      // offset
             *                                                      Macro.SIZE_HEADER + Macro.SIZE_ID + 4,
             *                                                      // size
             *                                                      size_packet - (Macro.SIZE_HEADER + Macro.SIZE_ID + 4),
             *                                                      // key
             *                                                      my_room.secret_key
             *                                                      );
             *
             *      if (buffer_plain != null)
             *      {
             *              my_room.setLogChatting(
             *                      // log chatting
             *                      Encoding.UTF8.GetString(buffer_plain, 0, buffer_plain.Length)
             *                      );
             *      }
             * }
             * else
             * {
             *      my_room.setLogChatting(
             *              // log chatting
             *              Encoding.UTF8.GetString(
             *                                                      // packet
             *                                                      packet,
             *                                                      // offset
             *                                                      Macro.SIZE_HEADER + Macro.SIZE_ID + 4,
             *                                                      // size
             *                                                      size_packet - (Macro.SIZE_HEADER + Macro.SIZE_ID + 4))
             *              );
             * }
             */
            WindowChatting wnd = new WindowChatting(my_room);

            // wnd.Left =
            wnd.Show();
        }
예제 #2
0
        private void Window_inviting_Closed(object sender, EventArgs e)
        {
            WindowChatting wnd = this.Owner as WindowChatting;

            if (wnd != null)
            {
                wnd.wnd_inviting = null;
            }
        }