Ejemplo n.º 1
0
        private void BT_Zfb_reg_fill_Click(object sender, EventArgs e)
        {
            if (currentHaoZi.isLoadedCompetedFillLink)
            {
                return;
            }
            currentHaoZi.isLoadedCompetedFillLink = true;

            state = BusinessStatus.zfb_Reg_paymethod;
            string js1 = "document.getElementById('queryPwd').value='{0}';document.getElementById('queryPwdConfirm').value='{0}';".With(currentHaoZi.zfbPwd) +
                         "document.getElementById('payPwd').value='{0}';document.getElementById('payPwdConfirm').value='{0}'; ".With(currentHaoZi.zfbPayPwd) +
                         "document.getElementById('realName').value='{0}';".With(currentHaoZi.realname) +
                         "document.getElementById('IDCardNo').value='{0}';".With(currentHaoZi.zfbSFZ) +
                         "document.getElementById('J-complete-form').submit();";

            MainCefFrame.ExecuteJavaScript(js1, MainCefFrame.Url, 0);

            return;

            #region  废弃
            //document.getElementById('queryPwd').focus();
            //document.getElementById('queryPwd').value = "aqq6611";
            //document.getElementById('queryPwd').blur();
            //密码id  //queryPwd
            //CefFrameHelper.SetElementValueById(MainCefFrame, "queryPwd", currentHaoZi.zfbPwd);



            //var host = MainCefFrame.Browser.GetHost();

            //foreach (var c in Debug_keyBord) {
            //    // little hacky
            //    host.SendKeyEvent(new CefKeyEvent {
            //        EventType = CefKeyEventType.Char,
            //        Modifiers = CefEventFlags.None,
            //        WindowsKeyCode = c,
            //        NativeKeyCode = c,
            //        Character = c,
            //        UnmodifiedCharacter = c,
            //    });
            //}
            //MainCefFrame.ExecuteJavaScript("document.getElementById('queryPwd').blur(); ", MainCefFrame.Url, 0);


            ////确认密码id //queryPwdConfirm
            //CefFrameHelper.SetElementValueById(MainCefFrame, "queryPwdConfirm", currentHaoZi.zfbPwd);
            ////支付密码  //PayPwd
            //CefFrameHelper.SetElementValueById(MainCefFrame, "PayPwd", currentHaoZi.zfbPayPwd);
            ////确认支付密码//payPwdConfirm
            //CefFrameHelper.SetElementValueById(MainCefFrame, "payPwdConfirm", currentHaoZi.zfbPayPwd);
            ////名字//realName
            //CefFrameHelper.SetElementValueById(MainCefFrame, "realName", currentHaoZi.realname);
            ////ShenFenZheng//IDCardNo
            //CefFrameHelper.SetElementValueById(MainCefFrame, "IDCardNo", currentHaoZi.zfbSFZ);

            #endregion
        }
Ejemplo n.º 2
0
        //测试 js 调用c#的方法
        private void toolStripMenuItem4_Click(object sender, EventArgs e)
        {
            string js1 = "js2csharp('{0}');".With("statue=ready&method=testmethod&result=1");

            MainCefFrame.ExecuteJavaScript(GlobalVar.base_js + js1,
                                           MainCefFrame.Url, 0);


            //statue=ready&method=testmethod&result=1
        }
Ejemplo n.º 3
0
 private void BT_WY_FillAccount_Click(object sender, EventArgs e)
 {
     state = BusinessStatus.wy_163_vcode;
     //切换字母邮箱注册
     MainCefFrame.ExecuteJavaScript("_Global.main.turnOn();", MainCefFrame.Url, 0);
     //
     CefFrameHelper.SetElementValueById(MainCefFrame, "nameIpt", currentHaoZi.zfbEmail);
     //密码
     CefFrameHelper.SetElementValueById(MainCefFrame, "mainPwdIpt", currentHaoZi.tbPwd);
     //确认密码
     CefFrameHelper.SetElementValueById(MainCefFrame, "mainCfmPwdIpt", currentHaoZi.tbPwd);
 }