コード例 #1
0
ファイル: UserForm.cs プロジェクト: modulexcite/Tools-3
        // 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);
        }
コード例 #2
0
ファイル: UserForm.cs プロジェクト: modulexcite/Tools-3
        // 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);
            }
        }
コード例 #3
0
ファイル: UserForm.cs プロジェクト: modulexcite/Tools-3
        // 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;
        }
コード例 #4
0
ファイル: UserForm.cs プロジェクト: vjohnson01/Tools
        // 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);

        }
コード例 #5
0
ファイル: UserForm.cs プロジェクト: vjohnson01/Tools
        // 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;

        }