Exemplo 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;
        }
Exemplo n.º 3
0
        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);
                }
            }
        }
Exemplo n.º 4
0
 public OrderPresenter CreateOrderPresenter(IOrderView orderView, RoutePointViewModel routePointViewModel)
 {
     return new OrderPresenter(orderView, _unitOfWorkFactory, _repositoryFactory, _configurationManager, _navigator, _lookUpService, routePointViewModel);
 }
Exemplo n.º 5
0
 public ChangeStatusPresenter CreateChangeStatusPresenter(IChangeStatusView changeStatusView,
                                                          RoutePointViewModel routePointViewModel)
 {
     return new ChangeStatusPresenter(changeStatusView, _repositoryFactory, _unitOfWorkFactory, _navigator, routePointViewModel);
 }
Exemplo n.º 6
0
 public RoutePointsOrderListPresenter CreateRoutePointsOrderListPresenter(IRoutePointsOrderListView orderListView, RoutePointViewModel routePointViewModel)
 {
     return new RoutePointsOrderListPresenter(orderListView, _repositoryFactory, _unitOfWorkFactory, _navigator, routePointViewModel);
 }
Exemplo n.º 7
0
 public void GoToRoutePointsOrderList(RoutePointViewModel routePointViewModel)
 {
     _container.SetView(new RoutePointsOrderListView(_presentersFactory, _localizationManager, routePointViewModel));
 }
Exemplo n.º 8
0
 public void GoToEditRoutePointsOrder(RoutePointViewModel routePointViewModel, OrderViewModel orderViewModel)
 {
     _container.SetView(new OrderView(_presentersFactory, _localizationManager, routePointViewModel, orderViewModel));
 }
Exemplo n.º 9
0
 public void GoToCreateOrderForRoutePoint(RoutePointViewModel routePointViewModel)
 {
     _container.SetView(new OrderView(_presentersFactory, _localizationManager, routePointViewModel));
 }
Exemplo n.º 10
0
 public void GoToChangeStatus(RoutePointViewModel routePointViewModel)
 {
     _container.SetView(new ChangeStatusView(_presentersFactory, routePointViewModel));
 }
Exemplo n.º 11
0
 public ChangeStatusView(IPresentersFactory presentersFactory, RoutePointViewModel routePointViewModel)
 {
     InitializeComponent();
     _presentersFactory = presentersFactory;
     _routePointViewModel = routePointViewModel;
 }