コード例 #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);
     }
 }