public virtual void setTransform(com.codename1.ui.Transform transform) { this.transform.setTransform(transform); if (!transform.isIdentity()) { graphics.Transform = SilverlightImplementation.clamp(((SilverlightImplementation.NativeTransform)transform.getNativeTransform()).m); } else { graphics.Transform = Matrix3x2.Identity; } }
public override void purchase(string idProduct) { string produto = idProduct; payment.PurchaseCallback pc = SilverlightImplementation.getPurchaseCallback(); SilverlightImplementation.dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, async() => { try { ListingInformation listing = await CurrentApp.LoadListingInformationAsync(); product1 = listing.ProductListings[produto]; PurchaseResults purchaseResults = await CurrentApp.RequestProductPurchaseAsync(produto); switch (purchaseResults.Status) { case ProductPurchaseStatus.Succeeded: GrantFeatureLocally(produto, purchaseResults.TransactionId); FulfillProduct1(produto, purchaseResults.TransactionId); pc.itemPurchased(idProduct); break; case ProductPurchaseStatus.NotFulfilled: if (!IsLocallyFulfilled(produto, purchaseResults.TransactionId)) { GrantFeatureLocally(produto, purchaseResults.TransactionId); } FulfillProduct1(produto, purchaseResults.TransactionId); break; case ProductPurchaseStatus.NotPurchased: pc.itemPurchaseError(idProduct, "purchase failed"); break; } } catch (System.Exception e) { Debug.WriteLine("Houston, we have a problem: \n\n" + e + "\n\n"); } }).AsTask().ConfigureAwait(false).GetAwaiter().GetResult(); }
public bool writeBuffOffsetLength(_nArrayAdapter <sbyte> aArr, int aOffset, int aLen) { return(writeBuffOffsetLength(SilverlightImplementation.toByteArray(aArr.getCSharpArray()), aOffset, aLen)); }
public bool writeBuf(_nArrayAdapter <sbyte> aArr) { return(writeBuf(SilverlightImplementation.toByteArray(aArr.getCSharpArray()))); }
public Object getErrorMessage() { return(SilverlightImplementation.toJava(lastError == null ? @"" : lastError.Message)); }
public bool createSocket(java.lang.String host, int port) { this.host = SilverlightImplementation.toCSharp(host); this.port = port; return(true); }