Esempio n. 1
0
 /*
  * 微信拉起App来获得数据的入口
  */
 public override void On_GetMessageFromWX_Request(GetMessageFromWX.Req request)
 {
     if (request != null)
     {
         lastRequest = request;
         NavigationService.Navigate(new Uri("/GetFromWXPage.xaml", UriKind.Relative));
     }
 }
Esempio n. 2
0
        //在进入的时候得到微信请求的Request数据
        protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            if (DemoEntryPage.lastRequest != null)
            {
                mRequest = DemoEntryPage.lastRequest;
                DemoEntryPage.lastRequest = null;
            }
            else
            {
                NavigationService.GoBack();
            }
        }
Esempio n. 3
0
 public override void On_GetMessageFromWX_Request(GetMessageFromWX.Req request)
 {
     // not implemented
     goBack();
 }
Esempio n. 4
0
 internal void FromProto(object protoObj)
 {
     TransactDataP ap = protoObj as TransactDataP;
     if (ap != null)
     {
         ConmandId = (int)ap.ConmandID;
         AppId = ap.AppID;
         SdkVersion = ap.SdkVersion;
         CheckContent = ap.CheckContent;
         CheckSummary = ap.CheckSummary;
         if (!string.IsNullOrEmpty(ap.GetReq.Base.Transaction))
         {
             Req = new GetMessageFromWX.Req();
             Req.FromProto(ap.GetReq);
         }
         if (!string.IsNullOrEmpty(ap.AuthReq.Base.Transaction))
         {
             Req = new SendAuth.Req();
             Req.FromProto(ap.AuthReq);
         }
         if (!string.IsNullOrEmpty(ap.SendReq.Base.Transaction))
         {
             Req = new SendMessageToWX.Req();
             Req.FromProto(ap.SendReq);
         }
         if (!string.IsNullOrEmpty(ap.ShowReq.Base.Transaction))
         {
             Req = new ShowMessageFromWX.Req();
             Req.FromProto(ap.ShowReq);
         }
         if (!string.IsNullOrEmpty(ap.GetResp.Base.Transaction))
         {
             Resp = new GetMessageFromWX.Resp();
             Resp.FromProto(ap.GetResp);
         }
         if (!string.IsNullOrEmpty(ap.AuthResp.Base.Transaction))
         {
             Resp = new SendAuth.Resp();
             Resp.FromProto(ap.AuthResp);
         }
         if (!string.IsNullOrEmpty(ap.SendResp.Base.Transaction))
         {
             Resp = new SendMessageToWX.Resp();
             Resp.FromProto(ap.SendResp);
         }
         if (!string.IsNullOrEmpty(ap.ShowResp.Base.Transaction))
         {
             Resp = new ShowMessageFromWX.Resp();
             Resp.FromProto(ap.ShowResp);
         }
         if (!string.IsNullOrEmpty(ap.PayReq.Base.Transaction))
         {
             Req = new SendPay.Req();
             Req.FromProto(ap.PayReq);
         }
         if (!string.IsNullOrEmpty(ap.PayResp.Base.Transaction))
         {
             Resp = new SendPay.Resp();
             Resp.FromProto(ap.PayResp);
         }
     }
 }