Beispiel #1
0
 /// <summary>
 /// Save Wizard State
 /// </summary>
 public void Save()
 {
     using (new AutoWaitCursor())
     {
         WizardAction saveSettings = new SaveSettingsAction(m_wizardInfo);
         saveSettings.Start();
     }
 }
Beispiel #2
0
        /// <summary>
        /// Initializes all Wizard Actions which are possible
        /// </summary>
        private void InitializeActions()
        {
            if (m_wizardInfo.DataSourceType == DataSourceType.Excel)
            {
                // Parse Data Source Action
                WizardAction parseDataSourceAction = new ParseDataSourceAction(m_wizardInfo);
                parseDataSourceAction.PropertyChanged += new PropertyChangedEventHandler(WizardAction_PropertyChanged);
                App.CallMethodInUISynchronizationContext(AddWizardAction, parseDataSourceAction);
            }

            // Save Settings Action : Only possible if save mapping file location is provided
            if (!string.IsNullOrEmpty(m_wizardInfo.OutputSettingsFilePath))
            {
                WizardAction saveSettingsAction = new SaveSettingsAction(m_wizardInfo);
                saveSettingsAction.PropertyChanged += new PropertyChangedEventHandler(WizardAction_PropertyChanged);
                App.CallMethodInUISynchronizationContext(AddWizardAction, saveSettingsAction);
            }

            // Migrate Workitems Action
            WizardAction migrateWorkItemsAction = new MigrateWorkItemsAction(m_wizardInfo);

            migrateWorkItemsAction.PropertyChanged += new PropertyChangedEventHandler(WizardAction_PropertyChanged);
            App.CallMethodInUISynchronizationContext(AddWizardAction, migrateWorkItemsAction);

            if (m_wizardInfo.RelationshipsInfo != null &&
                m_wizardInfo.IsLinking &&
                !string.IsNullOrEmpty(m_wizardInfo.RelationshipsInfo.SourceIdField) &&
                String.CompareOrdinal(m_wizardInfo.RelationshipsInfo.SourceIdField, Resources.SelectPlaceholder) != 0)
            {
                WizardAction relationshipsAction = new ProcessLinksAction(m_wizardInfo);
                relationshipsAction.PropertyChanged += new PropertyChangedEventHandler(WizardAction_PropertyChanged);
                App.CallMethodInUISynchronizationContext(AddWizardAction, relationshipsAction);
            }


            // Publish Report Action
            if (m_wizardInfo.Reporter != null && !string.IsNullOrEmpty(m_wizardInfo.Reporter.ReportFile))
            {
                WizardAction publishReportAction = new PublishReportAction(m_wizardInfo);
                publishReportAction.PropertyChanged += new PropertyChangedEventHandler(WizardAction_PropertyChanged);
                App.CallMethodInUISynchronizationContext(AddWizardAction, publishReportAction);
            }

            m_currentWizardActionNumber = 0;
        }