Exemple #1
0
        // Resume an import from the user interface
        protected void ImportResumedFromUI()
        {
            // Set the import control to resume
            ImportControl importcontrol = new ImportControl();

            importcontrol.Resume = true;

            // Background worked does not really have a concept of resume so we just re run the background worker.
            bgwImport.RunWorkerAsync(importcontrol);
        }
Exemple #2
0
        // DoWork event
        private void bgwImport_DoWork(object sender, DoWorkEventArgs e)
        {
            // Get the BackgroundWorker that raised this event.
            BackgroundWorker worker = sender as BackgroundWorker;

            // Get the import control
            ImportControl importcontrol = e.Argument as ImportControl;

            // Call the appropriate import method
            if (importcontrol.Resume)
            {
                importdocument.ImportItems(worker);
            }
            else
            {
                importdocument.LoadItems(worker);
                importdocument.ImportItems(worker);
            }
        }
Exemple #3
0
        // Start an import from the user interface
        protected void ImportStartedFromUI()
        {
            // Get the current import settings from the UI
            ImportSettings importsettings = ImportSettingsFromUI();

            // Initialise the import object
            importdocument = new ImportDocument(importsettings);

            // Set the import control to start a new import
            ImportControl importcontrol = new ImportControl();

            importcontrol.Resume = false;


            // Start a back ground thread that will import the documents into SharePoint whilst the user interface remains responsive.
            bgwImport.RunWorkerAsync(importcontrol);

            // Enable the pause button.
            buttonPauseImport.Enabled = true;
        }
Exemple #4
0
        // Resume an import from the user interface
        protected void ImportResumedFromUI()
        {
            // Set the import control to resume
            ImportControl importcontrol = new ImportControl();
            importcontrol.Resume = true;

            // Background worked does not really have a concept of resume so we just re run the background worker.
            bgwImport.RunWorkerAsync(importcontrol);

        }
Exemple #5
0
        // Start an import from the user interface
        protected void ImportStartedFromUI()
        {

            // Get the current import settings from the UI
            ImportSettings importsettings = ImportSettingsFromUI();

            // Initialise the import object
            importdocument = new ImportDocument(importsettings);

            // Set the import control to start a new import
            ImportControl importcontrol = new ImportControl();
            importcontrol.Resume = false;


            // Start a back ground thread that will import the documents into SharePoint whilst the user interface remains responsive.
            bgwImport.RunWorkerAsync(importcontrol);

            // Enable the pause button.
            buttonPauseImport.Enabled = true;

        }