private void backgroundWorkerActiveCode_DoWork(object sender, DoWorkEventArgs e)
 {
     lock (typeof(C_Event.CSocketEvent))
     {
         e.Result = Operation_GD.GetResult(m_ClientEvent, CEnum.ServiceKey.SD_ActiveCode_Query, (CEnum.Message_Body[])e.Argument);
     }
 }
예제 #2
0
 private void backgroundWorkerReDistintegrationOfTheBody_DoWork(object sender, DoWorkEventArgs e)
 {
     lock (typeof(C_Event.CSocketEvent))
     {
         e.Result = Operation_GD.GetResult(m_ClientEvent, CEnum.ServiceKey.SD_LogInfo_Query, (CEnum.Message_Body[])e.Argument);
     }
 }
 private void backgroundWorkerAddMoney_DoWork(object sender, DoWorkEventArgs e)
 {
     lock (typeof(C_Event.CSocketEvent))
     {
         e.Result = Operation_GD.GetResult(tmp_ClientEvent, CEnum.ServiceKey.SD_UserAdditem_Add, (CEnum.Message_Body[])e.Argument);
     }
 }
 private void backgroundWorkerCheckPwd_DoWork(object sender, DoWorkEventArgs e)
 {
     lock (typeof(C_Event.CSocketEvent))
     {
         e.Result = Operation_GD.GetResult(tmp_ClientEvent, CEnum.ServiceKey.SD_SearchPassWord_Query, (CEnum.Message_Body[])e.Argument);
     }
 }
 private void backgroundWorkerReStraightRanking_DoWork(object sender, DoWorkEventArgs e)
 {
     lock (typeof(C_Event.CSocketEvent))
     {
         e.Result = Operation_GD.GetResult(tmp_ClientEvent, CEnum.ServiceKey.SD_UserRank_query, (CEnum.Message_Body[])e.Argument);
     }
 }
 private void backgroundWorkerReGiftInfo_DoWork(object sender, DoWorkEventArgs e)
 {
     lock (typeof(C_Event.CSocketEvent))
     {
         e.Result = Operation_GD.GetResult(tmp_ClientEvent, CEnum.ServiceKey.SD_Grift_FromUser_Query, (CEnum.Message_Body[])e.Argument);
     }
 }
 private void backgroundWorkerEditNotice_DoWork(object sender, DoWorkEventArgs e)
 {
     lock (typeof(C_Event.CSocketEvent))
     {
         e.Result = Operation_GD.GetResult(m_ClientEvent, CEnum.ServiceKey.SD_TaskList_Update, (CEnum.Message_Body[])e.Argument);
     }
 }
예제 #8
0
 private void backgroundWorkerModiStrongLevel_DoWork(object sender, DoWorkEventArgs e)
 {
     lock (typeof(C_Event.CSocketEvent))
     {
         e.Result = Operation_GD.GetResult(tmp_ClientEvent, CEnum.ServiceKey.SD_Account_Query, (CEnum.Message_Body[])e.Argument);
     }
 }
 private void backgroundWorkerReSynthesisDrawingsQuery_DoWork(object sender, DoWorkEventArgs e)
 {
     lock (typeof(C_Event.CSocketEvent))
     {
         e.Result = Operation_GD.GetResult(tmp_ClientEvent, CEnum.ServiceKey.SD_Delete_ItemLog_Query, (CEnum.Message_Body[])e.Argument);
     }
 }
예제 #10
0
        private void GrdDistintegrationOfTheBody_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex != -1)   //双击列名触发
            {
                using (DataTable dt = (DataTable)GrdDistintegrationOfTheBody.DataSource)
                {
                    userTime = dt.Rows[e.RowIndex][10].ToString();
                    SD_ID    = dt.Rows[e.RowIndex][0].ToString();
                    if (MessageBox.Show("恢复机体解体记录!", "恢复机体", MessageBoxButtons.YesNo) == DialogResult.Yes)
                    {
                        CEnum.Message_Body[] mContent = new CEnum.Message_Body[8];

                        mContent[0].eName    = CEnum.TagName.f_idx;
                        mContent[0].eTag     = CEnum.TagFormat.TLV_INTEGER;
                        mContent[0].oContent = userID;

                        mContent[1].eName    = CEnum.TagName.SD_UserName;
                        mContent[1].eTag     = CEnum.TagFormat.TLV_STRING;
                        mContent[1].oContent = userName;



                        mContent[2].eName    = CEnum.TagName.SD_ServerIP;
                        mContent[2].eTag     = CEnum.TagFormat.TLV_STRING;
                        mContent[2].oContent = Operation_GD.GetItemAddr(mServerInfo, CmbServer.Text);


                        mContent[3].eName    = CEnum.TagName.SD_ItemID;
                        mContent[3].eTag     = CEnum.TagFormat.TLV_INTEGER;
                        mContent[3].oContent = int.Parse(dt.Rows[e.RowIndex][4].ToString());

                        mContent[4].eName    = CEnum.TagName.UserByID;
                        mContent[4].eTag     = CEnum.TagFormat.TLV_INTEGER;
                        mContent[4].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString());

                        mContent[5].eName    = CEnum.TagName.SD_ItemName;
                        mContent[5].eTag     = CEnum.TagFormat.TLV_STRING;
                        mContent[5].oContent = dt.Rows[e.RowIndex][5].ToString();

                        mContent[6].eName    = CEnum.TagName.BeginTime;
                        mContent[6].eTag     = CEnum.TagFormat.TLV_STRING;
                        mContent[6].oContent = userTime;

                        mContent[7].eName    = CEnum.TagName.SD_ID;
                        mContent[7].eTag     = CEnum.TagFormat.TLV_INTEGER;
                        mContent[7].oContent = int.Parse(SD_ID);

                        CEnum.Message_Body[,] result = Operation_GD.GetResult(m_ClientEvent, CEnum.ServiceKey.SD_ReGetUnits_Query, mContent);
                        if (result[0, 0].eName == CEnum.TagName.ERROR_Msg)
                        {
                            MessageBox.Show(config.ReadConfigValue("MFj", "FM_Code_Msg1"));
                        }
                        else
                        {
                            MessageBox.Show(result[0, 0].oContent.ToString());

                            if (GrdDistintegrationOfTheBody.DataSource != null)
                            {
                                DataTable dt2 = (DataTable)GrdDistintegrationOfTheBody.DataSource;

                                for (int i = 0; i < dt2.Rows.Count; i++)
                                {
                                    if (dt2.Rows[i].ItemArray[0].ToString() == SD_ID)
                                    {
                                        this.GrdDistintegrationOfTheBody.Rows[i].DefaultCellStyle.BackColor = Color.Red;
                                    }
                                }
                            }
                            //this.comboBoxGuild.Enabled = false;
                            //this.buttonAdd.Enabled = false;
                            //this.buttonQuit.Enabled = true;
                        }
                        //else if (result[0, 0].oContent.ToString() == "FAILURE")
                        //{
                        //    MessageBox.Show("恢复机体失败!");
                        //}
                    }
                }
                //}
                //else
                //{
                //    MessageBox.Show(config.ReadConfigValue("MSDO", "CI_Code_inPutAccont"));
                //}
            }
        }
예제 #11
0
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                if (this.txtNewAccount.Text.Trim() == "")
                {
                    MessageBox.Show("新的GM帐号名不能为空!");
                    return;
                }
                //if (this.txtCurAccount.Text.Trim()==this.txtNewAccount.Text.Trim())
                //{
                //    MessageBox.Show("新的GM帐号名不能与当前的GM帐号名相同!");
                //    return;
                //}
                if (this.txtPassword.Text.ToString() == "")
                {
                    MessageBox.Show("新的GM帐号密码不能为空!");
                    return;
                }
                if (this.txtPassword.Text.ToString() != this.txtRepPass.Text.ToString())
                {
                    MessageBox.Show("新的GM帐号密码和重输的帐号密码不同!");
                    return;
                }
                this.GrpSearch.Enabled = false;
                this.tbcResult.Enabled = false;
                this.Cursor            = Cursors.WaitCursor;//改变鼠标状态

                CEnum.Message_Body[] mContent = new CEnum.Message_Body[7];

                mContent[0].eName    = CEnum.TagName.SD_ServerIP;
                mContent[0].eTag     = CEnum.TagFormat.TLV_STRING;
                mContent[0].oContent = serverIP;

                mContent[1].eName    = CEnum.TagName.UserByID;
                mContent[1].eTag     = CEnum.TagFormat.TLV_INTEGER;
                mContent[1].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString());

                mContent[5].eName    = CEnum.TagName.f_idx;
                mContent[5].eTag     = CEnum.TagFormat.TLV_INTEGER;
                mContent[5].oContent = userID;

                mContent[2].eName    = CEnum.TagName.SD_UserName;
                mContent[2].eTag     = CEnum.TagFormat.TLV_STRING;
                mContent[2].oContent = this.txtNewAccount.Text.Trim();

                mContent[3].eName    = CEnum.TagName.SD_UserName_Old;
                mContent[3].eTag     = CEnum.TagFormat.TLV_STRING;
                mContent[3].oContent = txtCurAccount.Text.ToString();

                mContent[4].eName    = CEnum.TagName.SD_passWd;
                mContent[4].eTag     = CEnum.TagFormat.TLV_STRING;
                mContent[4].oContent = txtPassword.Text.ToString();

                mContent[6].eName    = CEnum.TagName.f_pilot;
                mContent[6].eTag     = CEnum.TagFormat.TLV_STRING;
                mContent[6].oContent = textBox1.Text.ToString();



                lock (typeof(C_Event.CSocketEvent))
                {
                    mResult = Operation_GD.GetResult(m_ClientEvent, CEnum.ServiceKey.SD_UpdateGmAccount_Query, mContent);
                }

                this.GrpSearch.Enabled = true;
                this.tbcResult.Enabled = true;
                this.Cursor            = Cursors.Default;//改变鼠标状态

                //CEnum.Message_Body[,] mResult = (CEnum.Message_Body[,])e.Result;
                if (mResult[0, 0].oContent.ToString() == "SCUESS")
                {
                    Operation_GD.showResult(mResult);

                    //return;
                }
                else
                {
                    MessageBox.Show("修改失败");
                }

                //this.tbcResult.SelectedIndex = 1;
                this.btnSearch_Click(null, null);
                //this.txtCharLvl.Text = "";
                //this.NudNewLvl.SelectedIndex = 0;
                //this.backgroundWorkerModiBodyLevel.RunWorkerAsync(mContent);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
예제 #12
0
        private void btnModiLvl_Click(object sender, EventArgs e)
        {
            try
            {
                //if (this.txtAccount.Text.Trim() == "")
                //{
                //    MessageBox.Show(config.ReadConfigValue("MSD", "AM_Hint_inputName"));
                //    return;
                //}

                this.GrpSearch.Enabled = false;
                this.tbcResult.Enabled = false;
                this.Cursor            = Cursors.WaitCursor;//改变鼠标状态

                CEnum.Message_Body[] mContent = new CEnum.Message_Body[7];

                mContent[0].eName    = CEnum.TagName.SD_ServerIP;
                mContent[0].eTag     = CEnum.TagFormat.TLV_STRING;
                mContent[0].oContent = serverIP;

                mContent[1].eName    = CEnum.TagName.UserByID;
                mContent[1].eTag     = CEnum.TagFormat.TLV_INTEGER;
                mContent[1].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString());

                mContent[2].eName    = CEnum.TagName.f_idx;
                mContent[2].eTag     = CEnum.TagFormat.TLV_INTEGER;
                mContent[2].oContent = userID;

                mContent[3].eName    = CEnum.TagName.SD_UserName;
                mContent[3].eTag     = CEnum.TagFormat.TLV_STRING;
                mContent[3].oContent = txtAccount.Text.Trim();

                mContent[4].eName = CEnum.TagName.SD_UnitLevelNumber;
                mContent[4].eTag  = CEnum.TagFormat.TLV_INTEGER;

                if (this.NudNewLvl.Text.ToString() == "1(新手)")
                {
                    mContent[4].oContent = 1;
                }
                else if (this.NudNewLvl.Text.ToString() == "2(初级)")
                {
                    mContent[4].oContent = 2;
                }
                else if (this.NudNewLvl.Text.ToString() == "3(中级)")
                {
                    mContent[4].oContent = 3;
                }
                else if (this.NudNewLvl.Text.ToString() == "4(高级)")
                {
                    mContent[4].oContent = 4;
                }
                else if (this.NudNewLvl.Text.ToString() == "5(强化1)")
                {
                    mContent[4].oContent = 5;
                }
                else if (this.NudNewLvl.Text.ToString() == "6(强化2)")
                {
                    mContent[4].oContent = 6;
                }
                else if (this.NudNewLvl.Text.ToString() == "7(强化3)")
                {
                    mContent[4].oContent = 7;
                }
                else if (this.NudNewLvl.Text.ToString() == "8(强化4)")
                {
                    mContent[4].oContent = 8;
                }

                mContent[5].eName    = CEnum.TagName.SD_CustomLvMax;
                mContent[5].eTag     = CEnum.TagFormat.TLV_INTEGER;
                mContent[5].oContent = int.Parse(this.numericUpDown1.Text.ToString());

                mContent[6].eName    = CEnum.TagName.SD_ItemID;
                mContent[6].eTag     = CEnum.TagFormat.TLV_INTEGER;
                mContent[6].oContent = int.Parse(BodyName);

                lock (typeof(C_Event.CSocketEvent))
                {
                    mResult = Operation_GD.GetResult(m_ClientEvent, CEnum.ServiceKey.SD_UpdateUnitsExp_Query, mContent);
                }

                this.GrpSearch.Enabled = true;
                this.tbcResult.Enabled = true;
                this.Cursor            = Cursors.Default;//改变鼠标状态

                //CEnum.Message_Body[,] mResult = (CEnum.Message_Body[,])e.Result;
                if (mResult[0, 0].oContent.ToString() == "")
                {
                    MessageBox.Show("该机体不能修改等级!");
                    //return;
                }
                else
                {
                    Operation_GD.showResult(mResult);
                }

                //this.tbcResult.SelectedIndex = 1;
                this.btnSearch_Click(null, null);
                //this.txtCharLvl.Text = "";
                this.NudNewLvl.SelectedIndex = 0;
                //this.backgroundWorkerModiBodyLevel.RunWorkerAsync(mContent);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }