public void Test(IPackage package) { STBLExporter export = GetExporter() as STBLExporter; MainForm.Log("Test: " + STBL.GetProperName(Instance), false); export.ConvertToString(package); }
public override string GetFilename(bool autoSet, bool fileMustExist) { string prefix = STBL.GetProperName(Instance); if (prefix == null) { return("Default"); } string defaultName = null; string text = Text.Replace("Strings ", ""); if (!string.IsNullOrEmpty(text)) { defaultName = "StringTable" + text.Replace(" ", "_") + ".txt"; if (prefix == "UnhashedKeys") { defaultName = defaultName.Replace("UnhashedKeys", "English"); } } else { defaultName = "StringTable" + prefix + ".txt"; } List <string> prefixes = new List <string>(); prefixes.Add(prefix); if (prefix.Contains("Portuguese")) { if (prefix == "PortugueseStandard") { prefixes.Add("StandardPortuguese"); prefixes.Add("BrazilianPortuguese"); } else if (prefix == "PortugueseBrazilian") { prefixes.Add("BrazilianPortuguese"); prefixes.Add("StandardPortuguese"); } prefixes.Add("PortugueseStandard"); prefixes.Add("PortugueseBrazilian"); prefixes.Add("Portuguese"); } else if (prefix.Contains("Spanish")) { if (prefix == "SpanishStandard") { prefixes.Add("StandardSpanish"); prefixes.Add("MexicanSpanish"); } else if (prefix == "SpanishMexican") { prefixes.Add("MexicanSpanish"); prefixes.Add("StandardSpanish"); } prefixes.Add("SpanishStandard"); prefixes.Add("SpanishMexican"); prefixes.Add("Spanish"); } else if (prefix == "Chinese") { prefixes.Add("Taiwanese"); } else if (prefix == "Taiwanese") { prefixes.Add("Chinese"); } prefixes.Add("English"); return(PrivateGetFilename("stbl", "KEYSTR Text Files|*.txt|STBL Files|*.stbl|All Files|*.*", prefixes, defaultName, autoSet, fileMustExist)); }