Exemplo n.º 1
0
        public static AppOperationMode GetAppMode()
        {
            AppOperationMode result = AppOperationMode.Default;
            string           appOperationModeToken = GlobalFramework.Settings["appOperationModeToken"];

            try
            {
                if (!string.IsNullOrEmpty(appOperationModeToken))
                {
                    /* IN008024 */
                    CustomAppOperationMode customAppOperationMode = CustomAppOperationMode.GetAppOperationMode(appOperationModeToken);
                    result = (AppOperationMode)Enum.Parse(typeof(AppOperationMode), customAppOperationMode.AppOperationTheme); //TO DO
                    //result = (AppOperationMode)Enum.Parse(typeof(AppOperationMode), appOperationModeToken);
                    _log.Debug("AppOperationMode GetAppMode() :: '" + appOperationModeToken + "' with '" + result + "' AppOperationMode");
                }
            }
            catch (Exception ex)
            {
                /* IN009036 */
                _log.Error(String.Format("AppOperationMode GetAppMode() :: [{0}]: {1}", appOperationModeToken, ex.Message));
            }

            return(result);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Based on "appOperationModeToken" key it returns the proper CustomAppOperationMode for app operation mode.
 /// Please see #IN008024# for further details.
 /// </summary>
 /// <returns></returns>
 public static CustomAppOperationMode GetCustomAppOperationMode()
 {
     return(CustomAppOperationMode.GetAppOperationMode(GlobalFramework.Settings["appOperationModeToken"]));
 }