void click()
    {
        model = GameObject.Find("ModelPhases");
        pack rules = new pack();



        ModelPhases modelScr = model.GetComponent <ModelPhases>();
        // string name = inputName.GetComponent<TMP_InputField>().text;
        //string desc = inputDesc.GetComponent<TMP_InputField>().text;
        int n;

        string[]       descs = new string[1];
        ButtonListener but   = gameObject.GetComponent <ButtonListener>();

        idphases = getRelatedPhases();
        p        = relatedPhases.GetComponent <SelectionFromAPI>().getPackList(idphases);

        List <string> param = appendAllParams();

        rules.vars = param;
        rules.name = selectedRules;
        p.Add(rules);
        string output = JsonConvert.SerializeObject(p);

        print(output);
        modelScr.addRulesToPhases(idphases, projectName, output, applyInServerResponse);
    }
    public void setProjectName(string name)
    {
        projectName = name;
        ModelPhases modelRes = GameObject.Find("ModelPhases").GetComponent <ModelPhases>();

        modelRes.getAll(projectName, applyinResponse);
    }
    void click()
    {
        model = GameObject.Find("ModelPhases");
        ModelPhases modelScr = model.GetComponent <ModelPhases>();

        modelScr.removeElem(idToRemove, projectName, callDispatcher);
    }
    void click()
    {
        model = GameObject.Find("ModelPhases");
        ModelPhases modelScr = model.GetComponent <ModelPhases>();
        string      name     = inputName.GetComponent <TMP_InputField>().text;
        string      desc     = inputDesc.GetComponent <TMP_InputField>().text;
        string      priority = inputPriority.GetComponent <TMP_InputField>().text;
        int         n;
        bool        isNumeric = int.TryParse(priority, out n);

        if (isNumeric == false)
        {
            return;
        }
        modelScr.addCollections(name, desc, priority, projectId.ToString(), projectName, applyInServerResponse);
    }
    public override void apply()
    {
        int id = int.Parse(args["id"]);

        projectName = args["project_name"];
        model       = GameObject.Find("ModelPhases");
        ModelPhases modelScr = model.GetComponent <ModelPhases>();

        modelScr.find(id, projectName, applyInServerResponse);
        ConfirmModifyPhaseButton butScr = confirmButton.GetComponent <ConfirmModifyPhaseButton>();

        butScr.setProjectId(args["project_id"]);
        butScr.setIdToModify(id);
        butScr.setProjectName(projectName);
        RemovePhaseButton removeBut = removeButton.GetComponent <RemovePhaseButton>();

        removeBut.setProjectId(args["project_id"]);
        removeBut.setIdToRemove(id);
        removeBut.setProjectName(projectName);
    }
    void click()
    {
        model = GameObject.Find("ModelPhases");
        ModelPhases modelScr = model.GetComponent <ModelPhases>();
        string      name, desc, priority;

        if (inputPriority.activeSelf && inputName.activeSelf && inputDesc.activeSelf)
        {
            name     = inputName.GetComponent <TMP_InputField>().text;
            desc     = inputDesc.GetComponent <TMP_InputField>().text;
            priority = inputPriority.GetComponent <TMP_InputField>().text;
            int  n;
            bool isNumeric = int.TryParse(priority, out n);
            if (isNumeric == false)
            {
                return;
            }
        }
        else
        {
            name     = null;
            desc     = null;
            priority = null;
        }



        List <pack> packList = parent.GetComponent <ModifyPhaseController>().getPackList();
        string      json;

        if (packList.Count == 0)
        {
            json = JsonConvert.SerializeObject(new List <pack>());
        }
        json = JsonConvert.SerializeObject(packList);
        print("jeez" + json);

        modelScr.updateField(idToModify.ToString(), projectId, projectName, name, desc, priority, json, CallDispatcher);
    }
示例#7
0
    public override void apply()
    {
        Model = GameObject.Find("Model");

        ModelRessources = GameObject.Find("ModelRessource");

        modelPhases = GameObject.Find("ModelPhases");
        ModelCards  = GameObject.Find("ModelCard");

        foreach (KeyValuePair <string, string> arg in args)
        {
            id = int.Parse(args["id"]);
        }
        projectName = args["project_name"];
        Model       = GameObject.Find("Model");
        newResBut.GetComponent <CreateRessourceButton>().setProjectId(id);
        newResBut.GetComponent <CreateRessourceButton>().setProjectName(projectName);
        createPhaseBut.GetComponent <CreateRessourceButton>().setProjectId(id);
        createPhaseBut.GetComponent <CreateRessourceButton>().setProjectName(projectName);
        updateProj.GetComponent <ConfirmModifyButton>().setIdToModify(id);
        updateProj.GetComponent <ConfirmModifyButton>().setProjectName(projectName);
        createCardBut.GetComponent <CreateCardButton>().setProjectId(id);
        createCardBut.GetComponent <CreateCardButton>().setProjectName(projectName);
        createRuleBut.GetComponent <CreateCardButton>().setProjectName(projectName);
        ModelTest ModelScript = Model.GetComponent <ModelTest>();

        ModelScript.find(projectName, applyInServerResponse);
        ModelCard modelCardScript = ModelCards.GetComponent <ModelCard>();

        modelCardScript.getAll(projectName, applyForCards);
        ModelRessource ModelRessourceScr = ModelRessources.GetComponent <ModelRessource>();

        ModelRessourceScr.getAll(projectName, applyForRessource);
        ModelPhases modelPhasesScr = modelPhases.GetComponent <ModelPhases>();

        modelPhasesScr.getAll(projectName, applyForPhases);
    }