예제 #1
0
 public static TripInfoBlock GetInstance(Employee employee, TripDecorator trip)
 {
     if (State == null)
     {
         State = new TripInfoBlock(employee, trip);
     }
     return(State);
 }
예제 #2
0
 private void TripsInfoButton_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         TripContentArea.Content = TripInfoBlock.GetInstance(employee, trips.Where(t => t.trip.Id == Convert.ToInt32(IdOfTripForAction.Text)).FirstOrDefault());
     }
     catch (Exception ee)
     {
         MessageBox.Show(ee.Message);
     }
 }