Esempio n. 1
0
 public OrderView(IPresentersFactory presentersFactory,
                  ILocalizationManager localizationManager,
                  RoutePointViewModel routePointViewModel)
     : this(localizationManager)
 {
     _presentersFactory = presentersFactory;
     _routePointViewModel = routePointViewModel;
 }
        public RoutePointsOrderListView(IPresentersFactory presentersFactory,
                                        ILocalizationManager localizationManager,
                                        RoutePointViewModel routePointViewModel)
            : this()
        {
            _presentersFactory = presentersFactory;
            _localizationManager = localizationManager;
            _routePointViewModel = routePointViewModel;

            _orderListBox.LocalizationManager = _localizationManager;
        }
        private void ChangeStatusViewLoad(object sender, EventArgs e)
        {
            if (_changeStatusPresenter == null) {
                _changeStatusPresenter = _presentersFactory.CreateChangeStatusPresenter(this,
                                                                                        _routePointViewModel);

                _routePointViewModel = _changeStatusPresenter.Initialize();
                ViewContainer.RegisterLeftAction(new Save(_changeStatusPresenter));
                ViewContainer.RegisterRightAction(new Cancel(_changeStatusPresenter));

                IEnumerable<StatusViewModel> statusViewModels = _changeStatusPresenter.GetStatuses();
                foreach (var statusViewModel in statusViewModels) {
                    var radioButton = new CustomRadioButton {
                        Text = statusViewModel.Name,
                        Checked = statusViewModel.Id == _routePointViewModel.StatusId,
                        Dock = DockStyle.Top,
                        Tag = statusViewModel,
                    };

                    radioButton.CheckedEvent += RadioButtonCheckedChanged;
                    Controls.Add(radioButton);
                }
            }
        }
 public OrderPresenter CreateOrderPresenter(IOrderView orderView, RoutePointViewModel routePointViewModel)
 {
     return new OrderPresenter(orderView, _unitOfWorkFactory, _repositoryFactory, _configurationManager, _navigator, _lookUpService, routePointViewModel);
 }
 public ChangeStatusPresenter CreateChangeStatusPresenter(IChangeStatusView changeStatusView,
                                                          RoutePointViewModel routePointViewModel)
 {
     return new ChangeStatusPresenter(changeStatusView, _repositoryFactory, _unitOfWorkFactory, _navigator, routePointViewModel);
 }
 public RoutePointsOrderListPresenter CreateRoutePointsOrderListPresenter(IRoutePointsOrderListView orderListView, RoutePointViewModel routePointViewModel)
 {
     return new RoutePointsOrderListPresenter(orderListView, _repositoryFactory, _unitOfWorkFactory, _navigator, routePointViewModel);
 }
Esempio n. 7
0
 public void GoToRoutePointsOrderList(RoutePointViewModel routePointViewModel)
 {
     _container.SetView(new RoutePointsOrderListView(_presentersFactory, _localizationManager, routePointViewModel));
 }
Esempio n. 8
0
 public void GoToEditRoutePointsOrder(RoutePointViewModel routePointViewModel, OrderViewModel orderViewModel)
 {
     _container.SetView(new OrderView(_presentersFactory, _localizationManager, routePointViewModel, orderViewModel));
 }
Esempio n. 9
0
 public void GoToCreateOrderForRoutePoint(RoutePointViewModel routePointViewModel)
 {
     _container.SetView(new OrderView(_presentersFactory, _localizationManager, routePointViewModel));
 }
Esempio n. 10
0
 public void GoToChangeStatus(RoutePointViewModel routePointViewModel)
 {
     _container.SetView(new ChangeStatusView(_presentersFactory, routePointViewModel));
 }
Esempio n. 11
0
 public ChangeStatusView(IPresentersFactory presentersFactory, RoutePointViewModel routePointViewModel)
 {
     InitializeComponent();
     _presentersFactory = presentersFactory;
     _routePointViewModel = routePointViewModel;
 }