/// <summary> /// 初始化事件参数 /// </summary> /// <param name="total">总进度值</param> /// <param name="value">当前进度值</param> /// <param name="result">处理结果</param> /// <param name="error">异常</param> /// <param name="cancelled">进度完成是否因为被取消</param> public ProgressCompletedEventArgs(double total, double value, object result, Exception error, bool cancelled) : base(result, error, cancelled) { Total = total; Value = value; Percentage = ProgerssHelper.Percentage(total, value); }
/// <summary> /// 初始化事件参数 /// </summary> /// <param name="total">总进度值</param> /// <param name="value">当前进度值</param> /// <param name="userState">用户数据</param> public ProgressValueChangedEventArgs(double total, double value, object userState) : base((int)ProgerssHelper.Percentage(total, value), userState) { Total = total; Value = value; }