Esempio n. 1
0
        /// <summary>
        /// Resolves a param control value and applies its setting
        /// </summary>
        /// <param name="param"></param>
        void AddParamSetting(ParamControl param)
        {
            if (param == null || string.IsNullOrEmpty(param.Name))
            {
                return;
            }
            string key = param.Name.ToLowerInvariant();

            switch (key)
            {
            case "profilesize":
                ProfileSize = new ViewSize(param.Value);
                break;

            case "homesize":
                HomeSize = new ViewSize(param.Value);
                break;

            case "canvassize":
                CanvasSize = new ViewSize(param.Value);
                break;

            case "profilelocation":
                ProfileLocation = param.Value;
                break;
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Resolves a param control value and applies its setting
        /// </summary>
        /// <param name="param"></param>
        void AddParamSetting(ParamControl param)
        {
            if (param == null || string.IsNullOrEmpty(param.Name))
            {
                return;
            }
            string key = param.Name.ToLowerInvariant();

            switch (key)
            {
            case "el_escaping":
                if ("html".Equals(param.Value, StringComparison.InvariantCultureIgnoreCase))
                {
                    this.EL_Escaping = EL_Escaping.Html;
                }
                else
                {
                    this.EL_Escaping = EL_Escaping.None;
                }
                break;

            case "userpref_escaping":
                if ("html".Equals(param.Value, StringComparison.InvariantCultureIgnoreCase))
                {
                    this.UserPrefEscaping = UserPrefEscaping.Html;
                }
                else
                {
                    this.UserPrefEscaping = UserPrefEscaping.None;
                }
                break;
            }
        }
Esempio n. 3
0
        /// <summary>
        /// Resolves a param control value and applies its setting
        /// </summary>
        /// <param name="param"></param>
        void AddParamSetting(ParamControl param)
        {
            if (param == null || string.IsNullOrEmpty(param.Name))
            {
                return;
            }
            string key = param.Name.ToLowerInvariant();

            switch (key)
            {
            case "agerestriction":
                int val = 0;
                if (Int32.TryParse(param.Value, out val))
                {
                    AppAgeRestriction = val;
                }
                else
                {
                    if (string.IsNullOrEmpty(param.Value))
                    {
                        AppAgeRestriction = 0;
                    }
                    else
                    {
                        if (param.Value.Equals("over21", StringComparison.InvariantCultureIgnoreCase))
                        {
                            AppAgeRestriction = 2;
                        }
                        else if (param.Value.Equals("over18", StringComparison.InvariantCultureIgnoreCase))
                        {
                            AppAgeRestriction = 1;
                        }
                        else
                        {
                            AppAgeRestriction = 0;
                        }
                    }
                }
                break;

            case "appcategory1":
            case "appcategory2":
                ushort idVal;
                if (ushort.TryParse(param.Value, out idVal))
                {
                    if (key == "appcategory1")
                    {
                        this.PrimaryCategoryId = idVal;
                    }
                    else
                    {
                        this.SecondaryCategoryId = idVal;
                    }
                }
                break;
            }
        }
Esempio n. 4
0
        /// <summary>
        /// Resolves a param control value and applies its setting
        /// </summary>
        /// <param name="param"></param>
        void AddParamSetting(ParamControl param)
        {
            if (param == null || string.IsNullOrEmpty(param.Name))
            {
                return;
            }
            string key = param.Name.ToLowerInvariant();

            switch (key)
            {
            case PARAM_REQUIRE_LIBRARY:
                AddExternalTemplate(param.InnerMarkup);
                break;
            }
        }