private VMMainViewModel() { try { tskEndCycle = new Task(() => { Run(); }); tskEndCycle.Start(); CreateHubConnection(); strWMSGeoserverUrl = ConfigurationManager.AppSettings["WMSGeoserver"]; strRoadRoutingWebApiAddress = ConfigurationManager.AppSettings["RoadRoutingWebApiAddress"]; clsRoadRoutingWebApi.SetBaseAddress(strRoadRoutingWebApiAddress); PlayScenarioCommand = new DelegateCommand(x => PlayScenario(), Dispatcher.CurrentDispatcher); PauseScenarioCommand = new DelegateCommand(x => PauseScenario(), Dispatcher.CurrentDispatcher); StopScenarioCommand = new DelegateCommand(x => StopScenario(), Dispatcher.CurrentDispatcher); MapHomeZoomCommand = new DelegateCommand(x => MapHomeZoom_Click(), Dispatcher.CurrentDispatcher); MapLayersCommand = new DelegateCommand(x => MapLayers_Click(), Dispatcher.CurrentDispatcher); PlanningRouteCommand = new DelegateCommand(x => PlanningRoute(), Dispatcher.CurrentDispatcher); PlanningAgentsCommand = new DelegateCommand(x => PlanningAgents(), Dispatcher.CurrentDispatcher); SelectTools = new clsSelectTools(); } catch (Exception ex) { } }
private VMMainViewModel() { try { tskEndCycle = new Task(() => { Run(); }); tskEndCycle.Start(); CreateHubConnection(); strWMSGeoserverUrl = ConfigurationManager.AppSettings["WMSGeoserver"]; strRoadRoutingWebApiAddress = ConfigurationManager.AppSettings["RoadRoutingWebApiAddress"]; clsRoadRoutingWebApi.SetBaseAddress(strRoadRoutingWebApiAddress); PlayScenarioCommand = new DelegateCommand(x => PlayScenario(), Dispatcher.CurrentDispatcher); PauseScenarioCommand = new DelegateCommand(x => PauseScenario(), Dispatcher.CurrentDispatcher); StopScenarioCommand = new DelegateCommand(x => StopScenario(), Dispatcher.CurrentDispatcher); MapHomeZoomCommand = new DelegateCommand(x => MapHomeZoom_Click(), Dispatcher.CurrentDispatcher); MapLayersCommand = new DelegateCommand(x => MapLayers_Click(), Dispatcher.CurrentDispatcher); PlanningRouteCommand = new DelegateCommand(x => PlanningRoute(), Dispatcher.CurrentDispatcher); PlanningAgentsCommand = new DelegateCommand(x => PlanningAgents(), Dispatcher.CurrentDispatcher); SelectTools = new clsSelectTools(); } catch(Exception ex) { } }