示例#1
0
        // ****************

        private List <DatasetFileViewModel> AddSelectedFile(DatasetFileViewModel selectedFile)
        {
            if (Files == null)
            {
                Files = new List <DatasetFileViewModel>();
            }
            Files.Add(selectedFile);
            return(Files);
        }
        private List <DatasetFileViewModel> ConvertToViewModel(List <DatasetFile> datasetFiles, List <Projections> projections, bool selectedForDownload = false)
        {
            var selectedFilesViewModel = new List <DatasetFileViewModel>();

            foreach (var selectedFile in datasetFiles)
            {
                string epsgName = GetEpsgName(projections, selectedFile);
                DatasetFileViewModel selectedFileViewModel = new DatasetFileViewModel(selectedFile, epsgName, selectedForDownload);
                selectedFilesViewModel.Add(selectedFileViewModel);
            }
            return(selectedFilesViewModel);
        }
示例#3
0
 public DatasetFile(DatasetFileViewModel datasetFileViewModel)
 {
     Title        = datasetFileViewModel.Title;
     Description  = datasetFileViewModel.Description;
     Url          = datasetFileViewModel.Url;
     LastUpdated  = datasetFileViewModel.LastUpdated;
     Organization = datasetFileViewModel.Organization;
     Projection   = datasetFileViewModel.Category;
     DatasetId    = datasetFileViewModel.DatasetId;
     DatasetUrl   = datasetFileViewModel.DatasetUrl;
     Restrictions = datasetFileViewModel.Restrictions;
 }
示例#4
0
 public DownloadViewModel(Dataset selectedDataset, DatasetFileViewModel selectedFile)
 {
     DatasetUrl      = selectedDataset.Url;
     DatasetId       = selectedDataset.Uuid;
     DatasetTitle    = selectedDataset.Title;
     Subscribe       = false; // TODO
     AutoDeleteFiles = false; // TODO
     AutoAddFiles    = false; // TODO
     AutoAddFiles    = false; // TODO
     Files           = AddSelectedFile(selectedFile);
     Projections     = selectedDataset.Projections;
 }