Example #1
0
    private void addClick()
    {
        _stopServer.onClick.AddListener(delegate
        {
            ProtoReq.GMStopServer(true);
        });

        _openServer.onClick.AddListener(delegate
        {
            ProtoReq.GMStopServer(false);
        });

        _button.onClick.AddListener(delegate
        {
            _panel.SetActive(true);
            _panel1.SetActive(false);
            _panel2.SetActive(false);
            _panel3.SetActive(false);
            _panel4.SetActive(false);
            _panel5.SetActive(false);
            _panel6.SetActive(false);
            _panel7.SetActive(false);
            _curText = _panel.transform.FindChild("info").GetComponent <InputField>();
        });
        _button1.onClick.AddListener(delegate
        {
            _panel.SetActive(false);
            _panel1.SetActive(true);
            _panel2.SetActive(false);
            _panel3.SetActive(false);
            _panel4.SetActive(false);
            _panel5.SetActive(false);
            _panel6.SetActive(false);
            _panel7.SetActive(false);
            ProtoReq.GMQueryAgentList();
            _curText = _panel1.transform.FindChild("info").GetComponent <InputField>();
        });
        _button2.onClick.AddListener(delegate
        {
            _panel.SetActive(false);
            _panel1.SetActive(false);
            _panel2.SetActive(true);
            _panel3.SetActive(false);
            _panel4.SetActive(false);
            _panel5.SetActive(false);
            _panel6.SetActive(false);
            _panel7.SetActive(false);
            _curText = _panel2.transform.FindChild("info").GetComponent <InputField>();
        });
        _button3.onClick.AddListener(delegate
        {
            _panel.SetActive(false);
            _panel1.SetActive(false);
            _panel2.SetActive(false);
            _panel3.SetActive(true);
            _panel4.SetActive(false);
            _panel5.SetActive(false);
            _panel6.SetActive(false);
            _panel7.SetActive(false);
            _curText = _panel3.transform.FindChild("info").GetComponent <InputField>();
        });
        _button4.onClick.AddListener(delegate
        {
            _panel.SetActive(false);
            _panel1.SetActive(false);
            _panel2.SetActive(false);
            _panel3.SetActive(false);
            _panel4.SetActive(true);
            _panel5.SetActive(false);
            _panel6.SetActive(false);
            _panel7.SetActive(false);
            _curText = _panel4.transform.FindChild("info").GetComponent <InputField>();
        });
        _button5.onClick.AddListener(delegate
        {
            _panel.SetActive(false);
            _panel1.SetActive(false);
            _panel2.SetActive(false);
            _panel3.SetActive(false);
            _panel4.SetActive(false);
            _panel5.SetActive(true);
            _panel6.SetActive(false);
            _panel7.SetActive(false);
            _curText = _panel5.transform.FindChild("info").GetComponent <InputField>();
        });
        _button6.onClick.AddListener(delegate
        {
            _panel.SetActive(false);
            _panel1.SetActive(false);
            _panel2.SetActive(false);
            _panel3.SetActive(false);
            _panel4.SetActive(false);
            _panel5.SetActive(false);
            _panel6.SetActive(true);
            _panel7.SetActive(false);
            _curText = _panel6.transform.FindChild("info").GetComponent <InputField>();
        });
        _button7.onClick.AddListener(delegate
        {
            _panel.SetActive(false);
            _panel1.SetActive(false);
            _panel2.SetActive(false);
            _panel3.SetActive(false);
            _panel4.SetActive(false);
            _panel5.SetActive(false);
            _panel6.SetActive(false);
            _panel7.SetActive(true);
            _curText = _panel7.transform.FindChild("info").GetComponent <InputField>();
            ProtoReq.GMQuerySysInfo("");
        });
    }