private void btnOK_Click(object sender, RoutedEventArgs e)
        {
            InputActionPasswordWindow win = new InputActionPasswordWindow();

            if (win.ShowDialog() == true)
            {
                string ActionPassword = win.ActionPassword;
                if (this.txtNewPassword.Password.Length < 6)
                {
                    MessageBox.Show("请输入至少6位密码");
                    return;
                }
                if (this.txtNewPassword.Password != this.txxtConfirmPassword.Password)
                {
                    MessageBox.Show("两次密码不一至,请重新输入");
                    return;
                }

                if (MyMessageBox.ShowQuestionOKCancel("请确认要修改玩家密码?") == System.Windows.Forms.DialogResult.OK)
                {
                    this.NewPassword = this.txtNewPassword.Password;
                    App.BusyToken.ShowBusyWindow("正在修改玩家密码");
                    GlobalData.Client.ChangePlayerPassword(this._userName, NewPassword, ActionPassword);
                }
            }
        }
        private void btnOK_Click(object sender, RoutedEventArgs e)
        {
            if (this.txtWorkerName.Text.Trim() == "")
            {
                MyMessageBox.ShowInfo("请填写服务工程师");
                return;
            }
            if (this.myTimeServiceTime.ValueTime == null || this.myTimeServiceTime.ValueTime.IsNull)
            {
                MyMessageBox.ShowInfo("请填写服务时间");
                return;
            }
            if (this.txtServiceContent.Text == "")
            {
                MyMessageBox.ShowInfo("请填写服务内容");
                return;
            }

            UserRemoteHandleServiceRecord record = new UserRemoteHandleServiceRecord()
            {
                UserName       = this.txtPlayerUserName.Text,
                WorkerName     = this.txtWorkerName.Text.Trim(),
                ServiceTime    = this.myTimeServiceTime.ValueTime,
                ServiceContent = this.txtServiceContent.Text
            };

            InputActionPasswordWindow winInputActionPassword = new InputActionPasswordWindow();

            if (winInputActionPassword.ShowDialog() == true)
            {
                AsyncHandlePlayerRemoteService(winInputActionPassword.ActionPassword, record.UserName, record.ServiceContent, record.ServiceTime, record.WorkerName);
            }
        }
Exemple #3
0
        private void btnSetPlayerAsAgent_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (this.datagridPlayerInfos.SelectedItem is PlayerInfoUIModel)
                {
                    PlayerInfoUIModel player = this.datagridPlayerInfos.SelectedItem as PlayerInfoUIModel;
                    if (MessageBox.Show("请确认要将玩家【" + player.UserLoginName + "】设置为代理?", "请确认", MessageBoxButton.OKCancel) == MessageBoxResult.OK)
                    {
                        InputActionPasswordWindow win = new InputActionPasswordWindow();
                        if (win.ShowDialog() == true)
                        {
                            //string ActionPassword = win.ActionPassword;

                            EditAgentInfoWindow winEdit = new EditAgentInfoWindow(player.UserID, player.UserLoginName);
                            winEdit.ShowDialog();
                            if (winEdit.ISOK)
                            {
                                App.PlayerVMObject.AsyncGetListPlayers();
                            }
                        }
                    }
                }
            }
            catch (Exception exc)
            {
                MyMessageBox.ShowInfo("解锁玩家异常。" + exc.Message);
            }
        }
Exemple #4
0
        private void btnUnLockPlayer_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (this.datagridPlayerInfos.SelectedItem is PlayerInfoUIModel)
                {
                    PlayerInfoUIModel player = this.datagridPlayerInfos.SelectedItem as PlayerInfoUIModel;
                    if (!player.IsLocked)
                    {
                        MyMessageBox.ShowInfo("该玩家没有被锁定");
                        return;
                    }
                    InputActionPasswordWindow win = new InputActionPasswordWindow();
                    if (win.ShowDialog() == true)
                    {
                        string ActionPassword = win.ActionPassword;

                        if (MessageBox.Show("请确认要解锁玩家【" + player.UserLoginName + "】", "请确认", MessageBoxButton.OKCancel) == MessageBoxResult.OK)
                        {
                            App.PlayerVMObject.AsyncUnLockPlayerInfos(player.UserLoginName, ActionPassword);
                        }
                    }
                }
            }
            catch (Exception exc)
            {
                MyMessageBox.ShowInfo("解锁玩家异常。" + exc.Message);
            }
        }
Exemple #5
0
 private void btnLockPlayer_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (this.datagridPlayerInfos.SelectedItem is PlayerInfoUIModel)
         {
             PlayerInfoUIModel player = this.datagridPlayerInfos.SelectedItem as PlayerInfoUIModel;
             if (player.IsLocked)
             {
                 MyMessageBox.ShowInfo("该玩家已经被锁定");
                 return;
             }
             InputActionPasswordWindow win = new InputActionPasswordWindow();
             if (win.ShowDialog() == true)
             {
                 string           ActionPassword = win.ActionPassword;
                 InputValueWindow winInputValue  = new InputValueWindow("请确认", "请输入要锁定玩家登录天数", 100, 1);
                 if (winInputValue.ShowDialog() == true)
                 {
                     App.PlayerVMObject.AsyncLockPlayerInfos(player.UserLoginName, ActionPassword, (int)winInputValue.Value);
                 }
             }
         }
     }
     catch (Exception exc)
     {
         MyMessageBox.ShowInfo("锁定玩家异常。" + exc.Message);
     }
 }
Exemple #6
0
        private void btnOK_Click(object sender, RoutedEventArgs e)
        {
            InputActionPasswordWindow win = new InputActionPasswordWindow();

            if (win.ShowDialog() == true)
            {
                string ActionPassword = win.ActionPassword;
                if (MessageBox.Show("确定要修改玩家信息?此操作不可更改。", "确认修改", MessageBoxButton.OKCancel) == MessageBoxResult.OK)
                {
                    App.PlayerVMObject.AsyncChangePlayerInfo(this._player, ActionPassword);
                    //this.DialogResult = true;
                }
            }
        }
Exemple #7
0
        //void Client_TransferPlayerToCompleted(object sender, Wcf.Clients.WebInvokeEventArgs<int> e)
        //{
        //    try
        //    {
        //        GlobalData.Client.TransferPlayerToCompleted -= Client_TransferPlayerToCompleted;
        //        if (e.Error != null)
        //        {
        //            MessageBox.Show(e.Error.Message);
        //            return;
        //        }

        //        MessageBox.Show(MetaData.OperResult.GetMsg(e.Result));
        //    }
        //    catch (Exception exc)
        //    {
        //        MessageBox.Show(exc.Message);
        //    }
        //}

        private void btnDeletePlayer_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (this.datagridPlayerInfos.SelectedItem is PlayerInfoUIModel)
                {
                    InputActionPasswordWindow win = new InputActionPasswordWindow();
                    if (win.ShowDialog() == true)
                    {
                        string            ActionPassword = win.ActionPassword;
                        PlayerInfoUIModel player         = this.datagridPlayerInfos.SelectedItem as PlayerInfoUIModel;

                        if (MessageBox.Show("删除玩家【" + player.UserName + "】?该操作不可恢复,请确认?", "请确认", MessageBoxButton.OKCancel) == MessageBoxResult.OK)
                        {
                            App.PlayerVMObject.AsyncDeletePlayerInfos(new string[] { player.UserName }, ActionPassword);
                        }
                    }
                }
            }
            catch (Exception exc)
            {
            }
        }
        private void btnOK_Click(object sender, RoutedEventArgs e)
        {
            string name   = this.txtName.Text.Trim();
            string remark = this.txtRemark.Text.Trim();

            if (name == "")
            {
                MyMessageBox.ShowInfo("请填写名称");
                return;
            }
            if (remark == "")
            {
                MyMessageBox.ShowInfo("请填写说明");
                return;
            }
            if (this.imgIcon.Source == null || _iconBuffer == null)
            {
                MyMessageBox.ShowInfo("请上传图标");
                return;
            }

            if (MyMessageBox.ShowQuestionOKCancel("请确认奖项信息填写正确") != System.Windows.Forms.DialogResult.OK)
            {
                return;
            }


            VirtualShoppingItem item = new VirtualShoppingItem()
            {
                Name                   = name,
                Remark                 = remark,
                ItemType               = (VirtualShoppingItemType)this.cmbItemType.SelectedValue,
                GainDiamond            = (decimal)this.txtGainDiamond.Value,
                GainExp                = (decimal)this.txtGainExp.Value,
                GainGoldCoin           = (decimal)this.txtGainGoldCoin.Value,
                GainGravel             = (decimal)this.txtGainGravel.Value,
                GainMine_StoneReserves = (decimal)this.txtGainMine_StoneReserves.Value,
                GainMiner              = (decimal)this.txtGainMiner.Value,
                GainRMB                = (decimal)this.txtGainRMB.Value,
                GainShoppingCredits    = (decimal)this.txtGainShoppingCredits.Value,
                GainStone              = (decimal)this.txtGainStone.Value,
                IconBuffer             = this._iconBuffer,
                PlayerMaxBuyableCount  = (int)this.txtPlayerMaxBuyCount.Value,
                SellState              = (SellState)this.cmbItemState.SelectedIndex,
                ValueShoppingCredits   = (decimal)this.txtPriceRMB.Value
            };

            InputActionPasswordWindow winActionPassword = new InputActionPasswordWindow();

            if (winActionPassword.ShowDialog() == true)
            {
                string password = winActionPassword.ActionPassword;
                if (isAdd)
                {
                    this.AsyncAddVirtualShoppingItem(password, item);
                }
                else
                {
                    item.ID = this.oldID;
                    this.AsyncUpdateVirtualShoppingItem(password, item);
                }
            }
        }