-
Notifications
You must be signed in to change notification settings - Fork 4
/
ScheduledTask.cs
83 lines (74 loc) · 2.17 KB
/
ScheduledTask.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HPMSdk;
namespace Hansoft.ObjectWrapper
{
/// <summary>
/// Represents a scheduled task in the Schedule view of Hansoft.
/// </summary>
public class ScheduledTask : Task
{
internal static ScheduledTask GetScheduledTask(HPMUniqueID uniqueID, HPMUniqueID uniqueTaskID)
{
return new ScheduledTask(uniqueID, uniqueTaskID);
}
private ScheduledTask(HPMUniqueID uniqueID, HPMUniqueID uniqueTaskID)
: base(uniqueID, uniqueTaskID)
{
}
/// <summary>
/// The project view that this scheduled task belongs to.
/// </summary>
public override ProjectView ProjectView
{
get
{
return Project.Schedule;
}
}
/// <summary>
/// The Duaration of the task
/// </summary>
public int Duration
{
get
{
return Session.TaskGetDuration(UniqueTaskID);
}
}
/// <summary>
/// The assignment percentage of a particular user that is assigned to this scheduled task.
/// </summary>
/// <param name="user">The name of the user.</param>
/// <returns>The assignment percentage.</returns>
public int GetAssignmentPercentage(User user)
{
return TaskHelper.GetAssignmentPercentage(this, user);
}
/// <summary>
/// True if this scheduled task is assigned, False otherwise.
/// </summary>
public bool IsAssigned
{
get
{
return TaskHelper.IsAssigned(this);
}
}
/// <summary>
/// Not applicable for scheduled tasks
/// </summary>
public override HansoftEnumValue Priority
{
get
{
return new HansoftEnumValue(MainProjectID, EHPMProjectDefaultColumn.SprintPriority, EHPMTaskAgilePriorityCategory.None, (int)EHPMTaskAgilePriorityCategory.None);
}
set
{
}
}
}
}