private void btnRelease_Click(object sender, EventArgs e) { if (md != null) { md.Dispose(); md = null; } }
private void button1_Click(object sender, EventArgs e) { if (md == null) { md = new CTPZQ.CTPMDAdapter(); md.OnCtpFrontEvent += md_OnCtpFrontEvent; md.OnCtpRspEvent += md_OnCtpRspEvent; md.OnCtpRtnEvent += md_OnCtpRtnEvent; md.RegisterFront(FRONT_ADDR); md.Init(); } }