/// <summary> /// Initializes a new instance of the MainViewModel class. /// </summary> public MainViewModel(IKioskInteractionService interactionService, ISpeechService speechService, IItemInteractionService manipulationService, IConfigurationProvider configurationProvider) { this.RowWidth = DEPTH_WIDTH; _kioskInteractionService = interactionService; _kioskInteractionService.KioskStateChanged += _kioskInteractionService_KioskStateChanged; _kioskInteractionService.BodyTrackUpdate += _kioskInteractionService_BodyTrackUpdate; BodyTrack = new ObservableCollection <double>() { -75, -75, -75, -75, -75, -75 }; _itemInteractionService = manipulationService; _itemInteractionService.ServiceStateChanged += _itemInteractionService_ServiceStateChanged; _itemInteractionService.ItemInteraction += _itemInteractionService_ItemInteraction; _itemInteractionService.PropertyChanged += _itemInteractionService_PropertyChanged; _speechService = speechService; _speechService.SpeechRecognized += _speechService_SpeechRecognized; _speechService.SpeechRejected += _speechService_SpeechRejected; _speechService.StartListening(); _speechService.Speak("Kiosk Ready"); Messenger.Default.Register <string>(this, (msg) => { if (msg == "SPECIALSTOP") { Debug.WriteLine("MVM SPECIALSTOP " + _lastKioskState); this.KioskState = "CloseSpecial"; } }); this.OpenObjectDetection = new RelayCommand(() => { ShowObjectDetectionWindow(true); }); _configurationProvider = configurationProvider; _configurationProvider.ConfigurationSettingsChanged += _configurationProvider_ConfigurationSettingsChanged; GetConfig(); // Show Object Detection Window on start up ShowObjectDetectionWindow(); }
/// <summary> /// Initializes a new instance of the MainViewModel class. /// </summary> public MainViewModel(IKioskInteractionService interactionService, ISpeechService speechService, IItemInteractionService manipulationService, IConfigurationProvider configurationProvider) { this.RowWidth = DEPTH_WIDTH; _kioskInteractionService = interactionService; _kioskInteractionService.KioskStateChanged += _kioskInteractionService_KioskStateChanged; _kioskInteractionService.BodyTrackUpdate += _kioskInteractionService_BodyTrackUpdate; BodyTrack = new ObservableCollection<double>() { -75, -75, -75, -75, -75, -75 }; _itemInteractionService = manipulationService; _itemInteractionService.ServiceStateChanged += _itemInteractionService_ServiceStateChanged; _itemInteractionService.ItemInteraction += _itemInteractionService_ItemInteraction; _itemInteractionService.PropertyChanged += _itemInteractionService_PropertyChanged; _speechService = speechService; _speechService.SpeechRecognized += _speechService_SpeechRecognized; _speechService.SpeechRejected += _speechService_SpeechRejected; _speechService.StartListening(); _speechService.Speak("Kiosk Ready"); Messenger.Default.Register<string>(this, (msg) => { if (msg == "SPECIALSTOP") { Debug.WriteLine("MVM SPECIALSTOP " + _lastKioskState); this.KioskState = "CloseSpecial"; } }); this.OpenObjectDetection = new RelayCommand(() => { ShowObjectDetectionWindow(true); }); _configurationProvider = configurationProvider; _configurationProvider.ConfigurationSettingsChanged += _configurationProvider_ConfigurationSettingsChanged; GetConfig(); // Show Object Detection Window on start up ShowObjectDetectionWindow(); }
public MediaContentViewModel(IKioskInteractionService interactionService, IDemographicsService demographicSrv, IContentManagement<ZoneFileMetaData> contentManagement, IItemInteractionService itemInteractionService) { ItemState = ManipulationStates.NoTrack; _interactionService = interactionService; _interactionService.KioskStateChanged += _interactionService_KioskStateChanged; _demographicsService = demographicSrv; _demographicsService.DemographicsReceived += _demographicsService_DemographicsReceived; _demographicsService.DemographicsProcessingFailure += _demographicsService_DemographicsProcessingFailure; _contentManagement = contentManagement; _itemInteractionService = itemInteractionService; _itemInteractionService.ItemInteraction += _itemInteractionService_ItemStateChanged; ConfigurationProvider cp = new ConfigurationProvider(); IConfigSettings cs = cp.Load(); EnableDiagnostics = cs.EnableDiagnostics; }
public MediaContentViewModel(IKioskInteractionService interactionService, IDemographicsService demographicSrv, IContentManagement<ZoneFileMetaData> contentManagement, IItemInteractionService itemInteractionService) { ItemState = ManipulationStates.NoTrack; _interactionService = interactionService; _interactionService.KioskStateChanged += _interactionService_KioskStateChanged; _demographicsService = demographicSrv; _demographicsService.DemographicsReceived += _demographicsService_DemographicsReceived; _demographicsService.DemographicsProcessingFailure += _demographicsService_DemographicsProcessingFailure; _contentManagement = contentManagement; _itemInteractionService = itemInteractionService; _itemInteractionService.ItemInteraction += _itemInteractionService_ItemStateChanged; ConfigurationProvider cp = new ConfigurationProvider(); IConfigSettings cs = cp.Load(); EnableDiagnostics = cs.EnableDiagnostics; //ClosestZone = cs.ZoneDefinitions.Where(x => x.MaximumRange == cs.ZoneDefinitions.Min(o => o.MaximumRange)).First().Name; }
public MediaContentViewModel(IKioskInteractionService interactionService, IDemographicsService demographicSrv, IContentManagement <ZoneFileMetaData> contentManagement, IItemInteractionService itemInteractionService) { ItemState = ManipulationStates.NoTrack; _interactionService = interactionService; _interactionService.KioskStateChanged += _interactionService_KioskStateChanged; _demographicsService = demographicSrv; _demographicsService.DemographicsReceived += _demographicsService_DemographicsReceived; _demographicsService.DemographicsProcessingFailure += _demographicsService_DemographicsProcessingFailure; _contentManagement = contentManagement; _itemInteractionService = itemInteractionService; _itemInteractionService.ItemInteraction += _itemInteractionService_ItemStateChanged; ConfigurationProvider cp = new ConfigurationProvider(); IConfigSettings cs = cp.Load(); EnableDiagnostics = cs.EnableDiagnostics; }
public TouchScreenViewModel(IKioskInteractionService kioskInteractionService) { _kioskInteractionService = kioskInteractionService; _kioskInteractionService.KioskStateChanged += _kioskInteractionService_KioskStateChanged; }
public TouchScreenViewModel(IKioskInteractionService kioskInteractionService) { _kioskInteractionService = kioskInteractionService; _kioskInteractionService.KioskStateChanged += _kioskInteractionService_KioskStateChanged; }