33 lines
908 B
C#
33 lines
908 B
C#
/*
|
|
* Author: Nikolay Dvurechensky
|
|
* Site: https://www.dvurechensky.pro/
|
|
* Gmail: dvurechenskysoft@gmail.com
|
|
* Last Updated: 13 мая 2025 15:25:18
|
|
* Version: 1.0.1
|
|
*/
|
|
|
|
using System.Collections.Generic;
|
|
using System.Reflection;
|
|
using System.Resources;
|
|
|
|
namespace FLCore
|
|
{
|
|
public class DataSetter
|
|
{
|
|
public ResourceManager GetResource(string key, List<string> keys, string nameSpace, Assembly assembly)
|
|
{
|
|
foreach (string item in keys)
|
|
{
|
|
var name = item.Substring(0, item.IndexOf("."));
|
|
if (name == key)
|
|
{
|
|
var nameResources = item.Substring(0, item.IndexOf("."));
|
|
var baseName = nameSpace + ".Properties." + nameResources;
|
|
return new ResourceManager(baseName, assembly);
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
}
|