//[DllImport("Connect.dll", ExactSpelling = false, CallingConvention = CallingConvention.StdCall)]
        //private extern static void _Enc7481_Set_Encoder(UInt16 intDirection, Int32 lngValue);
        static void Main(string[] args)
        {
            //Error u = new PwdError();
            //var l = new LoginR(new Login("haha", "1234567890"), u);
            //string s = JsonHelper.GetJson(l);
            //Log(s);
            //var o = JsonHelper.ParseFromJson<LoginR>(s);
            //Log(JsonHelper.GetJson(o));

            Log("Community:");
            Community c = new Community();
            Log(c.ToJson());

            Log("Notice:");
            c = new Notice();
            Log(c.ToJson());

            Log("Enquire:");
            c = new Enquire();
            Log(c.ToJson());

            Log("Respond:");
            c = new Respond((Enquire)c);
            Log(c.ToJson());

            Log("Ack:");
            c = new Ack(c);
            Log(c.ToJson());

            Console.WriteLine("\n------Finsh------");
            Console.ReadKey();
            Console.ReadKey();
        }
 /// <summary>
 /// 从ID创建回复对象
 /// </summary>
 /// <param name="toRespond"></param>
 public Respond(Enquire toRespond)
 {
     netAttribute = Community.NetAttributes.Respond;
     respondID = toRespond.CommunityID;
 }
 /// <summary>
 /// 从对象创建回复
 /// </summary>
 /// <param name="toRespond"></param>
 /// <returns></returns>
 public static Respond GetRespond(Enquire toRespond)
 {
     return new Respond(toRespond.CommunityID);
 }