public void PlayPremiumResponse(IAsyncResult asr)
        {
            XmlRpcAsyncResult result         = (XmlRpcAsyncResult)asr;
            CardsProxy        clientProtocol = (CardsProxy)result.ClientProtocol;

            clientProtocol.Url = this.EndpointUri;
            try
            {
                XmlRpcRespStruct_Cards cards = clientProtocol.EndplayPremium(asr);
                this.mResponse = new XmlRpcCardsResponse(cards.mMessage, cards.mSuccessCode);
            }
            catch (Exception exception)
            {
                this.mResponse = new XmlRpcCardsResponse(exception.Message, 0);
            }
            try
            {
                if (this.FormsControl != null)
                {
                    this.FormsControl.Invoke(new CardsEndResponseDelegate(this.CallbackMethod.Invoke), new object[] { this, this.Response });
                }
            }
            catch (Exception exception2)
            {
                string message = exception2.Message;
            }
        }
Пример #2
0
 public XmlRpcCardsResponse(string message, int?success, string guid, object rawcards)
 {
     this.mResponse              = new XmlRpcRespStruct_Cards();
     this.mResponse.mMessage     = message;
     this.mResponse.mSuccessCode = success;
     this.mResponse.mUserGUID    = guid;
     this.mResponse.mRawCards    = rawcards;
 }
 public XmlRpcCardsResponse(string message, int? success, string guid, object rawcards)
 {
     this.mResponse = new XmlRpcRespStruct_Cards();
     this.mResponse.mMessage = message;
     this.mResponse.mSuccessCode = success;
     this.mResponse.mUserGUID = guid;
     this.mResponse.mRawCards = rawcards;
 }
Пример #4
0
 public XmlRpcCardsResponse(string message, int?success, string guid, object rawcards, int?cardID, int?crowns, int?cardpoints, int?premium)
 {
     this.mResponse               = new XmlRpcRespStruct_Cards();
     this.mResponse.mMessage      = message;
     this.mResponse.mSuccessCode  = success;
     this.mResponse.mUserGUID     = guid;
     this.mResponse.mRawCards     = rawcards;
     this.mResponse.mCardID       = cardID;
     this.mResponse.mCrowns       = crowns;
     this.mResponse.mCardpoints   = cardpoints;
     this.mResponse.mPremiumCards = premium;
 }
        public void veteranLevelUpResponse(IAsyncResult asr)
        {
            XmlRpcAsyncResult result         = (XmlRpcAsyncResult)asr;
            CardsProxy        clientProtocol = (CardsProxy)result.ClientProtocol;

            clientProtocol.Url = this.EndpointUri;
            try
            {
                XmlRpcRespStruct_Cards cards = clientProtocol.EndgetVeteranLevel(asr);
                this.mResponse = new XmlRpcCardsResponse();
                XmlRpcRespStruct_Cards cards2 = new XmlRpcRespStruct_Cards {
                    mVeteranLv1          = cards.mVeteranLv1,
                    mVeteranLv2          = cards.mVeteranLv2,
                    mVeteranLv3          = cards.mVeteranLv3,
                    mVeteranLv4          = cards.mVeteranLv4,
                    mVeteranLv5          = cards.mVeteranLv5,
                    mVeteranLv6          = cards.mVeteranLv6,
                    mVeteranLv7          = cards.mVeteranLv7,
                    mVeteranLv8          = cards.mVeteranLv8,
                    mVeteranLv9          = cards.mVeteranLv9,
                    mVeteranLv10         = cards.mVeteranLv10,
                    mVeteranSecondsLeft  = cards.mVeteranSecondsLeft,
                    mMessage             = cards.mMessage,
                    mSuccessCode         = cards.mSuccessCode,
                    mVeteranCurrentLevel = cards.mVeteranCurrentLevel
                };
                this.mResponse.Response = cards2;
            }
            catch (Exception exception)
            {
                this.mResponse = new XmlRpcCardsResponse(exception.Message, 0);
            }
            try
            {
                if (this.FormsControl != null)
                {
                    this.FormsControl.Invoke(new CardsEndResponseDelegate(this.CallbackMethod.Invoke), new object[] { this, this.Response });
                }
            }
            catch (Exception exception2)
            {
                string message = exception2.Message;
            }
        }
        public XmlRpcCardsResponse playPremium(ICardsRequest req, int timeout)
        {
            this.mRequest = (XmlRpcCardsRequest)req;
            CardsProxy proxy = XmlRpcProxyGen.Create <CardsProxy>();

            proxy.Url     = this.EndpointUri;
            proxy.Timeout = timeout;
            XmlRpcRespStruct_Cards cards = proxy.playPremium(this.mRequest.Request);

            try
            {
                this.mResponse = new XmlRpcCardsResponse(cards.mMessage, cards.mSuccessCode);
            }
            catch (Exception exception)
            {
                this.mResponse = new XmlRpcCardsResponse(exception.Message, 0);
            }
            return(this.mResponse);
        }
        public void getFreeCardResponse(IAsyncResult asr)
        {
            XmlRpcAsyncResult result         = (XmlRpcAsyncResult)asr;
            CardsProxy        clientProtocol = (CardsProxy)result.ClientProtocol;

            clientProtocol.Url = this.EndpointUri;
            try
            {
                XmlRpcRespStruct_Cards cards = clientProtocol.EndgetVeteranLevel(asr);
                this.mResponse = new XmlRpcCardsResponse();
                XmlRpcRespStruct_Cards cards2 = new XmlRpcRespStruct_Cards {
                    mVeteranLv1          = cards.mVeteranLv1,
                    mVeteranLv2          = cards.mVeteranLv2,
                    mVeteranLv3          = cards.mVeteranLv3,
                    mVeteranLv4          = cards.mVeteranLv4,
                    mVeteranLv5          = cards.mVeteranLv5,
                    mVeteranLv6          = cards.mVeteranLv6,
                    mVeteranLv7          = cards.mVeteranLv7,
                    mVeteranLv8          = cards.mVeteranLv8,
                    mVeteranLv9          = cards.mVeteranLv9,
                    mVeteranLv10         = cards.mVeteranLv10,
                    mVeteranSecondsLeft  = cards.mVeteranSecondsLeft,
                    mMessage             = cards.mMessage,
                    mSuccessCode         = cards.mSuccessCode,
                    mVeteranCurrentLevel = cards.mVeteranCurrentLevel,
                    mStrings             = cards.mStrings
                };
                this.mResponse.Response = cards2;
            }
            catch (Exception exception)
            {
                this.mResponse = new XmlRpcCardsResponse(exception.Message, 0);
            }
            try
            {
                this.CallbackMethod(this, this.Response);
            }
            catch (Exception exception2)
            {
                string message = exception2.Message;
            }
        }
        public XmlRpcCardsResponse setVeteranData(ICardsRequest req, CardsEndResponseDelegate callbackHandler, Control ctrl, int timeout)
        {
            this.FormsControl   = ctrl;
            this.CallbackMethod = callbackHandler;
            this.mRequest       = (XmlRpcCardsRequest)req;
            CardsProxy proxy = XmlRpcProxyGen.Create <CardsProxy>();

            proxy.Url     = this.EndpointUri;
            proxy.Timeout = timeout;
            XmlRpcRespStruct_Cards cards = proxy.setVeteranData(this.mRequest.Request);

            try
            {
                this.mResponse = new XmlRpcCardsResponse(cards.mMessage, cards.mSuccessCode);
            }
            catch (Exception exception)
            {
                this.mResponse = new XmlRpcCardsResponse(exception.Message, 0);
            }
            return(this.mResponse);
        }
 public void veteranLevelUpResponse(IAsyncResult asr)
 {
     XmlRpcAsyncResult result = (XmlRpcAsyncResult) asr;
     CardsProxy clientProtocol = (CardsProxy) result.ClientProtocol;
     clientProtocol.Url = this.EndpointUri;
     try
     {
         XmlRpcRespStruct_Cards cards = clientProtocol.EndgetVeteranLevel(asr);
         this.mResponse = new XmlRpcCardsResponse();
         XmlRpcRespStruct_Cards cards2 = new XmlRpcRespStruct_Cards {
             mVeteranLv1 = cards.mVeteranLv1,
             mVeteranLv2 = cards.mVeteranLv2,
             mVeteranLv3 = cards.mVeteranLv3,
             mVeteranLv4 = cards.mVeteranLv4,
             mVeteranLv5 = cards.mVeteranLv5,
             mVeteranLv6 = cards.mVeteranLv6,
             mVeteranLv7 = cards.mVeteranLv7,
             mVeteranLv8 = cards.mVeteranLv8,
             mVeteranLv9 = cards.mVeteranLv9,
             mVeteranLv10 = cards.mVeteranLv10,
             mVeteranSecondsLeft = cards.mVeteranSecondsLeft,
             mMessage = cards.mMessage,
             mSuccessCode = cards.mSuccessCode,
             mVeteranCurrentLevel = cards.mVeteranCurrentLevel
         };
         this.mResponse.Response = cards2;
     }
     catch (Exception exception)
     {
         this.mResponse = new XmlRpcCardsResponse(exception.Message, 0);
     }
     try
     {
         if (this.FormsControl != null)
         {
             this.FormsControl.Invoke(new CardsEndResponseDelegate(this.CallbackMethod.Invoke), new object[] { this, this.Response });
         }
     }
     catch (Exception exception2)
     {
         string message = exception2.Message;
     }
 }
 public void getFreeCardResponse(IAsyncResult asr)
 {
     XmlRpcAsyncResult result = (XmlRpcAsyncResult) asr;
     CardsProxy clientProtocol = (CardsProxy) result.ClientProtocol;
     clientProtocol.Url = this.EndpointUri;
     try
     {
         XmlRpcRespStruct_Cards cards = clientProtocol.EndgetVeteranLevel(asr);
         this.mResponse = new XmlRpcCardsResponse();
         XmlRpcRespStruct_Cards cards2 = new XmlRpcRespStruct_Cards {
             mVeteranLv1 = cards.mVeteranLv1,
             mVeteranLv2 = cards.mVeteranLv2,
             mVeteranLv3 = cards.mVeteranLv3,
             mVeteranLv4 = cards.mVeteranLv4,
             mVeteranLv5 = cards.mVeteranLv5,
             mVeteranLv6 = cards.mVeteranLv6,
             mVeteranLv7 = cards.mVeteranLv7,
             mVeteranLv8 = cards.mVeteranLv8,
             mVeteranLv9 = cards.mVeteranLv9,
             mVeteranLv10 = cards.mVeteranLv10,
             mVeteranSecondsLeft = cards.mVeteranSecondsLeft,
             mMessage = cards.mMessage,
             mSuccessCode = cards.mSuccessCode,
             mVeteranCurrentLevel = cards.mVeteranCurrentLevel,
             mStrings = cards.mStrings
         };
         this.mResponse.Response = cards2;
     }
     catch (Exception exception)
     {
         this.mResponse = new XmlRpcCardsResponse(exception.Message, 0);
     }
     try
     {
         this.CallbackMethod(this, this.Response);
     }
     catch (Exception exception2)
     {
         string message = exception2.Message;
     }
 }
 public XmlRpcCardsResponse(string message, int? success, string guid, object rawcards, int? cardID, int? crowns, int? cardpoints, int? premium)
 {
     this.mResponse = new XmlRpcRespStruct_Cards();
     this.mResponse.mMessage = message;
     this.mResponse.mSuccessCode = success;
     this.mResponse.mUserGUID = guid;
     this.mResponse.mRawCards = rawcards;
     this.mResponse.mCardID = cardID;
     this.mResponse.mCrowns = crowns;
     this.mResponse.mCardpoints = cardpoints;
     this.mResponse.mPremiumCards = premium;
 }