コード例 #1
0
ファイル: MainViewModel.cs プロジェクト: openlab/OGDI-DataLab
        private void AddPlannedDataset()
        {
            var uploadParam = new UploadParam(SourceDataType.Csv);

            DataSetInfos.Add(uploadParam);
            DataSetInfos.OrderBy(info => info.Name);
            SelectedItem = uploadParam;

            OnActivateItem();
        }
コード例 #2
0
ファイル: Uploader.cs プロジェクト: emphanos/DataLab
        public void AddFiles(IEnumerable <string> files)
        {
            foreach (var fileName in files)
            {
                var file = new FileInfo(fileName);
                var name = Path.GetFileNameWithoutExtension(file.Name);

                // Remove duplicates.
                foreach (var item in DataSetInfos.Where(x => x.Name == name).ToArray())
                {
                    DataSetInfos.Remove(item);
                }

                var uploadParam = new UploadParam(fileName);

                uploadParam.VerifyConfiguration();
                DataSetInfos.Add(uploadParam);
            }
            DataSetInfos.OrderBy(x => x.Name);
        }