Exemplo n.º 1
0
        /// <summary>
        /// Attaches an Input model to an Input View.
        /// </summary>
        public void Attach(object model, object view, ExplorerPresenter explorerPresenter)
        {
            Input = model as Models.PostSimulationTools.Input;
            View = view as IInputView;
            ExplorerPresenter = explorerPresenter;
            View.BrowseButtonClicked += OnBrowseButtonClicked;

            OnModelChanged(model);  // Updates the view

            ExplorerPresenter.CommandHistory.ModelChanged += OnModelChanged;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Attaches an Input model to an Input View.
        /// </summary>
        public void Attach(object model, object view, ExplorerPresenter explorerPresenter)
        {
            Input                     = model as Models.PostSimulationTools.Input;
            View                      = view as IInputView;
            ExplorerPresenter         = explorerPresenter;
            View.BrowseButtonClicked += OnBrowseButtonClicked;

            OnModelChanged(model);  // Updates the view

            ExplorerPresenter.CommandHistory.ModelChanged += OnModelChanged;
        }
        public InputAction(ProtocolAction protocolAction, Dictionary <ClientView, IView> views, Client client, ClientDataPackageProvider clientDataPackageProvider)
        {
            _clientDataPackageProvider = clientDataPackageProvider;
            _client                = client;
            _actionHandler         = protocolAction;
            _views                 = views;
            _errorView             = views[ClientView.Error] as IErrorView;              // Potential null exception error.
            _commandListOutputView = views[ClientView.CommandList] as IUpdateOutputView; //Potenzieller Null Ausnahmen Fehler
            _inputView             = views[ClientView.Input] as IInputView;
            _serverTableView       = views[ClientView.ServerTable] as IUpdateOutputView;
            _infoOutputView        = views[ClientView.InfoOutput] as IUpdateOutputView;
            _mainMenuOutputView    = views[ClientView.MenuOutput] as IUpdateOutputView;

            _outputWrapper = new OutputWrapper();

            _inputActions = new Dictionary <string, Action <string, ICommunication> >
            {
            };

            _udpListener = new UdpClientUnit();
        }
Exemplo n.º 4
0
        public InputController(IInputView inputView)
        {
            _inputView = inputView;

            _inputView.LoadFromClipboard += CopyFromClipboard;
        }