Example #1
0
        public static BookDeletePage read(BinaryReader binaryReader)
        {
            BookDeletePage newObj = new BookDeletePage();

            newObj.i_objectid = binaryReader.ReadUInt32();
            newObj.i_pageNum  = binaryReader.ReadInt32();
            return(newObj);
        }
Example #2
0
    public override bool acceptMessageData(BinaryReader messageDataReader, TreeView outputTreeView)
    {
        bool handled = true;

        PacketOpcode opcode = Util.readOpcode(messageDataReader);

        switch (opcode)
        {
        // TODO: Add all BOOK_*_RESPONSE_EVENT
        case PacketOpcode.Evt_Writing__BookData_ID: {
            BookData message = BookData.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        case PacketOpcode.Evt_Writing__BookModifyPage_ID: {
            BookModifyPage message = BookModifyPage.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        case PacketOpcode.Evt_Writing__BookAddPage_ID: {
            BookAddPage message = BookAddPage.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        case PacketOpcode.Evt_Writing__BookDeletePage_ID: {
            BookDeletePage message = BookDeletePage.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        case PacketOpcode.Evt_Writing__BookPageData_ID: {
            BookPageData message = BookPageData.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        // TODO: Evt_Writing__GetInscription_ID
        case PacketOpcode.Evt_Writing__SetInscription_ID: {
            SetInscription message = SetInscription.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        default: {
            handled = false;
            break;
        }
        }

        return(handled);
    }