private static void LoadPosibleLanguages() { foreach (var language in Enum.GetValues(typeof(Languages))) { var lang = (Languages)language; var resource = $"AssetViewer.Resources.Assets.Texts_{lang.ToString("G")}.xml"; if (Assembly.GetExecutingAssembly().GetManifestResourceNames().Contains(resource)) { PossibleLanguages.Add(lang); } } }
public void MoveToPossible(CustomCell cell) { for (int i = 0; i < SelectedLanguages.Count; i++) { if (cell.Equals(SelectedLanguages[i])) { if (CheckInStarting(cell)) { PossibleLanguages.Add(cell); SelectedLanguages.Remove(cell); LanguagesLeft += 1; } } } }
static ProgrammSettings() { //Set possible languages foreach (var language in Enum.GetValues(typeof(Languages))) { var lang = (Languages)language; var resource = $"AnnoSavegameViewer.Resources.Languages.texts_{lang.ToString("G")}.xml"; if (Assembly.GetExecutingAssembly().GetManifestResourceNames().Contains(resource)) { PossibleLanguages.Add(lang); } } SetSystemLanguage(); //Load Guid to template dictionary //using var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("AnnoSavegameViewer.Resources.Assets.Assets.xml"); //using var reader = new StreamReader(stream); //var document = XElement.Parse(reader.ReadToEnd()); //foreach (var item in document.Elements()) { // Templates.Add(Convert.ToInt32(item.Attribute("GUID").Value), item.Attribute("Template").Value); //} }