public void Dispose() { if (this.disposed) { return; } this.disposed = true; if (this.timer != null) { this.timer.Dispose(); this.timer = null; } if (this.interactionService != null) { this.interactionService.InteractionOccured -= InteractionService_InteractionOccured; this.interactionService = null; } if (this.speakService != null) { this.speakService = null; } }
public SettingsViewModel(ISpeakService speakService, ILanguageService languageService) { this.speakService = speakService; this.languageService = languageService; SetupLanguages(); }
public MainViewModel(IInteractionService interactionService, ISoundService soundService, ISpeakService speakService, ILanguageService languageService) { if(interactionService == null) throw new ArgumentNullException(nameof(interactionService)); if(speakService == null) throw new ArgumentNullException(nameof(speakService)); if(languageService == null) throw new ArgumentNullException(nameof(languageService)); if(soundService == null) throw new ArgumentNullException(nameof(soundService)); this.interactionService = interactionService; this.soundService = soundService; this.speakService = speakService; this.languageService = languageService; this.timer = new Timer((obj) => { CheckFiguresToRemove(); }, null, timerDelay, timerDelay); this.interactionService.InteractionOccured += InteractionService_InteractionOccured; //play the intro sound this.soundService.PlayEmbebedResourceAsync(introSound); }
public void Dispose() { if (disposed) { return; } disposed = true; timer?.Dispose(); timer = null; if (_interactionService != null) { _interactionService.InteractionOccured -= InteractionService_InteractionOccured; _interactionService = null; } _speakService = null; }
public void Dispose() { if(this.disposed) return; this.disposed = true; if(this.timer != null) { this.timer.Dispose(); this.timer = null; } if(this.interactionService != null) { this.interactionService.InteractionOccured -= InteractionService_InteractionOccured; this.interactionService = null; } if(this.speakService != null) { this.speakService = null; } }
public MainViewModel( IInteractionService interactionService, ISoundService soundService, ISpeakService speakService, ILanguageService languageService, IDeviceService deviceService) { this.interactionService = interactionService; this.soundService = soundService; this.speakService = speakService; this.languageService = languageService; this.deviceService = deviceService; this.timer = new Timer((obj) => { CheckFiguresToRemove(); }, null, timerDelay, timerDelay); this.interactionService.InteractionOccured += InteractionService_InteractionOccured; //play the intro sound this.soundService.PlayEmbebedResourceAsync(introSound); }
public MainViewModel() { _speakService = DependencyService.Get <ISpeakService>(); _soundService = DependencyService.Get <ISoundService>(); _languageService = DependencyService.Get <ILanguageService>(); if (_speakService == null) { throw new ArgumentNullException(nameof(_speakService)); } if (_languageService == null) { throw new ArgumentNullException(nameof(_languageService)); } if (_soundService == null) { throw new ArgumentNullException(nameof(_soundService)); } timer = new Timer((obj) => { CheckFiguresToRemove(); }, null, timerDelay, timerDelay); //check native interactionService var interactionService = DependencyService.Get <IInteractionService>(); if (interactionService != null) { HookInterationService(interactionService); } //play the intro sound _soundService.PlayEmbebedResourceAsync(introSound); }
public MainViewModel(IInteractionService interactionService, ISoundService soundService, ISpeakService speakService, ILanguageService languageService) { if (interactionService == null) { throw new ArgumentNullException(nameof(interactionService)); } if (speakService == null) { throw new ArgumentNullException(nameof(speakService)); } if (languageService == null) { throw new ArgumentNullException(nameof(languageService)); } if (soundService == null) { throw new ArgumentNullException(nameof(soundService)); } this.interactionService = interactionService; this.soundService = soundService; this.speakService = speakService; this.languageService = languageService; this.timer = new Timer((obj) => { CheckFiguresToRemove(); }, null, timerDelay, timerDelay); this.interactionService.InteractionOccured += InteractionService_InteractionOccured; //play the intro sound this.soundService.PlayEmbebedResourceAsync(introSound); }