示例#1
0
 // Helper for obtaining string resources for this assembly.
 public static String GetString(String tag)
 {
     lock (typeof(Strings))
     {
         if (resources == null)
         {
                                 #if ECMA_COMPAT
             resources = new ECMAResourceManager
                             ("I18N", Assembly.GetExecutingAssembly());
                                 #else
             resources = new ResourceManager
                             ("I18N", Assembly.GetExecutingAssembly());
                                 #endif
         }
         return(resources.GetString(tag, null));
     }
 }
示例#2
0
 // Helper for obtaining string resources for this assembly.
 public static String _(String tag)
 {
     lock (typeof(S))
     {
         if (stringResources == null)
         {
                                 #if ECMA_COMPAT
             stringResources = new ECMAResourceManager
                                   ("Xsharp", (typeof(S)).Assembly);
                                 #else
             stringResources = new ResourceManager
                                   ("Xsharp", (typeof(S)).Assembly);
                                 #endif
         }
         return(stringResources.GetString(tag, null));
     }
 }
示例#3
0
文件: S.cs 项目: ForNeVeR/pnet
 // Helper for obtaining string resources for this assembly.
 public static String _(String tag)
 {
     lock (typeof(S))
     {
         if (ourResources == null)
         {
                                 #if ECMA_COMPAT
             ourResources = new ECMAResourceManager
                                ("System.Configuration.Install", (typeof(S)).Assembly);
                                 #else
             ourResources = new ResourceManager
                                ("System.Configuration.Install", (typeof(S)).Assembly);
                                 #endif
         }
         return(ourResources.GetString(tag, null));
     }
 }
示例#4
0
文件: S.cs 项目: ForNeVeR/pnet
 // Helper for obtaining string resources for this assembly.
 public static String _(String tag)
 {
     lock (typeof(S))
     {
         // Try the resources in the "System.Drawing" assembly first.
         if (drawingResources == null)
         {
                                 #if ECMA_COMPAT
             drawingResources = new ECMAResourceManager
                                    ("System.Drawing", (typeof(S)).Assembly);
                                 #else
             drawingResources = new ResourceManager
                                    ("System.Drawing", (typeof(S)).Assembly);
                                 #endif
         }
         return(drawingResources.GetString(tag, null));
     }
 }
示例#5
0
文件: S.cs 项目: ForNeVeR/pnet
 // Helper for obtaining string resources for this assembly.
 public static String _(String tag)
 {
     lock (typeof(S))
     {
         // Try the resources in this assembly first.
         if (ourResources == null)
         {
                                 #if ECMA_COMPAT
             ourResources = new ECMAResourceManager
                                ("System.Windows.Forms", (typeof(S)).Assembly);
                                 #else
             ourResources = new ResourceManager
                                ("System.Windows.Forms", (typeof(S)).Assembly);
                                 #endif
         }
         return(ourResources.GetString(tag, null));
     }
 }
示例#6
0
文件: S.cs 项目: ForNeVeR/pnet
        // Helper for obtaining string resources for this assembly.
        public static String _(String tag)
        {
            lock (typeof(S))
            {
                String value;

                // Try the resources in the "System" assembly first.
                if (systemResources == null)
                {
                                        #if ECMA_COMPAT
                    systemResources = new ECMAResourceManager
                                          ("System", (typeof(S)).Assembly);
                                        #else
                    systemResources = new ResourceManager
                                          ("System", (typeof(S)).Assembly);
                                        #endif
                }
                value = systemResources.GetString(tag, null);
                if (value != null)
                {
                    return(value);
                }

                // Try the fallbacks in the runtime library.
                if (runtimeResources == null)
                {
                                        #if ECMA_COMPAT
                    runtimeResources = new ECMAResourceManager
                                           ("runtime", (typeof(String)).Assembly);
                                        #else
                    runtimeResources = new ResourceManager
                                           ("runtime", (typeof(String)).Assembly);
                                        #endif
                }
                return(runtimeResources.GetString(tag, null));
            }
        }
示例#7
0
文件: S.cs 项目: ForNeVeR/pnet
        // Helper for obtaining string resources for this assembly.
        public static String _(String tag)
        {
            lock (typeof(S))
            {
                String value;

                // Try the resources in this assembly first.
                if (ourResources == null)
                {
                                        #if ECMA_COMPAT
                    ourResources = new ECMAResourceManager
                                       ("Microsoft.VisualBasic", (typeof(S)).Assembly);
                                        #else
                    ourResources = new ResourceManager
                                       ("Microsoft.VisualBasic", (typeof(S)).Assembly);
                                        #endif
                }
                value = ourResources.GetString(tag, null);
                if (value != null)
                {
                    return(value);
                }

                                #if ECMA_COMPAT
                // Try the fallbacks in the runtime library.
                if (runtimeResources == null)
                {
                    runtimeResources = new ECMAResourceManager
                                           ("runtime", (typeof(String)).Assembly);
                }
                return(runtimeResources.GetString(tag, null));
                                #else
                return(tag);
                                #endif
            }
        }