コード例 #1
0
    public void Message(string data)
    {
        JsonMessage jsonMessage = JsonFx.Json.JsonReader.Deserialize <JsonMessage>(data);

        switch (jsonMessage.code)
        {
        case LOGIN_SUCCESS_CODE:
            Login(jsonMessage.data);
            break;

        case CHANGE_ACCOUNT_CODE:
            ChangeAccount();
            break;

        case LOGINOUT_CODE:
            break;

        case VOICE_CODE:
            VoiceResult(jsonMessage.data);
            break;

        case NETWORK_SINGLE_CODE:
            NetworkChange(jsonMessage.data);
            break;

        case ELECTRICITY_CODE:
            ElectricityChange(jsonMessage.data);
            break;

        case RESUME_CODE:
            sdkUtil.SetActivityIndicatorStyle();
            sdkUtil.StartActivityIndicator();
            break;

        default:
            break;
        }
    }