Changeset 2 for Common/FormProgress.cs


Ignore:
Timestamp:
Feb 14, 2019, 5:29:40 PM (5 years ago)
Author:
chronos
Message:
  • Added: Registry extension methods.
  • Added: Search history in Find dialog.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Common/FormProgress.cs

    r1 r2  
    7777        private void bg_DoWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
    7878        {
     79            if (e.Error != null)
     80            {
     81                currentTask.terminated = true;
     82                MessageBox.Show(e.Error.Message, "Error in background task", MessageBoxButtons.OK, MessageBoxIcon.Error);
     83            }
    7984            if (!currentTask.terminated)
    8085            {
     
    9196            }
    9297            else Close();
    93             if (e.Error != null)
    94             {
    95                 MessageBox.Show(e.Error.Message, "Error in background task", MessageBoxButtons.OK, MessageBoxIcon.Error);
    96             }
    9798        }
    9899
     
    134135            foreach (var task in tasks)
    135136            {
    136                 if (task.completed) completed += 1;               
     137                if (task.completed) completed += 1;
    137138            }
    138139            return completed == tasks.Count;
     
    154155        public int current;
    155156        public bool terminated;
    156         public bool completed; // If task was not terminated durring execution.
     157        public bool completed; // If task was not terminated during execution.
    157158        public string operation;
    158159        public delegate void CallbackEventHandler(Progress progress);
Note: See TracChangeset for help on using the changeset viewer.