示例#1
0
        /// <summary>
        /// It is responsible for loading the file theme based on user´s choice during POS installation.
        /// Please see #IN008024# for further details.
        /// </summary>
        /// <returns></returns>
        private static string GetFileTheme()
        {
            log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

            string result = string.Empty;

            try
            {
                /* IN008024 */
                //logicpos.datalayer.Enums.CustomAppOperationMode customAppOperationMode = logicpos.datalayer.Enums.CustomAppOperationMode.GetAppOperationMode(GlobalFramework.Settings["appOperationModeToken"]);
                logicpos.datalayer.Enums.CustomAppOperationMode customAppOperationMode = SettingsApp.CustomAppOperationMode;

                /*
                 * Possible themes:
                 * theme_default_default.xml
                 * theme_default_retail.xml
                 */
                result = string.Format(
                    "{0}{1}",
                    GlobalFramework.Path["themes"],
                    string.Format(
                        FileFormatThemeFile
                        , AppTheme.ToLower()                                 /* IN008024: Before, from Database : GlobalFramework.PreferenceParameters["APP_THEME"].ToLower() */
                        , customAppOperationMode.AppOperationTheme.ToLower() /*  From App.Config: Default|Coffee|Bakery|Fish|Butchery|Shoe|Clothing|Hardware */
                        )
                    );
            }
            catch (Exception ex)
            {
                log.Error("string GetFileTheme() :: " + ex.Message, ex);
            }

            return(result);
        }