Exemplo n.º 1
0
            public void Add(StringResources resource) {
                string key = GetKey(resource.Assembly);

                List<StringResources> list;
                if (!_dict.TryGetValue(key, out list)) {
                    const int INITIAL_LIST_SIZE = 4;
                    list = new List<StringResources>(INITIAL_LIST_SIZE);
                    _dict.Add(key, list);
                }

                for (int i = 0; i < list.Count; i++) {
                    if (list[i].ResourceName == resource.ResourceName) {
                        list[i] = resource;
                        return;
                    }
                }

                list.Add(resource);
            }
Exemplo n.º 2
0
 private static void ReloadStringResource()
 {
     _strings = new StringResources("Poderosa.strings", typeof(GApp).Assembly);
     EnumDescAttribute.AddResourceTable(typeof(GApp).Assembly, _strings);
     GEnv.ReloadStringResource();
 }
Exemplo n.º 3
0
 public static void ReloadStringResource()
 {
     _strings = new StringResources("Portforwarding.strings", typeof(Env).Assembly);
 }
Exemplo n.º 4
0
 public static void ReloadStringResource()
 {
     _stringResource = new StringResources("Poderosa.Terminal.strings", typeof(GEnv).Assembly);
     EnumDescAttribute.AddResourceTable(typeof(GEnv).Assembly, _stringResource);
 }
Exemplo n.º 5
0
 public static void ReloadStringResource()
 {
     _strings = new StringResources("Portforwarding.strings", typeof(Env).Assembly);
     EnumDescAttribute.AddResourceTable(typeof(Env).Assembly, _strings);
 }
 public static void AddResourceTable(Assembly asm, StringResources res)
 {
     _assemblyToResource[asm] = res; //overwrite if the key is duplicated
 }