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>(); }
public App(ISpotifyService spotifyService, IAudioRecordingService recordingService, ISongWriter songWriter, IID3TagService id3TagService) { this._spotifyService = spotifyService; this._recordingService = recordingService; this._songWriter = songWriter; this._id3TagService = id3TagService; this._recordedSongs = new List<Song>(); }
// 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); }
public ApplicationHotkeyService( ISimpleGlobalHotkeyService globalHotkeyService, IAppSettingService appSettingService, IAudioRecordingService audioRecordingService, IAudioPlaybackService audioPlaybackService, IActionService actionService) { this.globalHotkeyService = globalHotkeyService; this.appSettingService = appSettingService; this.audioRecordingService = audioRecordingService; this.audioPlaybackService = audioPlaybackService; this.actionService = actionService; //ResetAndReadHotkeysFromConfig(); }
void Play_Button_Clicked(Object sender, EventArgs e) { _mediaService = DependencyService.Get <IAudioRecordingService>(); _mediaService.Play(); }