コード例 #1
0
        private static bool IsRoamingSetting(SettingsProperty setting)
        {
            bool flag  = !ApplicationSettingsBase.IsClickOnceDeployed(AppDomain.CurrentDomain);
            bool flag2 = false;

            if (flag)
            {
                SettingsManageabilityAttribute attribute = setting.Attributes[typeof(SettingsManageabilityAttribute)] as SettingsManageabilityAttribute;
                flag2 = (attribute != null) && (0 == 0);
            }
            return(flag2);
        }
コード例 #2
0
        /// <devdoc>
        ///     Indicates whether a setting is roaming or not.
        /// </devdoc>
        private static bool IsRoamingSetting(SettingsProperty setting)
        {
            // Roaming is not supported in Clickonce deployed apps, since they don't have roaming config files.
            bool roamingSupported = !ApplicationSettingsBase.IsClickOnceDeployed(AppDomain.CurrentDomain);
            bool isRoaming        = false;

            if (roamingSupported)
            {
                SettingsManageabilityAttribute manageAttr = setting.Attributes[typeof(SettingsManageabilityAttribute)] as SettingsManageabilityAttribute;
                isRoaming = manageAttr != null && ((manageAttr.Manageability & SettingsManageability.Roaming) == SettingsManageability.Roaming);
            }

            return(isRoaming);
        }