Ejemplo n.º 1
0
        /// <summary>
        /// Registers image resources in the resource service.
        /// </summary>
        /// <param name="baseResourceName">The base name of the resource file embedded in the assembly.</param>
        /// <param name="assembly">The assembly which contains the resource file.</param>
        /// <example><c>ResourceService.RegisterImages("TestAddin.Resources.BitmapResources", GetType().Assembly);</c></example>
        public static void RegisterImages(string baseResourceName, Assembly assembly)
        {
            RegisterNeutralImages(new ResourceManager(baseResourceName, assembly));
            ResourceAssembly ra = new ResourceAssembly(assembly, baseResourceName, true);

            resourceAssemblies.Add(ra);
            ra.Load();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Registers string resources in the resource service.
        /// </summary>
        /// <param name="baseResourceName">The base name of the resource file embedded in the assembly.</param>
        /// <param name="assembly">The assembly which contains the resource file.</param>
        /// <example><c>ResourceService.RegisterStrings("TestAddin.Resources.StringResources", GetType().Assembly);</c></example>
        public void RegisterStrings(string baseResourceName, Assembly assembly)
        {
            RegisterNeutralStrings(new ResourceManager(baseResourceName, assembly));
            ResourceAssembly ra = new ResourceAssembly(this, assembly, baseResourceName, false);

            resourceAssemblies.Add(ra);
            ra.Load();
        }
Ejemplo n.º 3
0
		/// <summary>
		/// Registers image resources in the resource service.
		/// </summary>
		/// <param name="baseResourceName">The base name of the resource file embedded in the assembly.</param>
		/// <param name="assembly">The assembly which contains the resource file.</param>
		/// <example><c>ResourceService.RegisterImages("TestAddin.Resources.BitmapResources", GetType().Assembly);</c></example>
		public void RegisterImages(string baseResourceName, Assembly assembly)
		{
			RegisterNeutralImages(new ResourceManager(baseResourceName, assembly));
			ResourceAssembly ra = new ResourceAssembly(this, assembly, baseResourceName, true);
			resourceAssemblies.Add(ra);
			ra.Load();
		}
Ejemplo n.º 4
0
 public static void RegisterStrings(string baseResourceName, Assembly assembly)
 {
     RegisterNeutralStrings(new ResourceManager(baseResourceName, assembly));
     ResourceAssembly item = new ResourceAssembly(assembly, baseResourceName, false);
     resourceAssemblies.Add(item);
     item.Load();
 }