Update the FormRegionPrivacyStatus after ForceProtection status change OUT-294
authorThomas
Wed, 23 Aug 2017 12:28:09 +0200
branchOUT-294
changeset 1799caba7a4fb829
parent 1797 804480ce0270
child 1800 488687f7d5a8
Update the FormRegionPrivacyStatus after ForceProtection status change
UI/FormRegionPrivacyStatus.cs
UI/RibbonCustomizations.cs
     1.1 --- a/UI/FormRegionPrivacyStatus.cs	Tue Aug 22 16:38:23 2017 +0200
     1.2 +++ b/UI/FormRegionPrivacyStatus.cs	Wed Aug 23 12:28:09 2017 +0200
     1.3 @@ -242,6 +242,23 @@
     1.4          }
     1.5  
     1.6          /// <summary>
     1.7 +        /// Resets the Enabled status of this form region and recalculates the rating if necessary.
     1.8 +        /// </summary>
     1.9 +        /// <param name="enable">Whether to enable the form region.</param>
    1.10 +        public void UpdateFormRegion(bool enable)
    1.11 +        {
    1.12 +            this.SetIsEnabled(enable);
    1.13 +
    1.14 +            // Refresh the UI
    1.15 +            if (enable)
    1.16 +            {
    1.17 +                this.ResolveAllRecipients();
    1.18 +                this.RequestRatingAndUIUpdate();
    1.19 +                RibbonCustomizations.Invalidate();
    1.20 +            }
    1.21 +        }
    1.22 +
    1.23 +        /// <summary>
    1.24          /// Workaround method to update the current inspector window. This is done by moving the mail item
    1.25          /// to a temporary folder first and then back to the current folder. Both folders CANNOT be the same.
    1.26          /// As a fallback, the mail item stays in the temporary folder if moving back to the current folder
     2.1 --- a/UI/RibbonCustomizations.cs	Tue Aug 22 16:38:23 2017 +0200
     2.2 +++ b/UI/RibbonCustomizations.cs	Wed Aug 23 12:28:09 2017 +0200
     2.3 @@ -343,7 +343,7 @@
     2.4                                          if ((formRegions != null) &&
     2.5                                              (formRegions.FormRegionPrivacyStatus != null))
     2.6                                          {
     2.7 -                                            formRegions.FormRegionPrivacyStatus.RequestRatingAndUIUpdate();
     2.8 +                                            formRegions.FormRegionPrivacyStatus.UpdateFormRegion((bool)value);
     2.9                                          }
    2.10                                      }
    2.11