示例#1
0
        public void OnMobileSend()
        {
            if (MobileAccount.text.Equals(""))
            {
                var info = new YxMessageBoxData {
                    Msg = "您填写的手机号为空请检查后重试"
                };
                YxMessageBox.Show(info);
                return;
            }
            if (_timeCtrl > 0)
            {
                var info = new YxMessageBoxData {
                    Msg = "您发送验证码过于频繁,请等待"
                };
                YxMessageBox.Show(info);
                return;
            }
            var dic = new Dictionary <string, object>();

            dic["mobile_n"] = MobileAccount.text;
            Facade.Instance <TwManager>().SendAction(_telVerifyFunction, dic, data =>
            {
                _timeCtrl = TimeCtrl;
                InvokeRepeating("ComputTime", 0, 1);
            });
        }
示例#2
0
        /// <summary>
        /// 赠送金币
        /// </summary>
        public void OnGiveMoneyClick()
        {
            var   theOtherAccount = TheOtherAccount.value;
            float returnValue;

            float.TryParse(GoldLine.value, out returnValue);
            var realValue  = YxUtiles.RecoverShowNumber(returnValue);
            var accountKey = AccountKey.value;

            if (string.IsNullOrEmpty(theOtherAccount))
            {
                YxWindowManager.ShowMessageWindow("账号不能为空");
                return;
            }
            if (realValue < 1)
            {
                YxWindowManager.ShowMessageWindow("输入金额过小,请重新输入!!!");
                return;
            }
            if (string.IsNullOrEmpty(accountKey))
            {
                YxWindowManager.ShowMessageWindow("密码不能为空");
                return;
            }
            if (SureId != null)
            {
                if (!SureId.value.Equals(theOtherAccount))
                {
                    YxWindowManager.ShowMessageWindow("两次输入ID不一致");
                    return;
                }
            }
            if (CheckSendInfo)
            {
                FriendController.Instance.SendFindUser(theOtherAccount, msg =>
                {
                    var friendInfo = new UserInfo();
                    friendInfo.Parse((IDictionary)msg);
                    YxMessageBoxData messageData = new YxMessageBoxData();
                    messageData.Msg = string.Format(CheckInfoFormat, friendInfo.NickM, friendInfo.UserId, GoldLine.value);
                    YxMessageBox.Show(messageData.Msg, null, (box, btnName) =>
                    {
                        if (btnName.Equals(YxMessageBox.BtnLeft))
                        {
                            SendBankCoin(theOtherAccount, (int)realValue, accountKey);
                        }
                    }, false, YxMessageBox.LeftBtnStyle | YxMessageBox.RightBtnStyle);
                });
            }
            else
            {
                SendBankCoin(theOtherAccount, (int)realValue, accountKey);
            }
        }
示例#3
0
 public void OnClickViefy()
 {
     if (_isReal)
     {
         var info = new YxMessageBoxData {
             Msg = "您已经实名验证"
         };
         YxMessageBox.Show(info);
     }
     else
     {
         YxWindowManager.OpenWindow("AttestatWindow");
     }
 }
示例#4
0
        private void OnPayWaitting()
        {
            if (_waitBox != null)
            {
                _waitBox.Close();
            }
            var boxData = new YxMessageBoxData
            {
                Msg            = "支付中,请稍后!!!",
                DelayedShowBtn = 3
            };

            _waitBox = YxMessageBox.Show(boxData);
        }
示例#5
0
        /// <summary>
        /// 删除好友时候的消息提示框
        /// </summary>
        public void OnDeleteFriendRemind(GameObject obj)
        {
            _currentUserId   = obj.GetComponentInParent <NnGroupMemberItem>().UserId; //被删除的玩家的ID
            _currentUserName = obj.GetComponentInParent <NnGroupMemberItem>().MemberName.text;
            var message = new YxMessageBoxData
            {
                Msg          = string.Format("确定删除群员{0}?", _currentUserName),
                Listener     = OnDeleteSingleFriend,
                BtnStyle     = YxMessageBox.LeftBtnStyle | YxMessageBox.RightBtnStyle,
                ShowBtnNames = new[] { "btn_ok|确定", "btn_cancle|取消" }
            };

            YxMessageBox.Show(message);
            _currentToggle.GetComponent <NnFriendGroupItem>().OnDeletePeopleCount();
        }
示例#6
0
        private void OnPayWaitting(object obj)
        {
            if (_waitBox != null)
            {
                _waitBox.Close();
            }
            var result  = obj as Dictionary <string, object>;
            var info    = result != null && result.ContainsKey("info") ? result["info"].ToString() : "支付中,请稍后!!!";
            var boxData = new YxMessageBoxData
            {
                Msg            = info,
                DelayedShowBtn = 3
            };

            _waitBox = YxMessageBox.Show(boxData);
        }
示例#7
0
        public void ShowOverPanel()
        {
            //小玛丽游戏结束  (玛丽次数为0,并且没有赢得金币)
            //还有n次小玛丽,确定后将继续下一次小玛丽!(玛丽次数大于0,并且没有赢取金币)
            //本次玛丽结束,请选择操作!\n还有n次小玛丽!(玛丽次数大于0,并且获得金币)
            var    gdata = App.GetGameData <WmarginGameData>();
            string msg;

            string[] showBtns = null;
            if (gdata.iMaliGames > 0)//还有玛丽
            {
                if (gdata.MaliWinMony > 0)
                {
                    msg      = string.Format("本次玛丽结束,请选择操作!\n还有{0}次小玛丽!", gdata.iMaliGames);
                    showBtns = new[] { "|得分", "|比倍|btn_bijiao" };
                }
                else
                {
                    msg = string.Format("还有{0}次小玛丽,确定后将继续下一次小玛丽!", gdata.iMaliGames);
                }
            }
            else//没有玛丽
            {
                msg      = "小玛丽游戏结束!";
                showBtns = gdata.MaliWinMony > 0 ? new[] { "|得分", "|比倍|btn_bijiao" } : new[] { "|返回" };
            }
            var boxData = new YxMessageBoxData
            {
                Msg          = msg,
                ShowBtnNames = showBtns,
                Listener     = (box, btnName) =>
                {
                    gdata.isMary = gdata.iMaliGames > 0;
                    if (btnName == "btn_bijiao")
                    {
                        BiBeiBtnFun();
                    }
                    else
                    {
                        GetMoneyBtnFun();
                    }
                }
            };

            YxMessageBox.Show(boxData);
        }
示例#8
0
        public void OnMobileSend()
        {
            if (_timeCtrl > 0)
            {
                var info = new YxMessageBoxData {
                    Msg = "您发送验证码过于频繁,请等待"
                };
                YxMessageBox.Show(info);
                return;
            }
            var dic = new Dictionary <string, object>();

            dic["mobile_n"] = PhoneNum.text;
            Facade.Instance <TwManager>().SendAction("mahjongwm.telVerify", dic, data =>
            {
                _timeCtrl = TimeCtrl;
                InvokeRepeating("ComputTime", 0, 1);
            });
        }
示例#9
0
    public void CreatAgency()
    {
        var dic = new Dictionary <string, object>();

        if (QqInput.value.Length == 0 || WeiXinInput.value.Length == 0 || PhoneInput.value.Length == 0)
        {
            //为系统提示窗口中显示的文字赋值
            YxMessageBoxData mesdata = new YxMessageBoxData {
                Msg = "某些地方为空,请重新输入"
            };
            //弹出系统提示窗口
            YxMessageBox.Show(mesdata);
            return;
        }
        dic.Add("qq", QqInput.value);
        dic.Add("weixin", WeiXinInput.value);
        dic.Add("phone", PhoneInput.value);
        dic.Add("self", SelfInput.value);
        //给服务器发送数据,接受服务器返回的数据并做处理
        Facade.Instance <TwManger>().SendAction("creatAgency", dic, (data) =>
        {
            if (data == null)
            {
                return;
            }
            if (data is Dictionary <string, object> )
            {
                var dataInfo = data as Dictionary <string, object>;

                var message = dataInfo.ContainsKey("mssage") ? dataInfo["mssage"].ToString() : "";

                YxMessageBoxData mesdata = new YxMessageBoxData {
                    Msg = message
                };

                YxMessageBox.Show(mesdata);
            }
        });
    }
示例#10
0
        private void OnFreshData(object msg)
        {
            var data = msg as Dictionary <string, object>;

            if (data == null)
            {
                return;
            }
            var message = data.ContainsKey("errorMessage") ? data["errorMessage"].ToString() : "";
            var status  = data.ContainsKey("success") && bool.Parse(data["success"].ToString());
            var info    = new YxMessageBoxData {
                Msg = message
            };

            YxMessageBox.Show(info);
            if (!status)
            {
                return;
            }
            _timeCtrl = TimeCtrl;
            InvokeRepeating("ComputTime", 0, 1);
        }
示例#11
0
        public void OnSendInput()
        {
            if (InputLable.value == "")
            {
                var message = new YxMessageBoxData
                {
                    Msg = "您所填写的信息不能为空",
                    //                        BtnStyle = YxMessageBox.MiddleBtnStyle,
                    //                        Listener = (box, btnName) =>
                    //                            {
                    //                                if (btnName == YxMessageBox.BtnMiddle)
                    //                                {
                    //                                    Close();
                    //                                }
                    //                            },
                };
                YxMessageBox.Show(message);
                return;
            }
            var dic = new Dictionary <string, object>();

            dic["AffilateID"] = InputLable.value;
            Facade.Instance <TwManager>().SendAction("getAffilateRelationAward", dic, OnFreshInfo);
        }