Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the PresenterBuilder class.
        /// </summary>
        /// <param name="mainView">IMainView.</param>
        /// <param name="logView">ILogView.</param>
        /// <param name="optionsView">IOptionsView.</param>
        /// <param name="propertiesView">IPropertiesView.</param>
        /// <exception cref="ArgumentNullException">mainView is null.</exception>
        /// <exception cref="ArgumentNullException">logView is null.</exception>
        /// <exception cref="ArgumentNullException">optionsView is null.</exception>
        /// <exception cref="ArgumentNullException">propertiesView is null.</exception>
        public PresenterBuilder(IMainView mainView,
                                ILogView logView,
                                IOptionsView optionsView,
                                IPropertiesView propertiesView)
        {
            if (mainView == null)
            {
                throw new ArgumentNullException("mainView",
                                                Resources.ArgumentNullException);
            }
            if (logView == null)
            {
                throw new ArgumentNullException("logView",
                                                Resources.ArgumentNullException);
            }
            if (optionsView == null)
            {
                throw new ArgumentNullException("optionsView",
                                                Resources.ArgumentNullException);
            }
            if (propertiesView == null)
            {
                throw new ArgumentNullException("propertiesView",
                                                Resources.ArgumentNullException);
            }

            _viewType = ViewType.Forms;

            _mainView       = mainView;
            _logView        = logView;
            _optionsView    = optionsView;
            _propertiesView = propertiesView;
        }
Exemplo n.º 2
0
 public PropertiesViewPresenter(IPropertiesView view)
 {
     this._view = view;
     this._renderViewPresenter = new RenderViewPresenter();
     this._renderViewPresenter.RenderProgressCall += RenderProgress;
     this._renderViewPresenter.RenderCompleteCall += _view.SetRenderTime;
     this._renderViewPresenter.PropertiesUpdateCall += UpdateViewProperties;
 }
Exemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the PropertiesViewPresenter class.
        /// </summary>
        /// <param name="propertiesView">Properties view.</param>
        /// <param name="mainView">Main view.</param>
        /// <param name="fileWatcherController">FileWatcherController.</param>
        /// <param name="xmlConfigFilePath">Path of the configuration XML file.</param>
        /// <param name="xmlSchemaConfigFilePath">Path of the configuration XML Schema file.</param>
        /// <exception cref="ArgumentNullException">propertiesView is null.</exception>
        /// <exception cref="ArgumentNullException">mainView is null.</exception>
        /// <exception cref="ArgumentNullException">fileWatcherController is null.</exception>
        /// <exception cref="ArgumentNullException">xmlConfigFilePath is null.</exception>
        /// <exception cref="ArgumentNullException">xmlSchemaConfigFilePath is null.</exception>
        public PropertiesViewPresenter(IPropertiesView propertiesView,
                                       IMainView mainView,
                                       FileWatcherController fileWatcherController,
                                       string xmlConfigFilePath,
                                       string xmlSchemaConfigFilePath)
        {
            if (propertiesView == null)
            {
                throw new ArgumentNullException("propertiesView",
                                                Resources.ArgumentNullException);
            }
            if (mainView == null)
            {
                throw new ArgumentNullException("mainView",
                                                Resources.ArgumentNullException);
            }
            if (fileWatcherController == null)
            {
                throw new ArgumentNullException("fileWatcherController",
                                                Resources.ArgumentNullException);
            }
            if (xmlConfigFilePath == null)
            {
                throw new ArgumentNullException("xmlConfigFilePath",
                                                Resources.ArgumentNullException);
            }
            if (xmlSchemaConfigFilePath == null)
            {
                throw new ArgumentNullException("xmlSchemaConfigFilePath",
                                                Resources.ArgumentNullException);
            }
            _propertiesView          = propertiesView;
            _mainView                = mainView;
            _fileWatcherController   = fileWatcherController;
            _xmlConfigFilePath       = xmlConfigFilePath;
            _xmlSchemaConfigFilePath = xmlSchemaConfigFilePath;

            SubscribeToMainViewEvents();
            SubscribeToPropertiesViewEvents();
        }
Exemplo n.º 4
0
        /// <summary>
        /// Initializes a new instance of the PropertiesViewPresenter class.
        /// </summary>
        /// <param name="propertiesView">Properties view.</param>
        /// <param name="mainView">Main view.</param>
        /// <param name="fileWatcherController">FileWatcherController.</param>
        /// <param name="xmlConfigFilePath">Path of the configuration XML file.</param>
        /// <param name="xmlSchemaConfigFilePath">Path of the configuration XML Schema file.</param>
        /// <exception cref="ArgumentNullException">propertiesView is null.</exception>
        /// <exception cref="ArgumentNullException">mainView is null.</exception>
        /// <exception cref="ArgumentNullException">fileWatcherController is null.</exception>
        /// <exception cref="ArgumentNullException">xmlConfigFilePath is null.</exception>
        /// <exception cref="ArgumentNullException">xmlSchemaConfigFilePath is null.</exception>
        public PropertiesViewPresenter(IPropertiesView propertiesView,
            IMainView mainView,
            FileWatcherController fileWatcherController,
            string xmlConfigFilePath,
            string xmlSchemaConfigFilePath)
        {
            if (propertiesView == null)
            {
                throw new ArgumentNullException("propertiesView",
                                                Resources.ArgumentNullException);
            }
            if (mainView == null)
            {
                throw new ArgumentNullException("mainView",
                                                Resources.ArgumentNullException);
            }
            if (fileWatcherController == null)
            {
                throw new ArgumentNullException("fileWatcherController",
                                                Resources.ArgumentNullException);
            }
            if (xmlConfigFilePath == null)
            {
                throw new ArgumentNullException("xmlConfigFilePath",
                                                Resources.ArgumentNullException);
            }
            if (xmlSchemaConfigFilePath == null)
            {
                throw new ArgumentNullException("xmlSchemaConfigFilePath",
                                                Resources.ArgumentNullException);
            }
            _propertiesView = propertiesView;
            _mainView = mainView;
            _fileWatcherController = fileWatcherController;
            _xmlConfigFilePath = xmlConfigFilePath;
            _xmlSchemaConfigFilePath = xmlSchemaConfigFilePath;

            SubscribeToMainViewEvents();
            SubscribeToPropertiesViewEvents();
        }