コード例 #1
0
        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();
            }
        }
コード例 #2
0
 // 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>();
 }
コード例 #3
0
ファイル: App.cs プロジェクト: haefele/SpotifyRecorder
        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>();
        }
コード例 #4
0
        // 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);
        }
コード例 #5
0
        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();
        }
コード例 #6
0
 void Play_Button_Clicked(Object sender, EventArgs e)
 {
     _mediaService = DependencyService.Get <IAudioRecordingService>();
     _mediaService.Play();
 }