コード例 #1
0
 public void CheckIfObjectIsScheduled(ProjectObject projectObject)
 {
     if (projectObject.activities.Count > 0)
     {
         if (!Activities.instance.userIsGC)
         {
             List <string> activities = projectObject.activities.FindAll(activity => Activities.instance.permittedActivities.Contains(activity));
             bool          scheduled  = true;
             for (int i = 0; i < activities.Count; i++)
             {
                 if (!projectObject.scheduledActivities.Contains(activities[i]))
                 {
                     scheduled = false;
                     break;
                 }
             }
             if (scheduled)
             {
                 projectObject.Fade();
                 projectObject.isScheduled = true;
             }
             else
             {
                 projectObject.UnFade();
                 projectObject.isScheduled = false;
             }
         }
         else
         {
             if (projectObject.scheduledActivities.Count >= projectObject.activities.Count)
             {
                 projectObject.Fade();
                 projectObject.isScheduled = true;
             }
             else
             {
                 projectObject.UnFade();
                 projectObject.isScheduled = false;
             }
         }
     }
     if (projectObject.loaded)
     {
         if (projectObject.isScheduled)
         {
             projectObject.SetLayer("Scheduled");
         }
         else
         {
             projectObject.SetLayer("Unscheduled");
         }
     }
 }
コード例 #2
0
 public void SetObjectToCircular(ProjectObject projectObject)
 {
     projectObject.SetLayer("Circular");
 }
コード例 #3
0
//	public void SetUpUidsForSelection(){
//		foreach (ProjectObject projectObject in projectObjects) {
//			//projectObject.interactiveSelect.pointerActivatesUseAction = true;
//		}
//	}
//
//	public void SetUpUidsForNavigation(){
//		foreach (ProjectObject projectObject in projectObjects) {
//			//projectObject.interactiveSelect.pointerActivatesUseAction = false;
//		}
//	}
//
//	public void SetUpScheduledObjects(){
//		foreach (ProjectStep projectStep in ProjectSteps.instance.projectSteps) {
//			foreach (string objectId in projectStep.objectIds) {
//					ProjectObject projectObject = GetObjectById(objectId);
//					SetUidToScheduled (projectObject);
//					MaterialManager.instance.FadeProjectObject (projectObject);
//			}
//		}
//	}

    public void SetObjectToUnscheduled(ProjectObject projectObject)
    {
        projectObject.SetLayer("Unscheduled");
    }