Пример #1
0
        private void validatePin()
        {
            pin = pinArea.GetComponent <InputField>().text;
            Debug.Log(pin);
            string url = "http://37.148.210.36:8081/connectWithHololens?pin=" + pin;

            byte[] array = null;
            HttpResponseHandler myHandler1 = (int statusCode, string responseText, byte[] responseData) =>
            {
                Debug.Log(statusCode);
                if (statusCode == 200)
                {
                    if (responseData != null)
                    {
                        var p = JsonConvert.DeserializeObject <UserId>(responseText);
                        userId = int.Parse(p.userId);
                        SettingsController.SetUserId(userId);
                        Debug.Log(SettingsController.GetUserId());
                        SceneManager.LoadScene("OptionsUI");
                    }
                    else
                    {
                        SceneManager.LoadScene("Welcome");
                    }
                }
            };

            HttpRequest.Send(this, "POST", url, null, array, myHandler1);
        }
Пример #2
0
 void Start()
 {
     userId = SettingsController.GetUserId();
     loadOcrMedia();
 }