taskbar notifications only when VS is in background
This commit is contained in:
		
							parent
							
								
									de8f212389
								
							
						
					
					
						commit
						392272ff66
					
				
					 1 changed files with 12 additions and 10 deletions
				
			
		| 
						 | 
				
			
			@ -102,6 +102,11 @@
 | 
			
		|||
 | 
			
		||||
        private void HandleEventSafe(SoundPlayer soundPlayer, string messageText)
 | 
			
		||||
        {
 | 
			
		||||
            if (!ShouldPerformNotificationAction())
 | 
			
		||||
            {
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            PlaySoundSafe(soundPlayer);
 | 
			
		||||
            ShowNotifyMessage(messageText);
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			@ -136,8 +141,6 @@
 | 
			
		|||
        }
 | 
			
		||||
 | 
			
		||||
        private void PlaySoundSafe(SoundPlayer soundPlayer)
 | 
			
		||||
        {
 | 
			
		||||
            if (ShouldPlaySound())
 | 
			
		||||
        {
 | 
			
		||||
            try
 | 
			
		||||
            {
 | 
			
		||||
| 
						 | 
				
			
			@ -148,9 +151,8 @@
 | 
			
		|||
                ActivityLog.LogError(GetType().FullName, ex.Message);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        private bool ShouldPlaySound()
 | 
			
		||||
        private bool ShouldPerformNotificationAction()
 | 
			
		||||
        {
 | 
			
		||||
            if (!Options.IsBeepOnlyWhenVisualStudioIsInBackground)
 | 
			
		||||
            {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue