private void LibraryContentDataGridView_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            DataGridViewColumn selectedColumn = LibraryContentDataGridView.Columns[e.ColumnIndex];
            string             fieldName      = String.Empty;

            if (selectedColumn.Tag != null)
            {
                fieldName = selectedColumn.Tag.ToString();
            }
            if (SortedFieldName == fieldName)
            {
                if (IsAsc == false)
                {
                    IsAsc = true;
                }
                else
                {
                    IsAsc = false;
                }
            }
            else
            {
                IsAsc = true;
            }
            CurrentPageIndex = 0;
            SortedFieldName  = fieldName;

            LoadingPictureBox.Visible = true;
            BackgroundWorkerAction    = "SortContentGridView";
            ChangeViewBackgroundWorker.RunWorkerAsync();
        }
 public void LoadViewsExt(string webUrl, string listName)
 {
     LoadingPictureBox.Visible = true;
     BackgroundWorkerAction    = "LoadViews";
     ChangeViewBackgroundWorker.RunWorkerAsync(new string[2] {
         webUrl, listName
     });
 }
        private void ViewsComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            ISPCView selectedView = ViewsComboBox.SelectedItem as ISPCView;

            if (selectedView == null)
            {
                return;
            }
            LoadingPictureBox.Visible = true;
            BackgroundWorkerAction    = "ChangeView";
            if (ChangeViewBackgroundWorker.IsBusy == true)
            {
                MessageBox.Show("Background engine is busy right now, Please try again later.");
                return;
            }
            ChangeViewBackgroundWorker.RunWorkerAsync(selectedView);
        }
        private void LibraryContentDataGridView_DragDrop(object sender, DragEventArgs e)
        {
            if (SelectedFolder == null)
            {
                return;
            }
            LoadingPictureBox.Visible = true;
            BackgroundWorkerAction    = "UploadEmail";
            List <Outlook.MailItem> emailItems = new List <MailItem>();

            bool isListItemAndAttachmentMode = false;

            if (SelectedFolder as EUFolder != null && ((EUFolder)SelectedFolder).IsDocumentLibrary == false)
            {
                if (((EUFolder)SelectedFolder).EnableAttachments == false)
                {
                    MessageBox.Show("In order to upload email, you need to enable attachment feature in this list.");
                    return;
                }
                isListItemAndAttachmentMode = true;
            }

            // JON SILVER JUNE 2011
            // This is a possible drag/drop site

            if (e.Data.GetDataPresent("RenPrivateSourceFolder") == false)
            {
                emailItems.Add(Application.ActiveExplorer().Selection[1] as Outlook.MailItem);
            }
            else
            {
                for (int i = 0; i < Application.ActiveExplorer().Selection.Count; i++)
                {
                    Outlook.MailItem item = Application.ActiveExplorer().Selection[i + 1] as Outlook.MailItem;
                    emailItems.Add(item);
                }
            }
            List <EUEmailUploadFile> emailUploadFiles = CommonManager.GetEmailUploadFiles(emailItems, e, isListItemAndAttachmentMode, SaveFormatOverride.None); // JOEL JEFFERY 20110708 added SaveFormatOverride.None

            ChangeViewBackgroundWorker.RunWorkerAsync(new object[] { this, SelectedFolder, e, emailUploadFiles, isListItemAndAttachmentMode });
            //            EUEmailManager.UploadEmail(SelectedFolder, e, Application.ActiveExplorer().Selection);
        }
 public void RefreshView()
 {
     LoadingPictureBox.Visible = true;
     BackgroundWorkerAction    = "RefreshView";
     ChangeViewBackgroundWorker.RunWorkerAsync();
 }
 private void PreviousButton_Click(object sender, EventArgs e)
 {
     LoadingPictureBox.Visible = true;
     BackgroundWorkerAction    = "GoToPreviousPage";
     ChangeViewBackgroundWorker.RunWorkerAsync();
 }