public MergeWizardSelectColumnsUserControl(MergeWizardShareObject parameter)
        {
            InitializeComponent();
            DataContext = parameter;
            entity      = parameter;
            selectedAvaliableColumns = new Collection <FeatureSourceColumnDefinition>();
            selectedIncludedColumns  = new Collection <FeatureSourceColumnDefinition>();

            Loaded += new RoutedEventHandler(MergeWizardSelectColumnsUserControl_Loaded);
        }
예제 #2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            SaveFileDialog saveFileDialog = new SaveFileDialog();

            saveFileDialog.Filter = "Shape Files(*.shp)|*.shp";
            if (saveFileDialog.ShowDialog().GetValueOrDefault())
            {
                MergeWizardShareObject entity = DataContext as MergeWizardShareObject;
                if (entity != null)
                {
                    entity.OutputPathFileName = saveFileDialog.FileName;
                }
            }
        }
        private static void HandleCommonColumns(MergeWizardShareObject parameter, IEnumerable <FeatureSourceColumnDefinition> allColumns)
        {
            duplicateColumnsDictionary = new Dictionary <string, List <FeatureSourceColumnDefinition> >();

            foreach (var group in allColumns.GroupBy(c => c.OriginalName))
            {
                var groupColumns = group.ToList();
                if (groupColumns.Count > 1)
                {
                    List <FeatureSourceColumnDefinition> commonColumns = new List <FeatureSourceColumnDefinition>();
                    duplicateColumnsDictionary.Add(group.Key, commonColumns);
                    foreach (var item in group)
                    {
                        item.IsDuplicate = true;
                        commonColumns.Add(item);
                    }
                }
            }

            foreach (var pair in duplicateColumnsDictionary)
            {
                foreach (var item in pair.Value)
                {
                    if (parameter.LayerColumnPair.ContainsKey(item.FeatureLayer))
                    {
                        parameter.LayerColumnPair[item.FeatureLayer].Remove(item);
                    }
                }

                FeatureSourceColumnDefinition firstColumn = pair.Value.First();

                if (parameter.IncludedColumns.Count(c => c.OriginalName.Equals(firstColumn.OriginalName)) == 0)
                {
                    parameter.IncludedColumns.Add(firstColumn);
                }
            }
        }
 public MergeWizardChooseLayersUserControl(MergeWizardShareObject parameter)
 {
     InitializeComponent();
     DataContext = parameter;
     entity      = parameter;
 }
예제 #5
0
 public MergeWizardSaveResultsUserControl(MergeWizardShareObject parameter)
 {
     InitializeComponent();
     DataContext = parameter;
 }