void OnMouseUp()
    {
        Task t1 = new Task();
        t1.setId_Task(1);
        t1.setDescripcion("Esta es una tarea de prueba, que tal?");
        t1.setResponsable("Nicola");
        t1.setEstado("TO DO");
        t1.setT_Estimado(2);
        t1.setT_Total(1);
        t1.setPrioridad(2);

        Task t2 = new Task();
        t2.setId_Task(2);
        t2.setDescripcion("Esta es una tarea de prueba, que tal?");
        t2.setResponsable("Chupe");
        t2.setEstado("TO DO");
        t2.setT_Estimado(2);
        t2.setT_Total(1);
        t2.setPrioridad(2);

        Task t3 = new Task();
        t3.setId_Task(3);
        t3.setDescripcion("Esta es una tarea de prueba, que tal?");
        t3.setResponsable("Ari");
        t3.setEstado("TO DO");
        t3.setT_Estimado(2);
        t3.setT_Total(1);
        t3.setPrioridad(2);

        Task t4 = new Task();
        t4.setId_Task(4);
        t4.setDescripcion("Esta es una tarea de prueba, que tal?");
        t4.setResponsable("Ari");
        t4.setEstado("TO DO");
        t4.setT_Estimado(2);
        t4.setT_Total(1);
        t4.setPrioridad(2);

        Task t5 = new Task();
        t5.setId_Task(5);
        t5.setDescripcion("Esta es una tarea de prueba, que tal?");
        t5.setResponsable("Ari");
        t5.setEstado("TO DO");
        t5.setT_Estimado(2);
        t5.setT_Total(1);
        t5.setPrioridad(2);

        Task t6 = new Task();
        t6.setId_Task(6);
        t6.setDescripcion("Esta es una tarea de prueba, que tal?");
        t6.setResponsable("Ari");
        t6.setEstado("TO DO");
        t6.setT_Estimado(2);
        t6.setT_Total(1);
        t6.setPrioridad(2);

        //g.AddComponent("GUI_DetalleTarea");
        UserStory u = new UserStory();
        ArrayList lista = new ArrayList();
        lista.Add(t1);
        lista.Add(t2);
        lista.Add(t3);
        lista.Add(t4);
        lista.Add(t5);
        lista.Add(t6);
        lista.Add(t1);
        lista.Add(t2);
        lista.Add(t3);
        lista.Add(t4);
        lista.Add(t5);
        lista.Add(t6);
        u.setId_UserStory(123);
        u.setListaTareas(lista);
        u.setDescripcion("Esta es una User Story de prueba, que tal? hhhhhhhhhhhhhhhhhhhhhhhoooooooooooooooooooooooooooooolaaaaaaaaaaaaaaaaa");
        u.setPrioridad(2);
        //		u.dibujar();
    }
Esempio n. 2
0
    void doNewSprintWindow(int windowID)
    {
        inicio = 30;
        height = 20;
        offset = 0;

        offset= 10; inicio = inicio + height;
        titulo = GUIComponents.labelTextField(new Rect(20,inicio+offset,maxWidth-40,height),titulo,"Titulo",220);
        inicio = inicio + height + offset;
        descripcion = GUIComponents.labelTextArea(new Rect(20,inicio+offset ,maxWidth-40,height*4),descripcion,"Descripcion");
        inicio = inicio + height*4 + offset;
        responsable =GUIComponents.labelTextField(new Rect(20,inicio+offset ,maxWidth-40,height),responsable,"Responsable",220);
        inicio = inicio + height + offset;
        t_Estimado = GUIComponents.labelTextField(new Rect(20,inicio+offset,maxWidth-200,height),t_Estimado,"Tiempo estimado",60);
        inicio = inicio + height + offset;
        t_Total = GUIComponents.labelTextField(new Rect(20,inicio+offset,maxWidth-200,height),t_Total,"Tiempo total",60);
        inicio = inicio + height + offset;
        estado = GUIComponents.labelTextField(new Rect(20,inicio+offset,maxWidth-200,height),estado,"Estado",60);
        inicio = inicio + height + offset;
        prioridad = GUIComponents.labelTextField(new Rect(20,inicio+offset,maxWidth-200,height),prioridad,"Prioridad",60);
        inicio = inicio + height + offset;

        if(GUI.Button(new Rect (maxWidth/3-100,maxHeight-35,140,20), "Cargar Tarea")){
            if (titulo.Equals("") || descripcion.Equals("") || responsable.Equals("")||t_Estimado.Equals("") || t_Total.Equals("") || estado.Equals("")||prioridad.Equals("")){
                desactivarVentana();
                incVentana();
                setTitulo("ERROR");
                setMensaje("Debe completar todos los campos");
                setLlamador("GUI_CargarTask");
                ejecutar("GUI_Error");
                }
            else{
                Task t = new Task();
                t.setId_Task(this.getIdTask()+1);
                t.setTitulo(titulo);
                t.setDescripcion(descripcion);
                t.setResponsable(responsable);
                t.setT_Estimado(Convert.ToInt32(t_Estimado));
                t.setT_Total(Convert.ToInt32(t_Total));
                t.setEstado(estado);
                t.setPrioridad(Convert.ToInt32(prioridad));

                t.setId_Story(ant.getUserStory().getId_UserStory());
                MultiPlayer.Instance.getSmartFox().Send(new ExtensionRequest("crearTask",t.toSFSObject()));
                //NextStories button = (NextStories)GameObject.Find("ButtonNextStories").GetComponent("NextStories");
                //button.addTarea(t);
                desactivarVentana();
                incVentana();
                GameObject g = new GameObject();
                UnityEngineInternal.APIUpdaterRuntimeServices.AddComponent(g, "Assets/Game/Scripts/GUInterface/GUI_CargarTask.cs (135,5)", "GUI_Mensaje");
                g.SendMessage("setTitulo","Nueva Tarea");
                g.SendMessage("setMensaje","La Tarea fue cargada exitosamente.");
                g.SendMessage("Mostrar");
                limpiarFormulario();
            }
        }
        if (GUI.Button(new Rect(2*maxWidth/3-50,maxHeight-35,140,20),"Cancelar")){
            sprintWindow = false;
            ant.Mostrar();
            Destroy(this);
        }
    }