Exemplo n.º 1
0
        public Presenter(IMessageService service, ISerialportManager portManager, IMainForm view)
        {
            _messageService = service;
              _portManager = portManager;
              _view = view;

              _view.SetPortListItems(_portManager.GetPortList());
              _view.ConnectClick += _view_ConnectClick;
              _view.DisconnectClick += _view_DisconnectClick;
            _view.ResetChartClick += _view_ResetChartClick;
              _view.PlayClick += _view_PlayClick;
              _view.StopClick += _view_StopClick;
              _view.RebootClick += _view_RebootClick;
              _view.WriteToFlashClick += _view_WriteToFlashClick;
              _view.ReadParametrsClick += _view_ReadParametrsClick;

              _portManager.dataRecived += _portManager_dataRecived;
              _portManager.PortInit();

              Wake.Pc_Init_Port();
              Wake.RX_Complete += Wake_RX_Complete;
              Wake.TX_Wpacket += Wake_TX_Wpacket;
        }