2018-07-02 23:31:16 -05:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace butterflow_ui
|
|
|
|
|
{
|
2018-07-03 18:59:28 -05:00
|
|
|
|
/// <summary> A butterflow video subregion. Represents a snippet of a video on which butterflow will act. </summary>
|
2018-07-05 02:00:37 -05:00
|
|
|
|
[Serializable]
|
2018-07-03 18:59:28 -05:00
|
|
|
|
public class ButterflowSubregion : PropertyChangedAlerter
|
2018-07-02 23:31:16 -05:00
|
|
|
|
{
|
|
|
|
|
#region Members
|
|
|
|
|
|
|
|
|
|
/// <summary> The start of the subregion. </summary>
|
|
|
|
|
private TimeSpan start = TimeSpan.Zero;
|
|
|
|
|
/// <summary> The end of the subregion. </summary>
|
|
|
|
|
private TimeSpan end = TimeSpan.Zero;
|
|
|
|
|
/// <summary> Type of opersion to perform on the subregion. </summary>
|
|
|
|
|
private RegionType subregionType;
|
|
|
|
|
/// <summary> The value targeted for the subregion. </summary>
|
|
|
|
|
private decimal value;
|
|
|
|
|
/// <summary> True if the subregion runs to the end, false if not. </summary>
|
|
|
|
|
private bool toEnd;
|
2018-07-04 19:46:33 -05:00
|
|
|
|
/// <summary> A unique identifier used to locate this subregion withing a subregion collection. </summary>
|
|
|
|
|
private Guid identifier = new Guid();
|
2018-07-02 23:31:16 -05:00
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region Properties
|
|
|
|
|
|
|
|
|
|
/// <summary> Gets or sets the start of the subregion. </summary>
|
|
|
|
|
/// <value> The start of the subregion. </value>
|
|
|
|
|
public TimeSpan Start
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return this.start;
|
|
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
this.start = value;
|
|
|
|
|
OnPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary> Gets or sets the end of the subregion. </summary>
|
|
|
|
|
/// <value> The end of the subregion. </value>
|
|
|
|
|
public TimeSpan End
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return this.end;
|
|
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
this.end = value;
|
|
|
|
|
OnPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary> Gets or sets the operation to be performed on the subregion. </summary>
|
|
|
|
|
/// <value> The operation to be performed on subregion. </value>
|
|
|
|
|
public RegionType SubregionType
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return this.subregionType;
|
|
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
this.subregionType = value;
|
|
|
|
|
OnPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary> Gets or sets the targeted value of the subregion. </summary>
|
|
|
|
|
/// <value> The value targeted for the subregion. </value>
|
|
|
|
|
public decimal Value
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return this.value;
|
|
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
this.value = value;
|
|
|
|
|
OnPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary> Gets or sets a value indicating whether the subregion runs to the end of the video. </summary>
|
|
|
|
|
/// <value> True if the subregion runs to the end, false if not. </value>
|
|
|
|
|
public bool ToEnd
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return this.toEnd;
|
|
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
this.toEnd = value;
|
|
|
|
|
OnPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
2018-07-04 19:46:33 -05:00
|
|
|
|
|
|
|
|
|
/// <summary> Gets a unique identifier used to locate this subregion withing a subregion collection. </summary>
|
|
|
|
|
/// <value> The unique identifier. </value>
|
|
|
|
|
public Guid Identifier
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return this.identifier;
|
|
|
|
|
}
|
2018-07-05 02:00:37 -05:00
|
|
|
|
private set
|
|
|
|
|
{
|
|
|
|
|
this.identifier = value;
|
|
|
|
|
OnPropertyChanged();
|
|
|
|
|
}
|
2018-07-04 19:46:33 -05:00
|
|
|
|
}
|
2018-07-02 23:31:16 -05:00
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
}
|