Ejemplo n.º 1
0
 internal void CheckResult()
 {
     if (this.busyStatus)
     {
         int errorCode = InAppPurchaseDialog.GetState(257, this.handle, out this.state);
         if (errorCode != 0)
         {
             Error.ThrowNativeException(errorCode);
         }
         if (this.state != CommonDialogState.Running)
         {
             InAppPurchaseDialog.CommandResults commandResults = default(InAppPurchaseDialog.CommandResults);
             errorCode = InAppPurchaseDialog.GetResult(257, this.handle, out this.result, ref commandResults);
             if (errorCode != 0)
             {
                 Error.ThrowNativeException(errorCode);
             }
             if (this.result == CommonDialogResult.OK)
             {
                 commandResults.Results = new InAppPurchaseProductData[commandResults.Count];
                 errorCode = InAppPurchaseDialog.GetResult(257, this.handle, out this.result, ref commandResults);
                 if (errorCode != 0)
                 {
                     Error.ThrowNativeException(errorCode);
                 }
                 this.productList.Resize(commandResults.Count);
                 for (int i = 0; i < commandResults.Count; i++)
                 {
                     this.productList[i].data = commandResults.Results[i];
                 }
             }
             this.infoStatus = commandResults.InfoStatus;
             this.busyStatus = false;
         }
     }
 }
Ejemplo n.º 2
0
 private static extern int GetResult(int type, int handle, out CommonDialogResult result, ref InAppPurchaseDialog.CommandResults results);