Exemple #1
0
        private void HandleFirstStartAndUpdates(IActionService actionService, IAppSettingService appSettingService, IApplicationHotkeyService hotkeyService, bool firstTimeUser)
        {
            if (appSettingService.CheckForUpdateOnStart)
            {
                Task.Run(() => { actionService.CheckForUpdates(showMessages: false); });
            }

            var     currentFileVersion   = new Version(ThisAssembly.AssemblyFileVersion);
            Version lastInstalledVersion = appSettingService.LastInstalledVersion;

            appSettingService.LastInstalledVersion = currentFileVersion;
            hotkeyService.ResetAndReadHotkeysFromConfig();

            if (firstTimeUser)
            {
                actionService.ShowNewToApplicationWindow();
            }
            else if (currentFileVersion.CompareTo(lastInstalledVersion) > 0)
            {
                actionService.ShowNewToVersionDialog(currentFileVersion, lastInstalledVersion);
            }
            else if (appSettingService.ShowTipsAtApplicationStart)
            {
                actionService.ShowRandomApplicationTip();
            }
        }
Exemple #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>();
            this.hotkeyService         = UnityHandler.UnityContainer.Resolve <IApplicationHotkeyService>();

            hotkeyService.ResetAndReadHotkeysFromConfig(this);
        }