Пример #1
0
        void VM_SelectedCarDetailsComplete(DTCDev.Models.CarBase.CarList.CarListDetailsDataModel carDetail)
        {
            DISP_Car car = CarStorage.Instance.Cars.Where(p => p.CarModel.CarNumber == carDetail.CarNumber).FirstOrDefault();

            if (car == null)
            {
                return;
            }
            CarStorage.Instance.SelectedCar        = car;
            CarStorage.Instance.SelectedCarDetails = carDetail;
            CarDetailView view = new CarDetailView();

            CarDetailViewModel vm = new CarDetailViewModel(carDetail, car.ErrorsCount);

            view.DataContext   = vm;
            vm.ShowWorksList  += vm_ShowWorksList;
            vm.CloseViewClick += vm_CloseViewClick;
            grdContent.Children.Clear();
            grdContent.Children.Add(view);
        }
Пример #2
0
 void Instance_OnGetCarDetailComplete(DTCDev.Models.CarBase.CarList.CarListDetailsDataModel carDetail)
 {
     VM_SelectedCarDetailsComplete(carDetail);
 }