Esempio n. 1
0
        void ITXIMLoginUIEventExt.OnServerVerifyCode(ITXData pData, out string pbsEnterCode, out int pbCancel)
        {
            pbsEnterCode = string.Empty;
            pbCancel     = 1;
            ITXBuffer buf  = pData.GetBuf(LoginUI.bufVerifyPic);
            uint      size = buf.GetSize();

            byte[] destination = new byte[size];
            byte[] buffer2     = destination;
            if (buffer2 != null)
            {
                int length = buffer2.Length;
            }
            Marshal.Copy(buf.GetNativeBuf(), destination, 0, (int)size);
            MemoryStream memorystreamPng = new MemoryStream(destination);

            if (VerifyCodeWindow.ShowVerifyCode(memorystreamPng, this.winHandle, out pbsEnterCode))
            {
                pbCancel = 0;
            }
            else
            {
                pbCancel = 1;
            }
        }
        internal static bool ShowVerifyCode(MemoryStream memorystreamPng, Window win, out string enterCode)
        {
            VerifyCodeWindow window = new VerifyCodeWindow(null, memorystreamPng)
            {
                Owner = win
            };

            window.ShowDialog();
            enterCode = window.VerifyCodeString;
            return(window.DialogResult == true);
        }
 internal static bool ShowVerifyCode(MemoryStream memorystreamPng, Window win, out string enterCode)
 {
     VerifyCodeWindow window = new VerifyCodeWindow(null, memorystreamPng)
     {
         Owner = win
     };
     window.ShowDialog();
     enterCode = window.VerifyCodeString;
     return (window.DialogResult == true);
 }