public override void Response(byte[] _response)
        {
            if (!ResponseCode(_response))
            {
                CommsHTTPConstants.DisplayLog(m_jsonResponse);
                return;
            }

            string[] data = m_jsonResponse.Split(new string[] { CommController.TOKEN_SEPARATOR_EVENTS }, StringSplitOptions.None);
            if (bool.Parse(data[0]))
            {
                MenusScreenController.Instance.TotalReportsToWarnRequest             = int.Parse(data[1]);
                MenusScreenController.Instance.HoursToEnableANewProposal             = int.Parse(data[2]);
                MenusScreenController.Instance.TotalNumberOfFreeRequests             = int.Parse(data[3]);
                MenusScreenController.Instance.TotalNumberImagesAsReference          = int.Parse(data[4]);
                MenusScreenController.Instance.TotalNumberImagesAsFinished           = int.Parse(data[5]);
                MenusScreenController.Instance.TotalNumberImagesAsProviderExperience = int.Parse(data[6]);
                MenusScreenController.Instance.SizeHeightAllowedImages = int.Parse(data[7]);
                MenusScreenController.Instance.ProviderSkills          = data[8];
                if (MenusScreenController.Instance.DebugMode)
                {
                    Debug.Log("TOTAL_REPORT_REQUEST_TO_WARN_USERS=" + MenusScreenController.Instance.TotalReportsToWarnRequest);
                    Debug.Log("HOURS_TO_WAIT_FOR_NEW_PROPOSAL=" + MenusScreenController.Instance.HoursToEnableANewProposal);
                    Debug.Log("FREE_REQUESTS_AVAILABLE_TO_CONSUMERS=" + MenusScreenController.Instance.TotalNumberOfFreeRequests);
                    Debug.Log("TOTAL_NUMBER_IMAGES_AS_REFERENCE=" + MenusScreenController.Instance.TotalNumberImagesAsReference);
                    Debug.Log("TOTAL_NUMBER_IMAGES_AS_FINISHED=" + MenusScreenController.Instance.TotalNumberImagesAsFinished);
                    Debug.Log("TOTAL_NUMBER_IMAGES_PROVIDER_EXPERIENCE=" + MenusScreenController.Instance.TotalNumberImagesAsProviderExperience);
                    Debug.Log("SIZE_HEIGHT_ALLOWED_IMAGES=" + MenusScreenController.Instance.SizeHeightAllowedImages);
                    Debug.Log("PROVIDER_SKILLS=" + MenusScreenController.Instance.ProviderSkills);
                }
                UIEventController.Instance.DispatchUIEvent(ScreenInitialView.EVENT_CONFIGURATION_DATA_RECEIVED);
            }
        }
        public override void Response(string _response)
        {
            if (!ResponseCode(_response))
            {
                CommsHTTPConstants.DisplayLog(m_jsonResponse);
                UIEventController.Instance.DispatchUIEvent(RequestsController.EVENT_REQUEST_RESULT_CONSULT_DISTANCE_RECORDS);
                return;
            }

            UIEventController.Instance.DispatchUIEvent(RequestsController.EVENT_REQUEST_RESULT_CONSULT_DISTANCE_RECORDS, m_jsonResponse);
        }
        public override void Response(byte[] _response)
        {
            if (!ResponseCode(_response))
            {
                CommsHTTPConstants.DisplayLog(m_jsonResponse);
                UIEventController.Instance.DispatchUIEvent(RequestsController.EVENT_REQUEST_RESULT_CONSULT_IMAGES_REQUEST);
                return;
            }

            UIEventController.Instance.DispatchUIEvent(RequestsController.EVENT_REQUEST_RESULT_CONSULT_IMAGES_REQUEST, m_jsonResponse);
        }
Beispiel #4
0
        public override void Response(string _response)
        {
            if (!ResponseCode(_response))
            {
                CommsHTTPConstants.DisplayLog(m_jsonResponse);
                UIEventController.Instance.DispatchUIEvent(UsersController.EVENT_USER_RESULT_CONSULT_SINGLE_RECORD);
                return;
            }

            UIEventController.Instance.DispatchUIEvent(UsersController.EVENT_USER_RESULT_CONSULT_SINGLE_RECORD, m_jsonResponse);
        }
        public override void Response(string _response)
        {
            if (!ResponseCode(_response))
            {
                CommsHTTPConstants.DisplayLog(m_jsonResponse);
                UIEventController.Instance.DispatchUIEvent(ProposalsController.EVENT_PROPOSAL_RESULT_CONSULTED_PROPOSALS);
                return;
            }

            UIEventController.Instance.DispatchUIEvent(ProposalsController.EVENT_PROPOSAL_RESULT_CONSULTED_PROPOSALS, m_jsonResponse);
        }
Beispiel #6
0
        public override void Response(byte[] _response)
        {
            if (!ResponseCode(_response))
            {
                CommsHTTPConstants.DisplayLog(m_jsonResponse);
                UIEventController.Instance.DispatchUIEvent(UsersController.EVENT_USER_IAP_RESULT_PURCHASE_NEW_REQUEST, false);
                return;
            }

            string[] data = m_jsonResponse.Split(new string[] { CommController.TOKEN_SEPARATOR_EVENTS }, StringSplitOptions.None);
            if (bool.Parse(data[0]))
            {
                UIEventController.Instance.DispatchUIEvent(UsersController.EVENT_USER_IAP_RESULT_PURCHASE_NEW_REQUEST, true);
            }
            else
            {
                UIEventController.Instance.DispatchUIEvent(UsersController.EVENT_USER_IAP_RESULT_PURCHASE_NEW_REQUEST, false);
            }
        }
Beispiel #7
0
        public override void Response(string _response)
        {
            if (!ResponseCode(_response))
            {
                CommsHTTPConstants.DisplayLog(m_jsonResponse);
                UIEventController.Instance.DispatchUIEvent(UsersController.EVENT_USER_FACEBOOK_LOGIN_RESULT, false);
                return;
            }

            string[] data = m_jsonResponse.Split(new string[] { CommController.TOKEN_SEPARATOR_EVENTS }, StringSplitOptions.None);
            if (bool.Parse(data[0]))
            {
                UIEventController.Instance.DispatchUIEvent(UsersController.EVENT_USER_FACEBOOK_LOGIN_RESULT, true, data[1], data[2], data[3], data[4], data[5], data[6], data[7], data[8], data[9], data[10], data[11], data[12], data[13], data[14], data[15], data[16], data[17], data[18], data[19], data[20], data[21]);
            }
            else
            {
                UIEventController.Instance.DispatchUIEvent(UsersController.EVENT_USER_FACEBOOK_LOGIN_RESULT, false);
            }
        }
Beispiel #8
0
        public override void Response(byte[] _response)
        {
            if (!ResponseCode(_response))
            {
                CommsHTTPConstants.DisplayLog(m_jsonResponse);
                UIEventController.Instance.DispatchUIEvent(IAPController.EVENT_IAP_CODE_CONFIRMATION, false);
                return;
            }

            string[] data = m_jsonResponse.Split(new string[] { CommController.TOKEN_SEPARATOR_EVENTS }, StringSplitOptions.None);
            if (bool.Parse(data[0]))
            {
                UIEventController.Instance.DispatchUIEvent(IAPController.EVENT_IAP_CODE_CONFIRMATION, true, data[1]);
            }
            else
            {
                UIEventController.Instance.DispatchUIEvent(IAPController.EVENT_IAP_CODE_CONFIRMATION, false);
            }
        }
        public override void Response(byte[] _response)
        {
            if (!ResponseCode(_response))
            {
                CommsHTTPConstants.DisplayLog(m_jsonResponse);
                UIEventController.Instance.DispatchUIEvent(ProposalsController.EVENT_PROPOSAL_RESULT_REACTIVATE_PROPOSAL, false);
                return;
            }

            string[] data = m_jsonResponse.Split(new string[] { CommController.TOKEN_SEPARATOR_EVENTS }, StringSplitOptions.None);
            if (bool.Parse(data[0]))
            {
                UIEventController.Instance.DispatchUIEvent(ProposalsController.EVENT_PROPOSAL_RESULT_REACTIVATE_PROPOSAL, true, long.Parse(data[1]));
            }
            else
            {
                UIEventController.Instance.DispatchUIEvent(ProposalsController.EVENT_PROPOSAL_RESULT_REACTIVATE_PROPOSAL, false);
            }
        }
Beispiel #10
0
        public override void Response(byte[] _response)
        {
            if (!ResponseCode(_response))
            {
                CommsHTTPConstants.DisplayLog(m_jsonResponse);
                UIEventController.Instance.DispatchUIEvent(RequestsController.EVENT_REQUEST_RESULT_SCORE_AND_FEEDBACK_UPDATE, false);
                return;
            }

            string[] data = m_jsonResponse.Split(new string[] { CommController.TOKEN_SEPARATOR_EVENTS }, StringSplitOptions.None);
            if (bool.Parse(data[0]))
            {
                UIEventController.Instance.DispatchUIEvent(RequestsController.EVENT_REQUEST_RESULT_SCORE_AND_FEEDBACK_UPDATE, true, long.Parse(data[1]));
            }
            else
            {
                UIEventController.Instance.DispatchUIEvent(RequestsController.EVENT_REQUEST_RESULT_SCORE_AND_FEEDBACK_UPDATE, false);
            }
        }
Beispiel #11
0
        public override void Response(byte[] _response)
        {
            if (!ResponseCode(_response))
            {
                CommsHTTPConstants.DisplayLog(m_jsonResponse);
                UIEventController.Instance.DispatchUIEvent(UsersController.EVENT_USER_UPDATE_PROFILE_RESULT, false);
                return;
            }

            string[] data = m_jsonResponse.Split(new string[] { CommController.TOKEN_SEPARATOR_EVENTS }, StringSplitOptions.None);
            if (bool.Parse(data[0]))
            {
                UIEventController.Instance.DispatchUIEvent(UsersController.EVENT_USER_UPDATE_PROFILE_RESULT, true, m_newPassword, m_newEmail, m_newName, m_newVillage, m_newMapData, m_newSkills, m_newDescription);
            }
            else
            {
                UIEventController.Instance.DispatchUIEvent(UsersController.EVENT_USER_UPDATE_PROFILE_RESULT, false);
            }
        }
        public override void Response(byte[] _response)
        {
            if (!ResponseCode(_response))
            {
                CommsHTTPConstants.DisplayLog(m_jsonResponse);
                UIEventController.Instance.DispatchUIEvent(ScreenProfileView.EVENT_SCREENPROFILE_SERVER_REQUEST_RESET_PASSWORD_CONFIRMATION, false);
                return;
            }

            string[] data = m_jsonResponse.Split(new string[] { CommController.TOKEN_SEPARATOR_EVENTS }, StringSplitOptions.None);
            if (bool.Parse(data[0]))
            {
                UIEventController.Instance.DispatchUIEvent(ScreenProfileView.EVENT_SCREENPROFILE_SERVER_REQUEST_RESET_PASSWORD_CONFIRMATION, true);
            }
            else
            {
                UIEventController.Instance.DispatchUIEvent(ScreenProfileView.EVENT_SCREENPROFILE_SERVER_REQUEST_RESET_PASSWORD_CONFIRMATION, false);
            }
        }
Beispiel #13
0
        public override void Response(byte[] _response)
        {
            if (!ResponseCode(_response))
            {
                CommsHTTPConstants.DisplayLog(m_jsonResponse);
                UIEventController.Instance.DispatchUIEvent(RequestsController.EVENT_REQUEST_TRANSACTION_REGISTERED_RESPONSE, false);
                return;
            }

            string[] data = m_jsonResponse.Split(new string[] { CommController.TOKEN_SEPARATOR_EVENTS }, StringSplitOptions.None);
            if (bool.Parse(data[0]))
            {
                UIEventController.Instance.DispatchUIEvent(RequestsController.EVENT_REQUEST_TRANSACTION_REGISTERED_RESPONSE, true, m_transactionID);
            }
            else
            {
                UIEventController.Instance.DispatchUIEvent(RequestsController.EVENT_REQUEST_TRANSACTION_REGISTERED_RESPONSE, false);
            }
        }
Beispiel #14
0
        public override void Response(byte[] _response)
        {
            if (!ResponseCode(_response))
            {
                CommsHTTPConstants.DisplayLog(m_jsonResponse);
                UIEventController.Instance.DispatchUIEvent(ImagesController.EVENT_IMAGES_LOAD_SERVER_DATA_RECEIVED, false);
                return;
            }

            string[] data = m_jsonResponse.Split(new string[] { CommController.TOKEN_SEPARATOR_EVENTS }, StringSplitOptions.None);
            if (bool.Parse(data[0]))
            {
                int    sizeData    = int.Parse(data[6]);
                int    startingPos = _response.Length - sizeData;
                byte[] dataImage   = new byte[sizeData];
                Array.Copy(_response, startingPos, dataImage, 0, sizeData);
                UIEventController.Instance.DispatchUIEvent(ImagesController.EVENT_IMAGES_LOAD_SERVER_DATA_RECEIVED, true, long.Parse(data[1]), data[2], long.Parse(data[3]), int.Parse(data[4]), data[5], int.Parse(data[6]), dataImage);
            }
            else
            {
                UIEventController.Instance.DispatchUIEvent(ImagesController.EVENT_IMAGES_LOAD_SERVER_DATA_RECEIVED, false);
            }
        }