/// <summary> /// Click event for "routeComboBox" /// </summary> /// <param name="sender">the object sending the event</param> /// <param name="e">event arguments</param> private void RouteComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (RouteComboBox.SelectedIndex > -1) { ChangeRouteEventArgs changeRouteEventArgs = new ChangeRouteEventArgs(flightCode, FormatDate(DateTime.Now), ((ComboBoxItem)RouteComboBox.SelectedItem).Content.ToString()); OnNewChangeRoute(changeRouteEventArgs); } }
/// <summary> /// This method is responsible for logging that a new Flight has changed it´s route /// </summary> /// <param name="sender">the object sending the event</param> /// <param name="landingEventArgs">event arguments</param> private void ChangeRouteHandler(object sender, ChangeRouteEventArgs changeEventArgs) { FlightsListView.Items.Add(changeEventArgs); }
/// <summary> /// Reise Change Route event /// </summary> /// <param name="args">arguments for the event</param> public void OnNewChangeRoute(ChangeRouteEventArgs args) { changeRouteEvent?.Invoke(this, args); }