// Called from button click handler public void LoadRepositories() { settings.InitializeCMISClient(vm.CMISClient); Repositories = vm.CMISClient.LoadRepositories(); // if the "SelectedRepository" is not in the list of repositories then select the first one if (Repositories != null) { string selectedRepositoryId = SelectedRepository == null? null : SelectedRepository.Id; List <CMISRepository> lrp = Repositories.Where(n => n.Id == selectedRepositoryId).ToList(); SelectedRepository = (lrp.Count == 1)? lrp.First() : Repositories[0]; } }
public override void Init(SIEESettings settings) { mySettings = (CMISSettings)settings; mySettings.InitializeCMISClient(cmisClient); clientCulture = new CultureInfo(mySettings.SelectedCultureInfoName); cmisClient.LoadRepositories(); cmisClient.SelectRepository(mySettings.SelectedRepository.Id); selectedTypeId = mySettings.SelectedType; selectedFolderId = (TVIViewModel.deSerialize(mySettings.SerializedFolderPath.Last(), typeof(CMISFolderNode)) as CMISFolderNode).Id; }