init
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
using System.Windows;
|
||||
using Microsoft.Practices.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 : CompositePresentationEvent<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";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user