Пример #1
0
        private void ConnectSourceProjectButton_Click(object sender, RoutedEventArgs e)
        {
            TeamProjectPicker tpp    = new TeamProjectPicker(TeamProjectPickerMode.SingleProject, false);
            DialogResult      result = tpp.ShowDialog();

            if (result.ToString() == "OK")
            {
                StatusViwer.Content          = "";
                MigratingLabel.Content       = "";
                StatusBar.Value              = 0;
                SourceFieldGrid.ItemsSource  = new List <string>();
                TargetFieldGrid.ItemsSource  = new List <string>();
                MappedListGrid.ItemsSource   = new List <object>();
                FieldToCopyGrid.ItemsSource  = new List <object>();
                WorkFlowListGrid.ItemsSource = new List <object>();

                finalFieldMap    = new Hashtable();
                copyingFieldSet  = new Hashtable();
                migrateTypeSet   = new List <object>();
                this.sourceTFS   = tpp.SelectedTeamProjectCollection;
                this.sourceStore = (WorkItemStore)sourceTFS.GetService(typeof(WorkItemStore));

                this.sourceProject     = sourceStore.Projects[tpp.SelectedProjects[0].Name];
                SourceProjectText.Text = string.Format("{0}/{1}", sourceTFS.Uri.ToString(), sourceProject.Name);
                readSource             = new WorkItemRead(sourceTFS, sourceProject);

                if ((string)ConnectionStatusLabel.Content == "Select a Source project")
                {
                    ConnectionStatusLabel.Content = "";
                }
            }
        }
        private void ConnectSourceProjectButton_Click(object sender, RoutedEventArgs e)
        {
            TeamProjectPicker tpp = new TeamProjectPicker(TeamProjectPickerMode.SingleProject, false);
            DialogResult result = tpp.ShowDialog();
            if (result.ToString() == "OK")
            {
                StatusViwer.Content = "";
                MigratingLabel.Content = "";
                StatusBar.Value = 0;
                SourceFieldGrid.ItemsSource = new List<string>();
                TargetFieldGrid.ItemsSource = new List<string>();
                MappedListGrid.ItemsSource = new List<object>();
                FieldToCopyGrid.ItemsSource = new List<object>();
                WorkFlowListGrid.ItemsSource = new List<object>();

                finalFieldMap = new Hashtable();
                copyingFieldSet = new Hashtable();
                migrateTypeSet = new List<object>();
                sourceTFS = tpp.SelectedTeamProjectCollection;
                sourceStore = (WorkItemStore)sourceTFS.GetService(typeof(WorkItemStore));

                sourceProject = sourceStore.Projects[tpp.SelectedProjects[0].Name];
                SourceProjectText.Text = string.Format("{0}/{1}", sourceTFS.Uri.ToString(), sourceProject.Name);
                readSource = new WorkItemRead(sourceTFS, sourceProject);

                if ((string)ConnectionStatusLabel.Content == "Select a Source project")
                {
                    ConnectionStatusLabel.Content = "";
                }
            }
        }