Пример #1
0
        public void SendStatus(StatusChangedEnum type, object data, long tasksToAdd)
        {
            tasksDone += tasksToAdd;
            lastTDone  = tasksDone;

            if (tasksDone < 0)
            {
                tasksDone = 0;
            }
            if (tasksTotal == 0)
            {
                tasksTotal = 1;
            }
            if (StatusChanged != null)
            {
                StatusChanged(this, new StatusChangedEventArgs
                {
                    TotalTasks = tasksTotal,
                    TasksDone  = tasksDone,
                    Percentage = (double)tasksDone / (double)tasksTotal * 100.00,
                    Type       = type,
                    data       = data
                });
            }
        }
Пример #2
0
        public void SendStatus(StatusChangedEnum type, object data, long tasksToAdd)
        {
            tasksDone += tasksToAdd;
            lastTDone = tasksDone;

            if (tasksDone < 0) tasksDone = 0;
            if (tasksTotal == 0) tasksTotal = 1;
            if (StatusChanged != null)
            {
                StatusChanged(this, new StatusChangedEventArgs
                                        {
                    TotalTasks = tasksTotal,
                    TasksDone = tasksDone,
                    Percentage = (double)tasksDone / (double)tasksTotal * 100.00,
                    Type = type,
                    data = data
                });
            }
        }
Пример #3
0
 public void SendStatus(StatusChangedEnum type)
 {
     SendStatus(type, null, 0);
 }
Пример #4
0
 public void SendStatus(StatusChangedEnum type)
 {
     SendStatus(type, null, 0);
 }