コード例 #1
0
        public GlobalSettingsPresenter(
            IGlobalSettingsView view,
            ITranslator translator,
            IGlobalSettingsRepository globalSettingsRepository,
            IResourceHandler resourceHandler)
        {
            if (view == null)
            {
                throw new ArgumentNullException("view");
            }
            if (translator == null)
            {
                throw new ArgumentNullException("translator");
            }
            if (globalSettingsRepository == null)
            {
                throw new ArgumentNullException("globalSettingsRepository");
            }
            if (resourceHandler == null)
            {
                throw new ArgumentNullException("resourceHandler");
            }
            _view       = view;
            _translator = translator;
            _globalSettingsRepository = globalSettingsRepository;
            _resourceHandler          = resourceHandler;

            _view.SaveGlobalSettings  += SaveGlobalSettings;
            _view.ResetGlobalSettings += ResetGlobalSettings;
        }
コード例 #2
0
        public GlobalSettingsPresenter(
            IGlobalSettingsView view,
            ITranslator translator,
            IGlobalSettingsRepository globalSettingsRepository,
            IResourceHandler resourceHandler)
        {
            if (view == null) throw new ArgumentNullException("view");
            if (translator == null) throw new ArgumentNullException("translator");
            if (globalSettingsRepository == null) throw new ArgumentNullException("globalSettingsRepository");
            if (resourceHandler == null) throw new ArgumentNullException("resourceHandler");
            _view = view;
            _translator = translator;
            _globalSettingsRepository = globalSettingsRepository;
            _resourceHandler = resourceHandler;

            _view.SaveGlobalSettings += SaveGlobalSettings;
            _view.ResetGlobalSettings += ResetGlobalSettings;
        }