private void btnSaveRoute_Click(object sender, EventArgs e) { using (var saveFileDialog = new SaveFileDialog()) { saveFileDialog.Filter = "TCX file|*.tcx"; saveFileDialog.Title = "Save the Route"; saveFileDialog.ShowDialog(); if (saveFileDialog.FileName != "") { SaveRouteEvent?.Invoke( this, new SaveRouteEventArgs(saveFileDialog.FileName)); } } }
public void RaiseClickSaveRouteEvent(SaveRouteEventArgs args) => SaveRouteEvent.Invoke(this, args);