summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices')
-rw-r--r--win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj3
-rw-r--r--win/CS/HandBrake.ApplicationServices/Model/QueueItemStatus.cs5
-rw-r--r--win/CS/HandBrake.ApplicationServices/Model/QueueTask.cs75
3 files changed, 61 insertions, 22 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj b/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj
index bebc5c331..1e7b50434 100644
--- a/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj
+++ b/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj
@@ -41,6 +41,9 @@
<Optimize>true</Optimize>
</PropertyGroup>
<ItemGroup>
+ <Reference Include="Caliburn.Micro">
+ <HintPath>..\libraries\caliburn\Caliburn.Micro.dll</HintPath>
+ </Reference>
<Reference Include="Castle.Core">
<HintPath>..\libraries\caliburn\Castle.Core.dll</HintPath>
</Reference>
diff --git a/win/CS/HandBrake.ApplicationServices/Model/QueueItemStatus.cs b/win/CS/HandBrake.ApplicationServices/Model/QueueItemStatus.cs
index 774d0a788..bfaad7eaa 100644
--- a/win/CS/HandBrake.ApplicationServices/Model/QueueItemStatus.cs
+++ b/win/CS/HandBrake.ApplicationServices/Model/QueueItemStatus.cs
@@ -6,6 +6,7 @@
namespace HandBrake.ApplicationServices.Model
{
using System.ComponentModel;
+ using System.ComponentModel.DataAnnotations;
using HandBrake.ApplicationServices.Converters;
@@ -16,15 +17,19 @@ namespace HandBrake.ApplicationServices.Model
public enum QueueItemStatus
{
[Description("Waiting")]
+ [Display(Name = "Waiting")]
Waiting = 0,
[Description("In Progress")]
+ [Display(Name = "In Progress")]
InProgress,
[Description("Completed")]
+ [Display(Name = "Completed")]
Completed,
[Description("Error")]
+ [Display(Name = "Error")]
Error,
}
}
diff --git a/win/CS/HandBrake.ApplicationServices/Model/QueueTask.cs b/win/CS/HandBrake.ApplicationServices/Model/QueueTask.cs
index 8c2425ee7..f0514805c 100644
--- a/win/CS/HandBrake.ApplicationServices/Model/QueueTask.cs
+++ b/win/CS/HandBrake.ApplicationServices/Model/QueueTask.cs
@@ -5,16 +5,29 @@
namespace HandBrake.ApplicationServices.Model
{
+ using Caliburn.Micro;
+
/// <summary>
/// The QueueTask.
/// </summary>
- public class QueueTask
+ public class QueueTask : PropertyChangedBase
{
+ #region Constants and Fields
+
+ /// <summary>
+ /// The status.
+ /// </summary>
+ private QueueItemStatus status;
+
+ #endregion
+
+ #region Constructors and Destructors
+
/// <summary>
/// Initializes a new instance of the <see cref="QueueTask"/> class.
/// </summary>
public QueueTask()
- {
+ {
}
/// <summary>
@@ -28,25 +41,36 @@ namespace HandBrake.ApplicationServices.Model
this.Query = query;
}
+ #endregion
+
+ #region Properties
+
/// <summary>
- /// Gets or sets the job ID.
+ /// Gets or sets a value indicating whether if this is a user or GUI generated query
/// </summary>
- public int Id { get; set; }
+ public bool CustomQuery { get; set; }
/// <summary>
- /// Gets or sets Title.
+ /// Gets or sets Destination.
/// </summary>
- public int Title { get; set; }
+ public string Destination { get; set; }
/// <summary>
- /// Gets or sets Source.
+ /// Gets or sets the job ID.
/// </summary>
- public string Source { get; set; }
+ public int Id { get; set; }
/// <summary>
- /// Gets or sets Destination.
+ /// Gets a value indicating whether or not this instance is empty.
/// </summary>
- public string Destination { get; set; }
+ public bool IsEmpty
+ {
+ get
+ {
+ return this.Id == 0 && string.IsNullOrEmpty(this.Query) && string.IsNullOrEmpty(this.Task.Source) &&
+ string.IsNullOrEmpty(this.Task.Destination);
+ }
+ }
/// <summary>
/// Gets or sets the query string.
@@ -54,14 +78,26 @@ namespace HandBrake.ApplicationServices.Model
public string Query { get; set; }
/// <summary>
- /// Gets or sets a value indicating whether if this is a user or GUI generated query
+ /// Gets or sets Source.
/// </summary>
- public bool CustomQuery { get; set; }
+ public string Source { get; set; }
/// <summary>
/// Gets or sets Status.
/// </summary>
- public QueueItemStatus Status { get; set; }
+ public QueueItemStatus Status
+ {
+ get
+ {
+ return this.status;
+ }
+
+ set
+ {
+ this.status = value;
+ this.NotifyOfPropertyChange(() => this.Status);
+ }
+ }
/// <summary>
/// Gets or sets the Encode Task.
@@ -69,15 +105,10 @@ namespace HandBrake.ApplicationServices.Model
public EncodeTask Task { get; set; }
/// <summary>
- /// Gets a value indicating whether or not this instance is empty.
+ /// Gets or sets Title.
/// </summary>
- public bool IsEmpty
- {
- get
- {
- return this.Id == 0 && string.IsNullOrEmpty(this.Query) && string.IsNullOrEmpty(this.Task.Source) &&
- string.IsNullOrEmpty(this.Task.Destination);
- }
- }
+ public int Title { get; set; }
+
+ #endregion
}
} \ No newline at end of file