Exemplo n.º 1
0
 private static void LogAssociationError()
 {
     App.Logger.Log(Logging.LogPriority.Error, "Error while (un)associating extension (is admin: {0}, elevated: {1}, " +
                    "is in admin group: {2}, integrity level: {3})", UACElevationHelper.IsRunAsAdmin(),
                    UACElevationHelper.IsProcessElevated(), UACElevationHelper.IsUserInAdminGroup(),
                    UACElevationHelper.GetProcessIntegrityLevel());
 }
Exemplo n.º 2
0
        private void UpdateAssociateExtensionMenuItem()
        {
            bool associated = ExtensionAssociation.IsExtensionAssociated;

            AssociateExtensionMenuItem.Tag    = associated;
            AssociateExtensionMenuItem.Header = associated ? "Unassociate archive extension" : "Associate archive extension";

            if (!UACElevationHelper.IsRunAsAdmin())
            {
                var image = new Image();
                image.Source = StockIcon.Shield;
                AssociateExtensionMenuItem.Icon = image;
            }
        }