Пример #1
0
 public NewRoutePointPresenter CreateNewRoutePointPresenter(
     INewRoutePointView newRoutePointView, RouteViewModel routeViewModel)
 {
     return new NewRoutePointPresenter(newRoutePointView, _unitOfWorkFactory,
                                       _repositoryFactory, _modelsFactory, _configurationManager, _navigator,
                                       _lookUpService, routeViewModel);
 }
Пример #2
0
        public RouteView(IPresentersFactory presentersFactory, ILocalizationManager localizationManager,
                         RouteViewModel routeViewModel)
            : this()
        {
            _presentersFactory = presentersFactory;
            _localizationManager = localizationManager;
            _routeViewModel = routeViewModel;

            datePicker.CustomFormat = _localizationManager.Localization.GetLocalizedValue("dateformat");
            routePointListBox.LocalizationManager = _localizationManager;
        }
Пример #3
0
        public NewRoutePointView(IPresentersFactory presentersFactory, ILocalizationManager localizationManager,
                                 RouteViewModel routeViewModel)
            : this()
        {
            _presentersFactory = presentersFactory;
            _localizationManager = localizationManager;
            _routeViewModel = routeViewModel;

            _customerLabel.Text = _localizationManager.Localization.GetLocalizedValue(_customerLabel.Text);
            _shippingAddressLabel.Text =
                _localizationManager.Localization.GetLocalizedValue(_shippingAddressLabel.Text);
        }
Пример #4
0
        private void RouteViewLoad(object sender, EventArgs e)
        {
            if (_routePresenter == null) {
                routePointListBox.ItemSelected += ItemSelected;
                routePointListBox.ItemDataNeeded += ItemDataNeeded;

                _routePresenter = _presentersFactory.CreateRoutePresenter(this, _routeViewModel);
                _viewModel = _routePresenter.Initialize();
                ViewContainer.RegisterLeftAction(new StubAction());
                ViewContainer.RegisterRightAction(new Back(_routePresenter));

                datePicker.Value = _viewModel.Date;
                routePointListBox.SetListSize(_routePresenter.InitializeListSize());
                datePicker.ValueChanged += DateChanged;
            }
        }
Пример #5
0
 public RoutePresenter CreateRoutePresenter(IRouteView routeView, RouteViewModel routeViewModel)
 {
     return new RoutePresenter(routeView,
                               _unitOfWorkFactory,
                               _repositoryFactory,
                               _modelsFactory,
                               _configurationManager,
                               _navigator,
                               routeViewModel);
 }
Пример #6
0
 public void GoToRoute(RouteViewModel routeViewModel)
 {
     _container.SetView(new RouteView(_presentersFactory, _localizationManager, routeViewModel));
 }