Ejemplo n.º 1
0
 private void AddLanguages(object obj)
 {
     if (SelectedAvailableLanguages != null && SelectedAvailableLanguages.Count > 0)
     {
         var selection = new ArrayList(SelectedAvailableLanguages);
         foreach (CultureItemViewModel l in selection)
         {
             if (!SelectedLanguages.Contains(l))
             {
                 SelectedLanguages.Add(l);
             }
         }
     }
 }
 public void MoveToSelected(CustomCell cell)
 {
     if (LanguagesLeft > 0)
     {
         for (int i = 0; i < PossibleLanguages.Count; i++)
         {
             if (cell.Equals(PossibleLanguages[i]))
             {
                 PossibleLanguages.Remove(cell);
                 SelectedLanguages.Add(cell);
             }
         }
         LanguagesLeft -= 1;
     }
 }
Ejemplo n.º 3
0
        private void LoadSettings()
        {
            settings = settingsService.GetSolutionSettings();
            if (settings == null)
            {
                return;
            }

            UidGenerationMode = settings.UidGenerationMode;
            if (!String.IsNullOrEmpty(settings.DevelepmentCulture))
            {
                DefaultLanguage = new CultureItemViewModel(settings.DevelepmentCulture);
            }

            if (settings.LocalizationCultures != null)
            {
                foreach (var cult in settings.LocalizationCultures)
                {
                    SelectedLanguages.Add(new CultureItemViewModel(cult));
                }
            }

            foreach (var projSettingVM in projectsSettings)
            {
                if (settings.ProjectsSettings != null)
                {
                    var projSetting =
                        settings.ProjectsSettings.FirstOrDefault(
                            ps => ps.ProjectUniqueName == projSettingVM.UniqueName);
                    if (projSetting != null)
                    {
                        projSettingVM.Localizable = projSetting.Localizable;
                    }
                }
            }
        }