示例#1
0
        /// <summary>
        /// Wrapper that suspends error list refreshes for the duration of the batch function.
        /// </summary>
        /// <param name="action">The action.</param>
        /// <param name="fileNames">Names of the files.</param>
        /// <param name="batch">The batch.</param>
        private void BatchAction(ErrorListAction action, IEnumerable <string> fileNames, Action batch)
        {
            this.SuspendRefresh();

            try
            {
                batch();

                var handler = this.ErrorListChange;

                if (handler != null)
                {
                    var e = new ErrorListChangeEventArgs(action, fileNames);

                    handler(this, e);
                }
            }
            finally
            {
                this.ResumeRefresh();
            }
        }
 public ErrorListChangeEventArgs(ErrorListAction action, IEnumerable <string> fileNames)
 {
     this.Action    = action;
     this.FileNames = fileNames;
 }
        /// <summary>
        /// Wrapper that suspends error list refreshes for the duration of the batch function.
        /// </summary>
        /// <param name="action">The action.</param>
        /// <param name="fileNames">Names of the files.</param>
        /// <param name="batch">The batch.</param>
        private void BatchAction(ErrorListAction action, IEnumerable<string> fileNames, Action batch)
        {
            this.SuspendRefresh();

            try
            {
                batch();

                var handler = this.ErrorListChange;

                if (handler != null)
                {
                    var e = new ErrorListChangeEventArgs(action, fileNames);

                    handler(this, e);
                }
            }
            finally
            {
                this.ResumeRefresh();
            }
        }
 public ErrorListChangeEventArgs(ErrorListAction action, IEnumerable<string> fileNames)
 {
     this.Action = action;
     this.FileNames = fileNames;
 }