private void btnReplay_Click(object sender, EventArgs e) { using (var dialog = new OpenFileDialog { DefaultExt = ARDroneTrackFileExt, Filter = ARDroneTrackFilesFilter }) { if (dialog.ShowDialog(this) == DialogResult.OK) { StopRecording(); var playerForm = new PlayerForm { FileName = dialog.FileName }; playerForm.Closed += (o, args) => _playerForms.Remove(o as PlayerForm); _playerForms.Add(playerForm); playerForm.Show(this); } } }
private void btnReplay_Click(object sender, EventArgs e) { using (var dialog = new OpenFileDialog {DefaultExt = ARDroneTrackFileExt, Filter = ARDroneTrackFilesFilter}) { if (dialog.ShowDialog(this) == DialogResult.OK) { StopRecording(); var playerForm = new PlayerForm {FileName = dialog.FileName}; playerForm.Closed += (o, args) => _playerForms.Remove(o as PlayerForm); _playerForms.Add(playerForm); playerForm.Show(this); } } }