Exemplo n.º 1
0
        /// <summary>
        /// Listens to the Wizard part's notifications
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void WizardPart_PropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            IWizardPart wizardPart = sender as IWizardPart;

            if (WizardPart == null || wizardPart.WizardPage != WizardPart.WizardPage)
            {
                return;
            }

            // MigrateWorkitem Part's State notification
            if (String.CompareOrdinal(e.PropertyName, SummaryPart.MigrationStateTag) == 0)
            {
                SummaryPart summaryPart = sender as SummaryPart;
                if (summaryPart.MigrationState != WizardActionState.InProgress)
                {
                    IsMigrationCompleted = true;
                }
            }
            // Wizard Part's CanConfirm Notification
            else if (String.CompareOrdinal(e.PropertyName, BaseWizardPart.CanConfirmPropertyName) == 0 ||
                     String.CompareOrdinal(e.PropertyName, BaseWizardPart.CanNextPropertyName) == 0)
            {
                CanShowOtherWizardParts();
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Stop Wizard Actions in progress
        /// </summary>
        public void StopWizardActions()
        {
            SummaryPart part = WizardPart as SummaryPart;

            if (part.IsActiveWizardPart)
            {
                part.StopAll();
            }
        }
 public SummaryView(SummaryPart part)
 {
     InitializeComponent();
     m_part      = part;
     DataContext = part;
 }
Exemplo n.º 4
0
        private Visual GetVisual(IWizardPart part)
        {
            WelcomePart welcomePart = part as WelcomePart;

            if (welcomePart != null)
            {
                return(new WelcomeView(welcomePart));
            }

            SelectDataSourcePart selectDataSourcePart = part as SelectDataSourcePart;

            if (selectDataSourcePart != null)
            {
                return(new SelectDataSourceView(selectDataSourcePart));
            }

            SelectDestinationServerPart selectDestinationServerPart = part as SelectDestinationServerPart;

            if (selectDestinationServerPart != null)
            {
                return(new SelectDestinationServerView(selectDestinationServerPart));
            }

            SettingsFilePart mappingsFilePart = part as SettingsFilePart;

            if (mappingsFilePart != null)
            {
                return(new SettingsFileView(mappingsFilePart));
            }

            FieldsSelectionPart fieldsSelectionPart = part as FieldsSelectionPart;

            if (fieldsSelectionPart != null)
            {
                return(new FieldsSelectionView(fieldsSelectionPart));
            }

            FieldMappingPart fieldMappingPart = part as FieldMappingPart;

            if (fieldMappingPart != null)
            {
                return(new FieldMappingView(fieldMappingPart));
            }

            DataMappingPart dataMappingPart = part as DataMappingPart;

            if (dataMappingPart != null)
            {
                return(new DataMappingView(dataMappingPart));
            }

            LinkingPart relationshipsMappingPart = part as LinkingPart;

            if (relationshipsMappingPart != null)
            {
                return(new LinkingView(relationshipsMappingPart));
            }

            MiscSettingsPart miscSettingsPart = part as MiscSettingsPart;

            if (miscSettingsPart != null)
            {
                return(new MiscSettingsView(miscSettingsPart));
            }

            ConfirmSettingsPart confirmSettingsPart = part as ConfirmSettingsPart;

            if (confirmSettingsPart != null)
            {
                return(new ConfirmSettingsView(confirmSettingsPart));
            }

            SummaryPart migrationProgressPart = part as SummaryPart;

            if (migrationProgressPart != null)
            {
                return(new SummaryView(migrationProgressPart));
            }

            throw new ArgumentException("Invalid Wizard Part");
        }