Exemplo n.º 1
0
        private static void LoadLocalization()
        {
            Console.WriteLine("App.LoadLocalization() Ready to load localization from current directory.");
            string settingFilePath = Path.Combine(AppUtility.GetCurrentExePath(),
                                                  LocalizationCenter.FOLDER_LOCALIZATION, "localSetting");
            string langCode = string.Empty;

            if (!File.Exists(settingFilePath))
            {
                File.WriteAllText(settingFilePath, LocalizationCenter.DEFAULT_LOCALIZATION_NOTSET);
                langCode = CultureInfo.CurrentCulture.Name;
            }
            else
            {
                langCode = File.ReadAllText(settingFilePath);
                if (langCode.Equals(LocalizationCenter.DEFAULT_LOCALIZATION_NOTSET))
                {
                    langCode = CultureInfo.CurrentCulture.Name;
                }
            }

            string localFilePath = Path.Combine(AppUtility.GetCurrentExePath(),
                                                LocalizationCenter.FOLDER_LOCALIZATION, langCode + ".json");

            if (!File.Exists(localFilePath))
            {
                langCode = LocalizationCenter.DEFAULT_LOCALIZATION_RESOURCE_LANGCODE;
                return;
            }

            LocalizationCenter.SetLocalizationData(langCode, File.ReadAllText(localFilePath));
        }
Exemplo n.º 2
0
        private static void LoadAndroidSDKTable()
        {
            Console.WriteLine("App.LoadAndroidSDKTable() Ready to load sdk table from current directory.");
            string filePath = Path.Combine(AppUtility.GetCurrentExePath(), AndroidSDKData.FILE_ANDROIDTABLE);

            if (File.Exists(filePath))
            {
                AndroidSDKData.SetTableFullString(File.ReadAllText(filePath));
            }
        }
Exemplo n.º 3
0
 public string GetBundleToolPath()
 {
     return(Path.Combine(AppUtility.GetCurrentExePath(), FOLDER_EXTERNAL_TOOL, BAT_BUNDLETOOL));
 }
Exemplo n.º 4
0
 public string GetADBPath()
 {
     return(Path.Combine(AppUtility.GetCurrentExePath(), FOLDER_EXTERNAL_TOOL, EXE_ADB));
 }
Exemplo n.º 5
0
 public string GetAPKSignerPath()
 {
     return(Path.Combine(AppUtility.GetCurrentExePath(), FOLDER_EXTERNAL_TOOL, JAR_APKSIGNER));
 }