00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 using System;
00013 using System.ComponentModel;
00014
00015 namespace Mcs.Epm.MicrosoftProject.mpFx
00016 {
00017
00018
00019
00020
00021 public class ProjectCreationOptions
00022 {
00023 #region Public Constants
00024
00025 public const int MAX_PROJECT_NAME_LENGTH = 255;
00026
00027 #endregion
00028
00029 #region Instance Data
00030
00031 private string _Name;
00032 private Guid _Guid;
00033 private bool _ScheduleFromStart;
00034 private DateTime _ScheduleFromDate;
00035 private DateTime _StatusDate;
00036 private Guid _CalendarGuid;
00037 private bool _CalculateActualCosts;
00038 private int _NumberOfSlackDaysBeforeCritical;
00039 private bool _HonorConstraints;
00040 private bool _MoveEndCompletedPartsForwardStatusDate;
00041 private bool _MoveEndCompletedPartsAfterStatusDateBackStatusDate;
00042 private bool _MoveStartRemainingPartsBeforeStatusDateForwardStatusDate;
00043 private bool _MoveStartRemainingPartsBackStatusDate;
00044 private bool _CalculateMultipleCriticalPaths;
00045 private bool _SplitInProgressTasks;
00046 private bool _SpreadActualCosts;
00047 private bool _SpreadPercentCompleteToStatusDate;
00048 private bool _AutoCalculateActualAndRemainingWorkAndCosts;
00049
00050 #endregion
00051
00052 #region Public Properties
00053
00054 [Description("Globally unique identifier for the project")]
00055 public Guid Guid
00056 {
00057 get { return _Guid; }
00058 set { _Guid = value; }
00059 }
00060
00061 [Description("Project name")]
00062 public string Name
00063 {
00064 get { return _Name; }
00065
00066 set
00067 {
00068 if (!string.IsNullOrEmpty(value))
00069 {
00070 if (value.Length > MAX_PROJECT_NAME_LENGTH)
00071 {
00072 _Name = value.Substring(0, MAX_PROJECT_NAME_LENGTH);
00073 }
00074 else
00075 {
00076 _Name = value;
00077 }
00078 }
00079 }
00080 }
00081
00082 [Description("True to schedule from start date, false to schedule from finish date")]
00083 public bool ScheduleFromStart
00084 {
00085 get { return _ScheduleFromStart; }
00086 set { _ScheduleFromStart = value; }
00087 }
00088
00089 [Description("Schedule From Date (if Schedule From Start Date is true, this is Start Date, otherwise Finish Date")]
00090 public DateTime ScheduleFromDate
00091 {
00092 get { return _ScheduleFromDate; }
00093 set { _ScheduleFromDate = value; }
00094 }
00095
00096 [Description("Status Date of the Project")]
00097 public DateTime StatusDate
00098 {
00099 get { return _StatusDate; }
00100 set { _StatusDate = value; }
00101 }
00102
00103 [Description("Guid of the Calendar to use or empty for Standard")]
00104 public Guid CalendarGuid
00105 {
00106 get { return _CalendarGuid; }
00107 set { _CalendarGuid = value; }
00108 }
00109
00110 [Description("True for project to calculate actual costs")]
00111 public bool CalculateActualCosts
00112 {
00113 get { return _CalculateActualCosts; }
00114 set { _CalculateActualCosts = value; }
00115 }
00116
00117 [Description("Specifies the number of days that a task can go past its end date before Project marks that task as critical.")]
00118 public int NumberOfSlackDaysBeforeCritical
00119 {
00120 get { return _NumberOfSlackDaysBeforeCritical; }
00121 set { _NumberOfSlackDaysBeforeCritical = value; }
00122 }
00123
00124 [Description("Specifies whether scheduling constraints take precedence over dependencies.")]
00125 public bool HonorConstraints
00126 {
00127 get { return _HonorConstraints; }
00128 set { _HonorConstraints = value; }
00129 }
00130
00131 [Description("Indicates whether to move the end date of completed parts forward to the status date, if the actual end date falls before the status date. ")]
00132 public bool MoveEndCompletedPartsForwardStatusDate
00133 {
00134 get { return _MoveEndCompletedPartsForwardStatusDate; }
00135 set { _MoveEndCompletedPartsForwardStatusDate = value; }
00136 }
00137
00138 [Description("Indicates whether to move the end date of completed parts back to the status date, if the actual end data falls after the status date. ")]
00139 public bool MoveStartRemainingPartsBackStatusDate
00140 {
00141 get { return _MoveStartRemainingPartsBackStatusDate; }
00142 set { _MoveStartRemainingPartsBackStatusDate = value; }
00143 }
00144
00145 [Description("Indicates whether to move the start date of remaining parts forward to the status date, if the actual start date falls before the status date. ")]
00146 public bool MoveStartRemainingPartsBeforeStatusDateForwardStatusDate
00147 {
00148 get { return _MoveStartRemainingPartsBeforeStatusDateForwardStatusDate; }
00149 set { _MoveStartRemainingPartsBeforeStatusDateForwardStatusDate = value; }
00150 }
00151
00152 [Description("Indicates whether to move the start date of the remaining parts back to the status date, if the actual start date falls after the status date. ")]
00153 public bool MoveEndCompletedPartsAfterStatusDateBackStatusDate
00154 {
00155 get { return _MoveEndCompletedPartsAfterStatusDateBackStatusDate; }
00156 set { _MoveEndCompletedPartsAfterStatusDateBackStatusDate = value; }
00157 }
00158
00159 [Description("Indicates whether to calculate multiple critical paths.")]
00160 public bool CalculateMultipleCriticalPaths
00161 {
00162 get { return _CalculateMultipleCriticalPaths; }
00163 set { _CalculateMultipleCriticalPaths = value; }
00164 }
00165
00166 [Description("Indicates whether to split tasks that are in progress. ")]
00167 public bool SplitInProgressTasks
00168 {
00169 get { return _SplitInProgressTasks; }
00170 set { _SplitInProgressTasks = value; }
00171 }
00172
00173 [Description("Indicates whether actual costs are spread to the status date or to the stop date. ")]
00174 public bool SpreadActualCosts
00175 {
00176 get { return _SpreadActualCosts; }
00177 set { _SpreadActualCosts = value; }
00178 }
00179
00180 [Description("Indicates whether percent complete is spread to the status date or to the task finish date. ")]
00181 public bool SpreadPercentCompleteToStatusDate
00182 {
00183 get { return _SpreadPercentCompleteToStatusDate; }
00184 set { _SpreadPercentCompleteToStatusDate = value; }
00185 }
00186
00187 [Description("Indicates whether Project Server automatically calculates actual and remaining work and costs. ")]
00188 public bool AutoCalculateActualAndRemainingWorkAndCosts
00189 {
00190 get { return _AutoCalculateActualAndRemainingWorkAndCosts; }
00191 set { _AutoCalculateActualAndRemainingWorkAndCosts = value; }
00192 }
00193
00194 #endregion
00195 }
00196 }
00197
00198
00199
00200
00201
00202