示例#1
0
        private int check_proto_type()
        {
            string content = "";

            if ((content = Proto.parseJson(recv_buffer)) != "")
            {
                rich_text_recv_data.Text = content;
                return(proto_type_map["json"]);
            }
            else if ((content = Proto.parseXML(recv_buffer)) != "")
            {
                rich_text_recv_data.Text = content;
                return(proto_type_map["xml"]);
            }
            else if (hex_handle())
            {
                return(proto_type_map["hex"]);
            }
            else if (is_hex_str())
            {
                return(proto_type_map["hex_string"]);
            }
            return(proto_type_map["string"]);
        }
示例#2
0
 private void xml_handle()
 {
     rich_text_recv_data.Text = Proto.parseXML(recv_buffer);
 }