Esempio n. 1
0
        public UrlMonitoringConfigurationDialogPresenter(IUrlMonitoringConfigurationDialogView view, IUrlMonitoringConfigurationModel model)
        {
            _model = model ?? throw new ArgumentNullException(nameof(model));
            _view  = view ?? throw new ArgumentNullException(nameof(view));

            _view.ActionPoints = _model.GetActionPoints().ToList();

            _model.ConfigureInstance += _model_ConfigureInstance;
            _view.ConfiguredUrl      += _view_ConfiguredUrl;
        }
Esempio n. 2
0
        public UrlMonitoringConfigurationPresenter(IUrlMonitoringConfigurationView view, IUrlMonitoringConfigurationModel model)
        {
            _view  = view ?? throw new ArgumentNullException(nameof(view));
            _model = model ?? throw new ArgumentNullException(nameof(model));

            _view.EditUrl   += _view_EditUrl;
            _view.AddUrl    += _view_AddUrl;
            _view.DeleteUrl += _view_DeleteUrl;

            _view.Urls = new BindingList <UrlAddressMonitoringInstance>(_model.GetUrlMonitoringInstances().ToList());

            _model.InstanceAdded   += _model_InstanceAdded;
            _model.InstanceDeleted += _model_InstanceDeleted;
            _model.InstanceUpdated += _model_InstanceUpdated;
        }