/// <summary>
 /// Gets a row from resources using ResourceManager
 ///
 /// {Binding Source={StaticResource localisation}, Path=.[MainScreenResources.IntroTextLine1]}
 /// </summary>
 /// <param name="key">The key to extract from the resources in the format [ManagerName].[ResourceKey]</param>
 /// <returns></returns>
 public string this[string key]
 {
     get
     {
         if (!ValidateKey(key))
         {
             throw new ArgumentException(@"Is the correct string format specified [ManagerName].[ResourceKey]");
         }
         return(DesignHelpers.IsInDesignMode ? "[res]" : ResourceManagerService.GetResourceString(GetManagerKey(key), GetResourceKey(key)));
     }
 }
Example #2
0
        /// <summary>
        /// Получение строки из ресурса с помощью ResourceManager
        ///
        /// {Binding Source={StaticResource localisation}, Path=.[MainScreenResources.IntroTextLine1]}
        /// </summary>
        /// <param name="key">Ключ, который нужно извлечь из ресурсов в формате [ManagerName].[ResourceKey]</param>
        /// <returns></returns>
        public string this[string key] {
            get {
                if (!ValidateKey(key))
                {
                    throw new ArgumentException(@"Указан не правильный формат строки. [ManagerName].[ResourceKey]");
                }
                if (DesignHelpers.IsInDesignMode)
                {
                    return("[res]");
                }

                return(ResourceManagerService.GetResourceString(GetManagerKey(key), GetResourceKey(key)));
            }
        }
Example #3
0
        public string this[string key]
        {
            get
            {
                if (!ValidateKey(key))
                {
                    throw new ArgumentException(@"Incorrect format. [ManagerName].[ResourceKey]");
                }
                if (DesignHelpers.IsInDesignMode)
                {
                    return("[res]");
                }

                return(ResourceManagerService.GetResourceString(GetManagerKey(key), GetResourceKey(key)));
            }
        }