void GetStaticPayQr(HttpContext context) { //string url = GetPayUrl(context); //HttpContext.Current.Response.Write(url); NativeStatic ns = new NativeStatic() { appid = appid, mch_id = mch_id, nonce_str = TravelAgent.WxPay.Utils.GetRandom(), product_id = JKRequest.GetQueryString("product_id"), time_stamp = Utils.ConvertDateTimeInt(DateTime.Now).ToString() }; string url, sign; TravelAgent.WxPay.Utils.GetUnifyUrlXml <NativeStatic>(ns, key, out url, out sign); TravelAgent.WxPay.Utils.GetQrCode("weixin://wxpay/bizpayurl?" + url); }
public MessageBoxDialog(IntPtr handle) : base(handle) { var children = Children; var buttons = children.OfType <NativeButton>().ToList(); switch (buttons.Count) { case 1: Button1 = buttons[0]; break; case 2: Button1 = buttons[0]; Button2 = buttons[1]; break; case 3: Button1 = buttons[0]; Button2 = buttons[1]; Button3 = buttons[2]; break; default: throw new Exception("Could not find messagebox buttons"); } var statics = children.OfType <NativeStatic>().ToList(); if (statics.Count == 1) { Message = statics[0]; } else { Image = statics[0]; Message = statics[1]; } }