public void ProcessTaskInfoRequest(TaskInfoRequest taskInfoRequest)
        {
            TaskInfoResponse taskInfoResponse = new TaskInfoResponse();

            taskInfoResponse.AdoptHeader(taskInfoRequest);

            foreach (Task task in taskInfoRequest.Tasks)
            {
                switch (task.Type)
                {
                case TaskType.Output:
                    taskInfoResponse.Tasks.Add(this.outputCore.GetTaskInformation(task, taskInfoRequest.IncludeTaskDetails));
                    break;

                case TaskType.StockDelivery:
                    taskInfoResponse.Tasks.Add(this.stockDeliverySetCore.GetTaskInformation(task, taskInfoRequest.IncludeTaskDetails));
                    break;

                default:
                    break;
                }
            }

            taskInfoResponse.ConverterStream.Write(taskInfoResponse);
        }
Ejemplo n.º 2
0
    // Use this for initialization
    void Awake()
    {
        taskInfoRequest       = GetComponent <TaskInfoRequest>();
        scheduleAmountRequest = GetComponent <ScheduleAmountRequest>();
        Transform info     = transform.Find("Info");
        Transform calendar = transform.Find("Calendar");
        Transform task     = transform.Find("Task");

        name  = info.Find("Name").GetComponent <Text>();
        age   = info.Find("Age").GetComponent <Text>();
        sex   = info.Find("Sex").GetComponent <Text>();
        image = info.Find("Image").GetComponent <CircleImage>();
        transform.Find("ShareButton").GetComponent <Button>().onClick.AddListener(OnShareButtonClick);
        transform.Find("KnowledgeButton").GetComponent <Button>().onClick.AddListener(Knowledge);
        amount = calendar.Find("Amount").GetComponent <Text>();
        calendar.GetComponent <Button>().onClick.AddListener(Calendar);
        task.GetComponent <Button>().onClick.AddListener(Task);
        transform.Find("History").GetComponent <Button>().onClick.AddListener(History);
        taskText  = transform.Find("Task/TaskText").GetComponent <Text>();
        fillImage = transform.Find("Task/FillImage").GetComponent <Image>();
        score     = fillImage.transform.Find("Score").GetComponent <Text>();
    }