Beispiel #1
0
 /// <summary>
 /// Delegated method of accessing UI elements in the threads
 /// </summary>
 /// <param name="sender">Sender of the event</param>
 /// <param name="e">The FilesAddedEventArgs instance</param>
 private void Delegated_OnAfterAddFolder(object sender, FilesAddedEventArgs e)
 {
     if (this.InvokeRequired)
     {
         AfterAddFolderDelegate d = new AfterAddFolderDelegate(Delegated_OnAfterAddFolder);
         this.Invoke(d, new object[] { sender, e });
     }
     else
     {
         OnAfterAddFolder(sender, e);
     }
 }
Beispiel #2
0
        private void selectedFilesAndFoldersForm_AfterAddFolder(object sender, FilesAddedEventArgs e)
        {
            GetTool("mnuRefreshFileTreeViewCurrentNode").SharedProps.Enabled = true;
            GetTool("mnuRefreshFileTree").SharedProps.Enabled = true;
            GetTool("mnuRefreshFileTreeViewEntireTree").SharedProps.Enabled = true;
            GetTool("mnuFileTreeNodeProperty").SharedProps.Enabled = true;
            fileTreeView.Enabled = true;
            taskManager.Enabled = true;

            statusBar.Panels["ApplicationInformationCaption"].Text = SunnyChen.Gulu.Win.Properties.Resources.TEXT_SEARCH_COMPLETED;
            statusBar.Panels["ApplicationInformation"].Text = string.Format(SunnyChen.Gulu.Win.Properties.Resources.TEXT_SEARCH_RESULT, e.FilesAdded);
            statusBar.Refresh();
            statusBar.Invalidate();
        }
Beispiel #3
0
        /// <summary>
        /// Event just fired after the file list has been populated
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void OnAfterAddFolder(object sender, FilesAddedEventArgs e)
        {
            fileList.VirtualListSize = items__.Count;

            toolbarsManager.Tools["mnuStopSearch"].SharedProps.Enabled = false;

            if (fileList.VirtualListSize > 0 && items__.Count > 0)
            {
                toolbarsManager.Tools["mnuClearList"].SharedProps.Enabled = true;
                toolbarsManager.Tools["mnuCheckAll"].SharedProps.Enabled = true;
                toolbarsManager.Tools["mnuUncheckAll"].SharedProps.Enabled = true;
            }

            if (AfterAddFolder != null)
            {
                AfterAddFolder(sender, e);
            }
        }