private void tsmReadGpsData_Click(object sender, EventArgs e) { using (var form = new GpsDataSelector()) { if (form.ShowDialog(this) == System.Windows.Forms.DialogResult.OK) { var ps = TrackPointDao.GetTrackPoints(form.CarName, form.StartTime, form.EndTime); this.LoadTrackPoint(ps); } } }