コード例 #1
0
        private void InitialiseScreenComponents()
        {
            DefinitionFiles = new ObservableCollection <ListBoxPair>();
            DefinitionFiles.Add(new ListBoxPair {
                Key = "0", Value = "(Select a definition)"
            });

            foreach (var file in CSVConvertorFileManagement.GetDefinitionFiles(CSVAppFolderMapping, ".xml"))
            {
                DefinitionFiles.Add(new ListBoxPair(file, file));
            }

            DefinitionFileList.DisplayMemberPath = "Value";
            DefinitionFileList.SelectedValuePath = "Key";
            DefinitionFileList.ItemsSource       = DefinitionFiles;

            DefinitionFileList.SelectedIndex = 0;

            MappingFiles = new ObservableCollection <ListBoxPair>();
            MappingFiles.Add(new ListBoxPair {
                Key = "0", Value = "(Select a mapping)"
            });

            foreach (var file in CSVConvertorFileManagement.GetMappingFiles(CSVAppFolderMapping, ".xml"))
            {
                MappingFiles.Add(new ListBoxPair(file, file));
            }
            MappingFileList.DisplayMemberPath = "Value";
            MappingFileList.SelectedValuePath = "Key";
            MappingFileList.ItemsSource       = MappingFiles;

            MappingFileList.SelectedIndex = 0;

            SetFilterSelectors();
        }
コード例 #2
0
        private void InitialiseScreenComponents()
        {
            CSVConvertorFileManagement.CreateWorkingFolder(CSVAppFolder);

            MappingFiles = new ObservableCollection <ListBoxPair>();
            MappingFiles.Add(new ListBoxPair {
                Key = "0", Value = "(Select a mapping)"
            });

            foreach (var file in CSVConvertorFileManagement.GetMappingFiles(CSVAppFolder, ".xml"))
            {
                MappingFiles.Add(new ListBoxPair(file, file));
            }
            MappingFileList.DisplayMemberPath = "Value";
            MappingFileList.SelectedValuePath = "Key";
            MappingFileList.ItemsSource       = MappingFiles;

            MappingFileList.SelectedIndex = 0;

            ManagementPanel.Visibility     = Visibility.Hidden;
            AdditionalFilePanel.Visibility = Visibility.Hidden;

            loadSelectedFile.IsEnabled = false;
        }