/// <summary> /// constructor for the add passenger window /// </summary> public wndAddPassenger() { try { InitializeComponent(); clsLogic = new clsFlightLogic(); } catch (Exception ex) { throw new Exception(MethodInfo.GetCurrentMethod().DeclaringType.Name + "." + MethodInfo.GetCurrentMethod().Name + " -> " + ex.Message); } }
public MainWindow() { try { InitializeComponent(); Application.Current.ShutdownMode = ShutdownMode.OnMainWindowClose; clsLogic = new clsFlightLogic(); wndAddPass = new wndAddPassenger(); PopulateChooseFlightCB(); } catch (Exception ex) { HandleError(MethodInfo.GetCurrentMethod().DeclaringType.Name, MethodInfo.GetCurrentMethod().Name, ex.Message); } }
/// <summary> /// The default constuctor /// </summary> public MainWindow() { try { blue = new SolidColorBrush(Color.FromRgb(0x00, 0x23, 0xFD)); red = new SolidColorBrush(Color.FromRgb(0xFD, 0x00, 0x00)); green = new SolidColorBrush(Color.FromRgb(0x00, 0xFD, 0x00)); InitializeComponent(); Application.Current.ShutdownMode = ShutdownMode.OnMainWindowClose; flightLogic = new clsFlightLogic(); List <clsFlight> flights = flightLogic.GetAllFlights(); flights.ForEach(flight => cbChooseFlight.Items.Add(flight)); } catch (Exception ex) { HandleError(MethodInfo.GetCurrentMethod().DeclaringType.Name, MethodInfo.GetCurrentMethod().Name, ex.Message); } }