private void button1_Click(object sender, EventArgs e) { MdApi md = MdApi.Instance; int ret = md.Init("*****@*****.**", "Chs771005", MDMode.MD_MODE_NULL); if (ret != 0) { //登录失败 this.label1.Text = "login error."; return; } List <DailyBar> dailys = md.GetDailyBars("SZSE.300044", "2018-01-01", "2018-08-06"); //List<DailyBar> dailys = md.GetLastNDailyBars("SZSE.300044", 10, "2016-03-28"); this.adjust(dailys); ShowData(dailys.OfType <object>().ToList()); this.label1.Text = dailys.Count.ToString(); }