public MainViewModel(IAppService appService) { guiDispatcher = Dispatcher.CurrentDispatcher; _appService = appService; _appService.ConnectToServer(); _appService.ConnectToPlanesHub(OnGetPlanes, OnNewPlane, OnPlaneDeparted); _appService.ConnectToStationsHub(OnGetStations, OnStationUpdate); InitCommand(); }