Example #1
0
 public void TriggerOnCountersChange(FolderIconChangerCounters pCounters)
 {
     if (this.OnCountersChange != null)
     {
         this.OnCountersChange(this, new FolderIconChangerCountersEventArgs(pCounters));
     }
 }
Example #2
0
        /// <summary>
        /// Executing the folder icon changer
        /// </summary>
        public void Execute()
        {
            if (this.Icons == null)
            {
                throw new Exception(Resources.FolderIconChanger.IconsNotLoaded);
            }
            if (this.FileSystem == null)
            {
                throw new Exception(Resources.FolderIconChanger.FileSystemNotLoaded);
            }

            this.Counters = new FolderIconChangerCounters();

            this.Icons.BuildDictionary();

            BackgroundWorker lExecuteBackgroundWorker = new BackgroundWorker();

            lExecuteBackgroundWorker.WorkerReportsProgress      = true;
            lExecuteBackgroundWorker.WorkerSupportsCancellation = false;
            lExecuteBackgroundWorker.DoWork          += this.ExecuteBackgroundWorkerDoWork;
            lExecuteBackgroundWorker.ProgressChanged += this.ExecuteBackgroundWorkerProgressChanged;
            lExecuteBackgroundWorker.RunWorkerAsync();
        }
Example #3
0
 /// <summary>
 /// Standard constructor
 /// </summary>
 public FolderIconChanger()
 {
     this.Icons      = null;
     this.FileSystem = null;
     this.Counters   = new FolderIconChangerCounters();
 }
Example #4
0
 /// <summary>
 /// Standard constructor
 /// </summary>
 /// <param name="pCounters">Counters</param>
 public FolderIconChangerCountersEventArgs(FolderIconChangerCounters pCounters)
     : base()
 {
     this.Counters = pCounters;
 }