Пример #1
0
        void UpdateFromCSV(string chosenUpdateFile)
        {
            LanguageHandlerEditor.UpdateLanguageFile(chosenCulture.languageCode, CSVParser.Read(chosenUpdateFile, CSVParser.GetDelimiter(delimiter)));

            if (parentWindow.translateLanguageWindow != null)
            {
                parentWindow.translateLanguageWindow.ReloadLanguage();
            }
        }
Пример #2
0
        void UpdateFromXLS(string chosenUpdateFile)
        {
            var values = XLSExporter.Read(chosenUpdateFile);

            LanguageHandlerEditor.UpdateLanguageFile(chosenCulture.languageCode, values);

            if (parentWindow.translateLanguageWindow != null)
            {
                parentWindow.translateLanguageWindow.ReloadLanguage();
            }
        }
Пример #3
0
 void OnWatchedFileChanged(object source, FileSystemEventArgs e)
 {
     EditorThreadQueuer.QueueOnMainThread(() => {
         Console.WriteLine("File changed. Reloading...");
         List <List <string> > values = CSVParser.Read(e.FullPath, CSVParser.GetDelimiter(CSVParser.Delimiter.COMMA));
         LanguageHandlerEditor.UpdateLanguageFile(currentCultureInfo.languageCode, values);
         ReloadLanguage();
         if (Application.isPlaying && LanguageManager.HasInstance)
         {
             LanguageManager.Instance.ChangeLanguage(currentCultureInfo.languageCode);
         }
         Repaint();
     });
 }