Esempio n. 1
0
 private void DefineSpellCheckLanguages()
 {
     if (SpellCheckLanguages != null)
         return;
     try {
         string myDocumentsPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments);
         var files = System.IO.Directory.GetFileSystemEntries(myDocumentsPath + "\\Scrum Factory\\SpellDics\\", "*.dic");
         SpellCheckLanguages = new LanguageInfo[files.Length + 1];
         SpellCheckLanguages[0] = new LanguageInfo() { Code = "-", Description = Properties.Resources.disabled };
         for (int i = 0; i < files.Length; i++) {
             string code = System.IO.Path.GetFileNameWithoutExtension(files[i]);
             SpellCheckLanguages[i+1] = new LanguageInfo() { Code = code, Description = code };
         }
     } catch (Exception) {
         SpellCheckLanguages = new LanguageInfo[0];
     }
     OnPropertyChanged("SpellCheckLanguages");
 }
Esempio n. 2
0
 private void DefineAvaiableLanguages()
 {
     Languages = new LanguageInfo[2];
     Languages[0] = new LanguageInfo() { Code = "en-US", Description = "en_US_description" };
     Languages[1] = new LanguageInfo() { Code = "pt-BR", Description = "pt_BR_description" };
 }