60 lines
1.8 KiB
C#
60 lines
1.8 KiB
C#
using System.Windows;
|
|
using Prism.Events;
|
|
using System.Windows.Media;
|
|
|
|
namespace DTS.Common.Events
|
|
{
|
|
/// <summary>
|
|
/// Progress bar event
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// notification event for progress bars
|
|
/// </remarks>
|
|
public class ProgressBarEvent : PubSubEvent<ProgressBarEventArg> { }
|
|
|
|
public class ProgressBarEventArg
|
|
{
|
|
/// <summary>
|
|
/// progress bar the event belongs to
|
|
/// </summary>
|
|
public string ProgressBarName { get; }
|
|
/// <summary>
|
|
/// the AggregateStatusColor bar color
|
|
/// </summary>
|
|
public Color ProgressBarColor { get; set; }
|
|
|
|
public bool SetPercentage { get; set; } = false;
|
|
/// <summary>
|
|
/// progress bar percentage to set (1-100)
|
|
/// </summary>
|
|
public double ProgressBarPercentage { get; set; }
|
|
|
|
public bool SetText { get; set; } = false;
|
|
/// <summary>
|
|
/// the Aggregate status text to set on the progress bar
|
|
/// </summary>
|
|
public string ProgressBarText { get; set; }
|
|
|
|
public bool SetVisibility { get; set; } = false;
|
|
/// <summary>
|
|
/// the visibility for the progress bar
|
|
/// </summary>
|
|
public Visibility ProgressBarVisibility { get; set; }
|
|
|
|
public ProgressBarEventArg(string name, Color color, Visibility visibility = Visibility.Visible, double percentage = double.NaN, string text = null)
|
|
{
|
|
ProgressBarName = name;
|
|
ProgressBarColor = color;
|
|
ProgressBarPercentage = percentage;
|
|
ProgressBarText = text;
|
|
ProgressBarVisibility = visibility;
|
|
}
|
|
|
|
public ProgressBarEventArg()
|
|
{
|
|
ProgressBarName = "Footer";
|
|
}
|
|
}
|
|
|
|
}
|