private void SetVisibility(RefreshVisibilityMessage message)
 {
     if (SettingsHelper.Instance.Settings.IsPinned)
     {
         Visibility = Visibility.Visible;
         return;
     }
     // at this point, it means that we are not pinned, so set the visibility accordingly
     if (message.IsVisible == null) return; //if this is null, there was an error getting active process
     Visibility = message.IsVisible.Value ? Visibility.Visible : Visibility.Collapsed;
 }
 private void SetVisibility(RefreshVisibilityMessage message)
 {
     if (!SettingsHelper.Instance.Settings.IsPinned)
         Visibility = message.IsVisible ? Visibility.Visible : Visibility.Collapsed;
 }