// public ActionService(ISelectedFileService selectedFileService, IAudioPlaybackService audioPlaybackService, IAppSettingService appSettingService) public ActionService() { this.selectedFileService = UnityHandler.UnityContainer.Resolve <ISelectedFileService>(); this.appSettingService = UnityHandler.UnityContainer.Resolve <IAppSettingService>(); this.audioPlaybackService = UnityHandler.UnityContainer.Resolve <IAudioPlaybackService>(); this.audioRecordingService = UnityHandler.UnityContainer.Resolve <IAudioRecordingService>(); }
public OutputPathControl() { DataContext = this; InitializeComponent(); if (DesignerProperties.GetIsInDesignMode(this)) { this.actionService = new DesignerActionService(); this.appSettingService = new DesignerAppSettingService(); this.audioRecordingService = new DesignerAudioRecordingService(); this.selectedFileService = new DesignerSelectedFileService(); OutputPathWithFilePattern = audioRecordingService.GetTargetPathTemplateString(); return; } else { // ToDo: Evil Hack to have the cake (see actual design in design mode) and eat it too (have different styles at runtime) this.Resources = null; this.actionService = UnityHandler.UnityContainer.Resolve <IActionService>(); this.appSettingService = UnityHandler.UnityContainer.Resolve <IAppSettingService>(); this.audioRecordingService = UnityHandler.UnityContainer.Resolve <IAudioRecordingService>(); SelectedFileService = UnityHandler.UnityContainer.Resolve <ISelectedFileService>(); appSettingService.PropertyChanged += AppSettingService_PropertyChanged; UpdateOutputPathWithFileNamePattern(); } }
// public ActionService(ISelectedFileService selectedFileService, IAudioPlaybackService audioPlaybackService, IAppSettingService appSettingService) public ActionService() { this.selectedFileService = UnityHandler.UnityContainer.Resolve <ISelectedFileService>(); this.appSettingService = UnityHandler.UnityContainer.Resolve <IAppSettingService>(); this.audioPlaybackService = UnityHandler.UnityContainer.Resolve <IAudioPlaybackService>(); this.audioRecordingService = UnityHandler.UnityContainer.Resolve <IAudioRecordingService>(); this.hotkeyService = UnityHandler.UnityContainer.Resolve <IApplicationHotkeyService>(); hotkeyService.ResetAndReadHotkeysFromConfig(this); }