Beispiel #1
0
        private void btn_accPortModify_Click(object sender, EventArgs e)
        {
            //文本监测

            //写入
            CIniCtrl.WriteIniData("Server", "ListenPort", txt_accMrgPort.Text, serverIni);
        }
Beispiel #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            OpenFileDialog fileDialog = new OpenFileDialog();

            fileDialog.Multiselect = true;
            fileDialog.Title       = "请选择文件";
            fileDialog.Filter      = "所有文件(*.*)|*.*";

            if (fileDialog.ShowDialog() == DialogResult.OK)
            {
                string file = fileDialog.FileName;
                if (file.Contains("LoginServer.ini") || file.Contains("loginserver.ini"))
                {
                    txt_gameVerFile.Text = file;
                }
                else
                {
                    MessageBox.Show("错误的文件,请重新选择!");
                    txt_gameVerFile.Text = "请选择版本文件!";
                    return;
                }
            }
            else
            {
                return;
            }

            //读取版本号到vertxt
            string CurVer = CIniCtrl.ReadIniData("System", "Version", "", txt_gameVerFile.Text);

            txt_gameVer.Text = CurVer;

            //保存次路径到工具配置文件
            CIniCtrl.WriteIniData("Config", "gameVersionFile", txt_gameVerFile.Text, serverIni);
        }
Beispiel #3
0
        public static string CmdGetVersion()
        {
            string ErrInfo = "";

            try
            {
                string versionIni = System.AppDomain.CurrentDomain.BaseDirectory + verIni;

                //找出传递过来的用户名和密码
                string ver  = "";
                string link = "111";
                ver = CIniCtrl.ReadIniData("Config", "loginVersion", "", versionIni);

                if (File.Exists("D:\\sgserver\\FtpRoot\\Update.zip"))
                {
                    System.IO.FileInfo f = new FileInfo("D:\\sgserver\\FtpRoot\\Update.zip");
                    ErrInfo = ver + "版本" + link + "长度" + f.Length.ToString();
                }
                else
                {
                    ErrInfo = ver + "版本" + link + "长度1";
                }

                LogHelper.WriteLog(System.AppDomain.CurrentDomain.BaseDirectory, ErrInfo, new StackTrace(new StackFrame(true)));
            }
            catch (Exception ex)
            {
                LogHelper.WriteLog(System.AppDomain.CurrentDomain.BaseDirectory, ex.Message, new StackTrace(new StackFrame(true)));
                ErrInfo = "error";
            }

            return(ErrInfo);
        }
Beispiel #4
0
        private void load_Soul_Conf()
        {
            //读取武魂设置
            string LoginServerFile = txt_svrForder.Text + "\\Login\\LoginServer.ini";

            if (!File.Exists(LoginServerFile))
            {
                return;
            }
            string tmp = "";

            tmp = CIniCtrl.ReadIniData("soul", "ticket_weekday", "", LoginServerFile);
            txt_soulticketwdy.Text = tmp.Split(';')[0].Replace("\t", "").Replace(" ", "");

            tmp = CIniCtrl.ReadIniData("soul", "ticket_sell", "", LoginServerFile);
            txt_soulsellday.Text = tmp.Split(';')[0].Replace("\t", "").Replace(" ", "");

            tmp = CIniCtrl.ReadIniData("soul", "battle_weekday", "", LoginServerFile);
            txt_soulbattlwdy.Text = tmp.Split(';')[0].Replace("\t", "").Replace(" ", "");

            tmp = CIniCtrl.ReadIniData("soul", "battle_time", "", LoginServerFile);
            txt_soulbattltime.Text = tmp.Split(';')[0].Replace("\t", "").Replace(" ", "");

            tmp = CIniCtrl.ReadIniData("soul", "battle_period", "", LoginServerFile);
            txt_soulbattlperiod.Text = tmp.Split(';')[0].Replace("\t", "").Replace(" ", "");
        }
Beispiel #5
0
        private void button19_Click(object sender, EventArgs e)
        {
            OpenFileDialog fileDialog = new OpenFileDialog();

            fileDialog.Multiselect = true;
            fileDialog.Title       = "请选择文件";
            fileDialog.Filter      = "所有文件(*.*)|*.*";

            if (fileDialog.ShowDialog() == DialogResult.OK)
            {
                string file = fileDialog.FileName;
                if (file.Contains("题库.txt"))
                {
                    txt_QusbankFile.Text = file;
                    CIniCtrl.WriteIniData("Config", "QuesBankFile", file, serverIni);
                }
                else
                {
                    MessageBox.Show("错误的文件,请重新选择!");
                    txt_QusbankFile.Text = "请选择版本文件!";
                    return;
                }
            }
            else
            {
                return;
            }
        }
Beispiel #6
0
        private void ben_xbconfSave_Click(object sender, EventArgs e)
        {
            if (xbconf_SelectedIndex >= 0)
            {
                if (!string.IsNullOrEmpty(txt_xbconfCap.Text))
                {
                    //保存配置
                    string xbconfCap  = "xbconfCap" + xbconf_SelectedIndex;
                    string xbconfDesc = "xbconfDesc" + xbconf_SelectedIndex;
                    CIniCtrl.WriteIniData("XbConf", xbconfCap, txt_xbconfCap.Text, serverIni);
                    CIniCtrl.WriteIniData("XbConf", xbconfDesc, rbx_confDesc.Text, serverIni);

                    //物品代币
                    string tmp           = "xbconfItemsId" + xbconf_SelectedIndex;
                    string xbconfItemsId = txt_xbId1.Text + "," + txt_xbId2.Text + "," + txt_xbId3.Text + "," + txt_xbId4.Text + "," + txt_xbId5.Text
                                           + "," + txt_xbId6.Text + "," + txt_xbId7.Text + "," + txt_xbId8.Text + "," + txt_xbId9.Text + "," + txt_xbId10.Text;
                    CIniCtrl.WriteIniData("XbConf", tmp, xbconfItemsId, serverIni);
                    tmp = "xbconfItemsName" + xbconf_SelectedIndex;
                    string xbconfItemsName = txt_xbName1.Text + "," + txt_xbName2.Text + "," + txt_xbName3.Text + "," + txt_xbName4.Text + "," + txt_xbName5.Text
                                             + "," + txt_xbName6.Text + "," + txt_xbName7.Text + "," + txt_xbName8.Text + "," + txt_xbName9.Text + "," + txt_xbName10.Text;
                    CIniCtrl.WriteIniData("XbConf", tmp, xbconfItemsName, serverIni);
                    tmp = "xbconfItemsCount" + xbconf_SelectedIndex;
                    string xbconfItemsCount = txt_xbCount1.Text + "," + txt_xbCount2.Text + "," + txt_xbCount3.Text + "," + txt_xbCount4.Text + "," + txt_xbCount5.Text
                                              + "," + txt_xbCount6.Text + "," + txt_xbCount7.Text + "," + txt_xbCount8.Text + "," + txt_xbCount9.Text + "," + txt_xbCount10.Text;
                    CIniCtrl.WriteIniData("XbConf", tmp, xbconfItemsCount, serverIni);
                    tmp = "xbconfDb" + xbconf_SelectedIndex;
                    CIniCtrl.WriteIniData("XbConf", tmp, txt_dbSend.Text, serverIni);

                    cbx_xbconf.Items[xbconf_SelectedIndex] = txt_xbconfCap.Text;
                }
            }
        }
Beispiel #7
0
        private void btn_startQues_Click(object sender, EventArgs e)
        {
            if (!m_Active)
            {
                MessageBox.Show("软件尚未激活! 请联系软件发布人给予激活!");
                return;
            }
            m_SGExHandle.LoadLoginServerPtr("");
            if (txt_QusbankFile.Text == string.Empty)
            {
                MessageBox.Show("请选择题库!");
                return;
            }
            if (txt_TaskTime.Text == string.Empty || txt_AskNormalInterval.Text == string.Empty ||
                txt_AnswerVtId.Text == string.Empty || txt_AnswerVtName.Text == string.Empty ||
                txt_QuesInterval.Text == string.Empty || txt_MaxQuesNum.Text == string.Empty)
            {
                MessageBox.Show("请确保[开始时间][普通题间隔][奖励id][奖励名称][出题总数][问答间隔]均设置成功!");
                return;
            }
            //构建竞赛奖励字符串
            string normalReward = rbx_QANormalDetil.Text;
            string taskReward   = "";

            for (int i = 1; i <= 10; i++)
            {
                string key    = "m_TaskRecharge" + i;
                string reward = CIniCtrl.ReadIniData("Config", key, "", serverIni);
                if (reward != string.Empty && reward != "")
                {
                    taskReward += reward + "&";
                }
            }
            if (g_StopQues)
            {
                g_StopQues         = false;
                btn_startQues.Text = "停止";
                m_SleepCount       = m_AskNormalInterval = UInt32.Parse(txt_AskNormalInterval.Text);
                m_AnswerVtId       = UInt32.Parse(txt_AnswerVtId.Text);
                m_AnswerVtName     = txt_AnswerVtName.Text;

                m_SGExHandle.SetConfigPath(txt_gameVerFile.Text);
                m_SGExHandle.LoadAQBank(txt_QusbankFile.Text);
                m_SGExHandle.SetQADatVt(txt_svrForder.Text + "\\DataBase\\saves\\players.dat");
                m_SGExHandle.SetQAReward((int)m_AnswerVtId, m_AnswerVtName);
                m_SGExHandle.SetQANormalReward(normalReward);
                m_SGExHandle.SetQATaskReward(taskReward);
                m_SGExHandle.SetMaxQuesNum(g_MaxQuesNum);
                m_SGExHandle.SetNormalInterval((int)m_AskNormalInterval);
                m_SGExHandle.SetTaskTime(m_TaskDate, m_TaskTime);
                m_SGExHandle.StartQAThread();
            }
            else
            {
                g_StopQues         = true;
                btn_startQues.Text = "开始";
                m_SGExHandle.StopQAThread();
            }
        }
Beispiel #8
0
        private void txt_sqlPort_TextChanged(object sender, EventArgs e)
        {
            //文本监测

            //写入
            CIniCtrl.WriteIniData("Server", "SqlPort", txt_sqlPort.Text, serverIni);
            sql_srvPort = txt_sqlPort.Text;
        }
Beispiel #9
0
 private void txt_loginVer_TextChanged(object sender, EventArgs e)
 {
     if (txt_gameVerFile.Text != "" && txt_gameVerFile.Text != null)
     {
         //写版本号到配置文件.ini
         CIniCtrl.WriteIniData("Config", "loginVersion", txt_loginVer.Text, serverIni);
     }
 }
Beispiel #10
0
        private void txt_accMrgPort_TextChanged(object sender, EventArgs e)
        {
            //文本监测

            //写入
            CIniCtrl.WriteIniData("Server", "ListenPort", txt_accMrgPort.Text, serverIni);
            accMrgPort = txt_accMrgPort.Text;
        }
Beispiel #11
0
        private void btn_regConfSave_Click(object sender, EventArgs e)
        {
            serverIni = System.AppDomain.CurrentDomain.BaseDirectory + "配置文件.ini";

            //配置编号
            string conf_num = cbx_rcgConfNum.Text;

            string id   = "";
            string name = "";
            string num  = "";

            //配置内容
            id   = txt_confId1.Text;
            name = txt_confName1.Text;
            num  = txt_confNum1.Text;
            //保存
            CIniCtrl.WriteIniData("Recharge", conf_num + "_id1", id, serverIni);
            CIniCtrl.WriteIniData("Recharge", conf_num + "_name1", name, serverIni);
            CIniCtrl.WriteIniData("Recharge", conf_num + "_num1", num, serverIni);

            //配置内容
            id   = txt_confId2.Text;
            name = txt_confName2.Text;
            num  = txt_confNum2.Text;
            //保存
            CIniCtrl.WriteIniData("Recharge", conf_num + "_id2", id, serverIni);
            CIniCtrl.WriteIniData("Recharge", conf_num + "_name2", name, serverIni);
            CIniCtrl.WriteIniData("Recharge", conf_num + "_num2", num, serverIni);

            //配置内容
            id   = txt_confId3.Text;
            name = txt_confName3.Text;
            num  = txt_confNum3.Text;
            //保存
            CIniCtrl.WriteIniData("Recharge", conf_num + "_id3", id, serverIni);
            CIniCtrl.WriteIniData("Recharge", conf_num + "_name3", name, serverIni);
            CIniCtrl.WriteIniData("Recharge", conf_num + "_num3", num, serverIni);

            //配置内容
            id   = txt_confId4.Text;
            name = txt_confName4.Text;
            num  = txt_confNum4.Text;
            //保存
            CIniCtrl.WriteIniData("Recharge", conf_num + "_id4", id, serverIni);
            CIniCtrl.WriteIniData("Recharge", conf_num + "_name4", name, serverIni);
            CIniCtrl.WriteIniData("Recharge", conf_num + "_num4", num, serverIni);

            //配置内容
            id   = txt_confId5.Text;
            name = txt_confName5.Text;
            num  = txt_confNum5.Text;
            //保存
            CIniCtrl.WriteIniData("Recharge", conf_num + "_id5", id, serverIni);
            CIniCtrl.WriteIniData("Recharge", conf_num + "_name5", name, serverIni);
            CIniCtrl.WriteIniData("Recharge", conf_num + "_num5", num, serverIni);
        }
Beispiel #12
0
        private void DoRcgLevelSelectedIndexChanged(string rcgLevel)
        {
            string rcgConf  = CIniCtrl.ReadIniData(rcgLevel, "rcgConf", "", serverIni);
            string leftNum  = CIniCtrl.ReadIniData(rcgLevel, "leftNum", "", serverIni);
            string rightNum = CIniCtrl.ReadIniData(rcgLevel, "rightNum", "", serverIni);

            cbx_rcgConf.Text    = rcgConf;
            cbx_rcgConfNum.Text = rcgConf;
            txt_betmLeft.Text   = leftNum;
            txt_betmRight.Text  = rightNum;
        }
Beispiel #13
0
 private void cbx_AutoFreeze_CheckedChanged(object sender, EventArgs e)
 {
     if (cbx_AutoFreeze.Checked)
     {
         CIniCtrl.WriteIniData("Config", "AutoFreeze", "Enable", serverIni);
     }
     else
     {
         CIniCtrl.WriteIniData("Config", "AutoFreeze", "Disable", serverIni);
     }
 }
Beispiel #14
0
 private void cbx_AutoStart15Talk_CheckedChanged(object sender, EventArgs e)
 {
     if (cbx_AutoStart15Talk.Checked)
     {
         CIniCtrl.WriteIniData("Config", "15TalkAutoStart", "Enable", serverIni);
     }
     else
     {
         CIniCtrl.WriteIniData("Config", "15TalkAutoStart", "Disable", serverIni);
     }
 }
Beispiel #15
0
        private void OnHandleRcgConfNum_SelectedIndexChanged(string conf_num)
        {
            serverIni = System.AppDomain.CurrentDomain.BaseDirectory + "配置文件.ini";
            string id   = "";
            string name = "";
            string num  = "";

            //读取
            id   = CIniCtrl.ReadIniData("Recharge", conf_num + "_id1", "", serverIni);
            name = CIniCtrl.ReadIniData("Recharge", conf_num + "_name1", "", serverIni);
            num  = CIniCtrl.ReadIniData("Recharge", conf_num + "_num1", "", serverIni);
            //配置内容
            txt_confId1.Text   = id;
            txt_confName1.Text = name;
            txt_confNum1.Text  = num;

            //读取
            id   = CIniCtrl.ReadIniData("Recharge", conf_num + "_id2", "", serverIni);
            name = CIniCtrl.ReadIniData("Recharge", conf_num + "_name2", "", serverIni);
            num  = CIniCtrl.ReadIniData("Recharge", conf_num + "_num2", "", serverIni);
            //配置内容
            txt_confId2.Text   = id;
            txt_confName2.Text = name;
            txt_confNum2.Text  = num;

            //读取
            id   = CIniCtrl.ReadIniData("Recharge", conf_num + "_id3", "", serverIni);
            name = CIniCtrl.ReadIniData("Recharge", conf_num + "_name3", "", serverIni);
            num  = CIniCtrl.ReadIniData("Recharge", conf_num + "_num3", "", serverIni);
            //配置内容
            txt_confId3.Text   = id;
            txt_confName3.Text = name;
            txt_confNum3.Text  = num;

            //读取
            id   = CIniCtrl.ReadIniData("Recharge", conf_num + "_id4", "", serverIni);
            name = CIniCtrl.ReadIniData("Recharge", conf_num + "_name4", "", serverIni);
            num  = CIniCtrl.ReadIniData("Recharge", conf_num + "_num4", "", serverIni);
            //配置内容
            txt_confId4.Text   = id;
            txt_confName4.Text = name;
            txt_confNum4.Text  = num;

            //读取
            id   = CIniCtrl.ReadIniData("Recharge", conf_num + "_id5", "", serverIni);
            name = CIniCtrl.ReadIniData("Recharge", conf_num + "_name5", "", serverIni);
            num  = CIniCtrl.ReadIniData("Recharge", conf_num + "_num5", "", serverIni);
            //配置内容
            txt_confId5.Text   = id;
            txt_confName5.Text = name;
            txt_confNum5.Text  = num;
        }
Beispiel #16
0
        private void cbx_xbconf_SelectedIndexChanged(object sender, EventArgs e)
        {
            clear_xbConfItems();
            xbconf_SelectedIndex = cbx_xbconf.SelectedIndex;
            string xbconfCap  = "xbconfCap" + cbx_xbconf.SelectedIndex;
            string xbconfDesc = "xbconfDesc" + cbx_xbconf.SelectedIndex;

            txt_xbconfCap.Text = CIniCtrl.ReadIniData("XbConf", xbconfCap, "", serverIni);
            rbx_confDesc.Text  = CIniCtrl.ReadIniData("XbConf", xbconfDesc, "", serverIni);

            //读取
            string tmp = "xbconfItemsId" + cbx_xbconf.SelectedIndex;
            string ret = CIniCtrl.ReadIniData("XbConf", tmp, "", serverIni);
            var    Ids = ret.Split(',');

            for (int i = 0; i < Ids.Length; i++)
            {
                string  ctrlName = "txt_xbId" + (i + 1);
                Control col      = this.groupBox17.Controls.Find(ctrlName, true)[0];
                TextBox txt      = col as TextBox;//转为TextBox
                txt.Text = Ids[i];
            }
            tmp = "xbconfItemsName" + cbx_xbconf.SelectedIndex;
            ret = CIniCtrl.ReadIniData("XbConf", tmp, "", serverIni);
            var Names = ret.Split(',');

            for (int i = 0; i < Names.Length; i++)
            {
                string  ctrlName = "txt_xbName" + (i + 1);
                Control col      = this.groupBox17.Controls.Find(ctrlName, true)[0];
                TextBox txt      = col as TextBox;//转为TextBox
                txt.Text = Names[i];
            }

            tmp = "xbconfItemsCount" + cbx_xbconf.SelectedIndex;
            ret = CIniCtrl.ReadIniData("XbConf", tmp, "", serverIni);
            var Counts = ret.Split(',');

            for (int i = 0; i < Counts.Length; i++)
            {
                string  ctrlName = "txt_xbCount" + (i + 1);
                Control col      = this.groupBox17.Controls.Find(ctrlName, true)[0];
                TextBox txt      = col as TextBox;//转为TextBox
                txt.Text = Counts[i];
            }

            tmp             = "xbconfDb" + cbx_xbconf.SelectedIndex;
            ret             = CIniCtrl.ReadIniData("XbConf", tmp, "", serverIni);
            txt_dbSend.Text = ret;
        }
Beispiel #17
0
        private void button3_Click(object sender, EventArgs e)
        {
            string gServerIp = txt_GServerIP.Text;

            CIniCtrl.WriteIniData("Server", "GServerIP", gServerIp, serverIni);

            //

            //读取 //soldata/Server.ini
            string ServerFile = txt_svrForder.Text + "\\soldata\\Server.ini";

            if (!File.Exists(ServerFile))
            {
                return;
            }
            FileStream   rdfs = new FileStream(ServerFile, FileMode.Open, FileAccess.Read);
            StreamReader rd   = new StreamReader(rdfs, Encoding.ASCII);

            rd.BaseStream.Seek(0, SeekOrigin.Begin);

            rd.DiscardBufferedData();
            rd.BaseStream.Seek(0, SeekOrigin.Begin);
            rd.BaseStream.Position = 0;

            string allLine = "";
            string strLine = "";

            strLine = "";
            strLine = rd.ReadLine();
            do
            {
                if (strLine.Contains("ip = "))
                {
                    strLine = "ip = " + gServerIp;
                }
                else if (strLine.Contains("ip_real = "))
                {
                    strLine = "ip_real = " + gServerIp;
                }

                allLine += strLine + "\r\n";
                strLine  = "";
                strLine  = rd.ReadLine();
            } while (strLine != null);
            rd.Close();
            rdfs.Close();

            File.WriteAllText(ServerFile, allLine);
        }
Beispiel #18
0
        private void UpdateWorldWordsList()
        {
            string liststring = "";

            for (int i = 0; i < listBox1.Items.Count; i++)
            {
                liststring += listBox1.Items[i].ToString();
                if (i < listBox1.Items.Count - 1)
                {
                    liststring += ";";
                }
            }

            CIniCtrl.WriteIniData("Config", "WorldWordsList", liststring, serverIni);
        }
Beispiel #19
0
        private void button4_Click(object sender, EventArgs e)
        {
            string tmp     = "";
            string tmpFile = "";

            //Account AccountServer.ini [system] sql_ip = 127.0.0.1,4433 sql_inout_ip = 127.0.0.1,4433 sql_account = sa sql_password = 123456
            tmpFile = txt_svrForder.Text + "\\Account\\AccountServer.ini";
            if (!File.Exists(tmpFile))
            {
                return;
            }
            tmp = txt_sqlsvr.Text + "," + txt_sqlPort.Text;
            CIniCtrl.WriteIniData("system", "sql_ip", tmp, tmpFile);
            CIniCtrl.WriteIniData("system", "sql_inout_ip", tmp, tmpFile);

            tmp = txt_sqlAcc.Text;
            CIniCtrl.WriteIniData("system", "sql_account", tmp, tmpFile);
            tmp = txt_sqlPwd.Text;
            CIniCtrl.WriteIniData("system", "sql_password", tmp, tmpFile);
            //Log LogServer.ini [system] sql_ip = 127.0.0.1,4433 sql_account = sa sql_password = 123456
            tmpFile = txt_svrForder.Text + "\\Log\\LogServer.ini";
            if (!File.Exists(tmpFile))
            {
                return;
            }
            tmp = txt_sqlsvr.Text + "," + txt_sqlPort.Text;
            CIniCtrl.WriteIniData("system", "sql_ip", tmp, tmpFile);

            tmp = txt_sqlAcc.Text;
            CIniCtrl.WriteIniData("system", "sql_account", tmp, tmpFile);
            tmp = txt_sqlPwd.Text;
            CIniCtrl.WriteIniData("system", "sql_password", tmp, tmpFile);

            //VTServer VTServer.ini [system] sql_item_ip = 127.0.0.1,4433 sql_ip = 127.0.0.1,4433 sql_account = sa sql_password = 123456
            tmpFile = txt_svrForder.Text + "\\VTServer\\VTServer.ini";
            if (!File.Exists(tmpFile))
            {
                return;
            }
            tmp = txt_sqlsvr.Text + "," + txt_sqlPort.Text;
            CIniCtrl.WriteIniData("system", "sql_item_ip", tmp, tmpFile);
            CIniCtrl.WriteIniData("system", "sql_ip", tmp, tmpFile);

            tmp = txt_sqlAcc.Text;
            CIniCtrl.WriteIniData("system", "sql_account", tmp, tmpFile);
            tmp = txt_sqlPwd.Text;
            CIniCtrl.WriteIniData("system", "sql_password", tmp, tmpFile);
        }
Beispiel #20
0
 private void txt_gameVer_TextChanged(object sender, EventArgs e)
 {
     if (txt_gameVerFile.Text.Contains("LoginServer.ini") || txt_gameVerFile.Text.Contains("loginserver.ini"))
     {
         if (txt_gameVer.Text != "" && txt_gameVer.Text != null)
         {
             //写版本号到loginServer.ini
             CIniCtrl.WriteIniData("System", "Version", txt_gameVer.Text, txt_gameVerFile.Text);
         }
     }
     else
     {
         MessageBox.Show("错误的文件,请重新选择!");
         txt_gameVerFile.Text = "请选择版本文件!";
         return;
     }
 }
Beispiel #21
0
 private void LoadXbMould()
 {
     for (int i = 0; i < cbx_xbconf.Items.Count; i++)
     {
         string xbconfCap  = "xbconfCap" + i;
         string xbconfDesc = "xbconfDesc" + i;
         string cap        = CIniCtrl.ReadIniData("XbConf", xbconfCap, "", serverIni);
         if (!string.IsNullOrEmpty(cap) && cap != "")
         {
             cbx_xbconf.Items[i] = cap;
         }
     }
     cbx_xbconf.SelectedIndex = 0;
     xbconf_SelectedIndex     = 0;
     txt_xbconfCap.Text       = CIniCtrl.ReadIniData("XbConf", "xbconfCap0", "", serverIni);
     rbx_confDesc.Text        = CIniCtrl.ReadIniData("XbConf", "xbconfDesc0", "", serverIni);
 }
Beispiel #22
0
 private void btn_psSave_Click(object sender, EventArgs e)
 {
     CIniCtrl.WriteIniData("Prosess", "ps1", txt_ps1.Text, serverIni);
     CIniCtrl.WriteIniData("Prosess", "ps2", txt_ps2.Text, serverIni);
     CIniCtrl.WriteIniData("Prosess", "ps3", txt_ps3.Text, serverIni);
     CIniCtrl.WriteIniData("Prosess", "ps4", txt_ps4.Text, serverIni);
     CIniCtrl.WriteIniData("Prosess", "ps5", txt_ps5.Text, serverIni);
     CIniCtrl.WriteIniData("Prosess", "ps6", txt_ps6.Text, serverIni);
     CIniCtrl.WriteIniData("Prosess", "ps7", txt_ps7.Text, serverIni);
     CIniCtrl.WriteIniData("Prosess", "ps8", txt_ps8.Text, serverIni);
     CIniCtrl.WriteIniData("Prosess", "ps9", txt_ps9.Text, serverIni);
     CIniCtrl.WriteIniData("Prosess", "ps10", txt_ps10.Text, serverIni);
     CIniCtrl.WriteIniData("Prosess", "ps11", txt_ps11.Text, serverIni);
     CIniCtrl.WriteIniData("Prosess", "ps12", txt_ps12.Text, serverIni);
     CIniCtrl.WriteIniData("Prosess", "ps13", txt_ps13.Text, serverIni);
     CIniCtrl.WriteIniData("Prosess", "ps14", txt_ps14.Text, serverIni);
     CIniCtrl.WriteIniData("Prosess", "ps15", txt_ps15.Text, serverIni);
 }
Beispiel #23
0
 private void load_Process_Conf()
 {
     txt_ps1.Text  = CIniCtrl.ReadIniData("Prosess", "ps1", "", serverIni);
     txt_ps2.Text  = CIniCtrl.ReadIniData("Prosess", "ps2", "", serverIni);
     txt_ps3.Text  = CIniCtrl.ReadIniData("Prosess", "ps3", "", serverIni);
     txt_ps4.Text  = CIniCtrl.ReadIniData("Prosess", "ps4", "", serverIni);
     txt_ps5.Text  = CIniCtrl.ReadIniData("Prosess", "ps5", "", serverIni);
     txt_ps6.Text  = CIniCtrl.ReadIniData("Prosess", "ps6", "", serverIni);
     txt_ps7.Text  = CIniCtrl.ReadIniData("Prosess", "ps7", "", serverIni);
     txt_ps8.Text  = CIniCtrl.ReadIniData("Prosess", "ps8", "", serverIni);
     txt_ps9.Text  = CIniCtrl.ReadIniData("Prosess", "ps9", "", serverIni);
     txt_ps10.Text = CIniCtrl.ReadIniData("Prosess", "ps10", "", serverIni);
     txt_ps11.Text = CIniCtrl.ReadIniData("Prosess", "ps11", "", serverIni);
     txt_ps12.Text = CIniCtrl.ReadIniData("Prosess", "ps12", "", serverIni);
     txt_ps13.Text = CIniCtrl.ReadIniData("Prosess", "ps13", "", serverIni);
     txt_ps14.Text = CIniCtrl.ReadIniData("Prosess", "ps14", "", serverIni);
     txt_ps15.Text = CIniCtrl.ReadIniData("Prosess", "ps15", "", serverIni);
 }
Beispiel #24
0
        private void btn_warset_Click(object sender, EventArgs e)
        {
            //设置
            string LoginServerFile = txt_svrForder.Text + "\\Login\\LoginServer.ini";

            if (!File.Exists(LoginServerFile))
            {
                return;
            }
            string tmp = "";

            tmp = txt_wardate.Text;
            CIniCtrl.WriteIniData("System", "country_war_date", tmp, LoginServerFile);
            tmp = txt_wartime.Text;
            CIniCtrl.WriteIniData("System", "country_war_time", tmp, LoginServerFile);
            tmp = txt_warperiod.Text;
            CIniCtrl.WriteIniData("System", "country_war_period", tmp, LoginServerFile);

            m_SGExHandle.ReloadLoginServer();
        }
Beispiel #25
0
        private void btn_rcgLevelSave_Click(object sender, EventArgs e)
        {
            //获取档位
            string rcgLevel = "档位:" + cbx_rcgLevel.Text;
            //获取配置
            string rcgConf = cbx_rcgConf.Text;

            OnHandleRcgConfNum_SelectedIndexChanged(rcgConf);

            //获取间隔
            string leftNum  = txt_betmLeft.Text;
            string rightNum = txt_betmRight.Text;

            //写配置
            CIniCtrl.WriteIniData(rcgLevel, "rcgConf", rcgConf, serverIni);
            CIniCtrl.WriteIniData(rcgLevel, "leftNum", leftNum, serverIni);
            CIniCtrl.WriteIniData(rcgLevel, "rightNum", rightNum, serverIni);

            //根据当前配置更新设定
        }
Beispiel #26
0
        private void load_War_Conf()
        {
            //读取国战设置
            string LoginServerFile = txt_svrForder.Text + "\\Login\\LoginServer.ini";

            if (!File.Exists(LoginServerFile))
            {
                return;
            }
            string tmp = "";

            tmp = CIniCtrl.ReadIniData("System", "country_war_date", "", LoginServerFile);
            txt_wardate.Text = tmp.Split(';')[0].Replace("\t", "").Replace(" ", "");

            tmp = CIniCtrl.ReadIniData("System", "country_war_time", "", LoginServerFile);
            txt_wartime.Text = tmp.Split(';')[0].Replace("\t", "").Replace(" ", "");

            tmp = CIniCtrl.ReadIniData("System", "country_war_period", "", LoginServerFile);
            txt_warperiod.Text = tmp.Split(';')[0].Replace("\t", "").Replace(" ", "");
        }
Beispiel #27
0
        private void button2_Click(object sender, EventArgs e)
        {
            FolderBrowserDialog folderDialog = new FolderBrowserDialog();

            folderDialog.Description = "请选择文件路径";
            string foldPath = "";

            if (folderDialog.ShowDialog() == DialogResult.OK)
            {
                foldPath = folderDialog.SelectedPath;
            }
            else
            {
                return;
            }

            //读取版本号到txt_svrForder
            txt_svrForder.Text = foldPath;

            //保存次路径到工具配置文件
            CIniCtrl.WriteIniData("Config", "gameServerFolder", foldPath, serverIni);
        }
Beispiel #28
0
        private void btn_ps15_Click(object sender, EventArgs e)
        {
            OpenFileDialog fileDialog = new OpenFileDialog();

            fileDialog.Multiselect = true;
            fileDialog.Title       = "请选择文件";
            fileDialog.Filter      = "所有文件(*.exe)|*.exe";

            if (fileDialog.ShowDialog() == DialogResult.OK)
            {
                txt_ps15.Text = fileDialog.FileName;
                //保存次路径到工具配置文件
                CIniCtrl.WriteIniData("Prosess", "ps15", fileDialog.FileName, serverIni);
            }
            else
            {
                txt_ps15.Text = "";
                //保存次路径到工具配置文件
                CIniCtrl.WriteIniData("Prosess", "ps1", fileDialog.FileName, serverIni);
                return;
            }
        }
Beispiel #29
0
        private void button20_Click(object sender, EventArgs e)
        {
            CIniCtrl.WriteIniData("Config", "TaskDate", txt_TaskDate.Text, serverIni);
            if (txt_TaskDate.Text != string.Empty)
            {
                var dates = txt_TaskDate.Text.Split(',');
                m_TaskDate.Clear();
                foreach (var date in dates)
                {
                    m_TaskDate.Add(int.Parse(date));
                }
            }

            CIniCtrl.WriteIniData("Config", "TaskTime", txt_TaskTime.Text, serverIni);
            if (txt_TaskTime.Text != string.Empty)
            {
                var times = txt_TaskTime.Text.Split(';');
                m_TaskTime.Clear();
                foreach (var time in times)
                {
                    m_TaskTime.Add(time);
                }
            }


            g_MaxQuesNum = int.Parse(txt_MaxQuesNum.Text);
            CIniCtrl.WriteIniData("Config", "MaxQuesNum", txt_MaxQuesNum.Text, serverIni);
            g_QuesInterval = int.Parse(txt_QuesInterval.Text);
            CIniCtrl.WriteIniData("Config", "QuesInterval", txt_QuesInterval.Text, serverIni);

            m_AskNormalInterval = UInt32.Parse(txt_AskNormalInterval.Text);
            CIniCtrl.WriteIniData("Config", "m_AskNormalInterval", txt_AskNormalInterval.Text, serverIni);
            m_AnswerVtId = UInt32.Parse(txt_AnswerVtId.Text);
            CIniCtrl.WriteIniData("Config", "m_AnswerVtId", txt_AnswerVtId.Text, serverIni);
            m_AnswerVtName = txt_AnswerVtName.Text;
            CIniCtrl.WriteIniData("Config", "m_AnswerVtName", txt_AnswerVtName.Text, serverIni);
        }
Beispiel #30
0
        private void btn_soulset_Click(object sender, EventArgs e)
        {
            //设置
            string LoginServerFile = txt_svrForder.Text + "\\Login\\LoginServer.ini";

            if (!File.Exists(LoginServerFile))
            {
                return;
            }
            string tmp = "";

            tmp = txt_soulticketwdy.Text;
            CIniCtrl.WriteIniData("soul", "ticket_weekday", tmp, LoginServerFile);
            tmp = txt_soulsellday.Text;
            CIniCtrl.WriteIniData("soul", "ticket_sell", tmp, LoginServerFile);
            tmp = txt_soulbattlwdy.Text;
            CIniCtrl.WriteIniData("soul", "battle_weekday", tmp, LoginServerFile);
            tmp = txt_soulbattltime.Text;
            CIniCtrl.WriteIniData("soul", "battle_time", tmp, LoginServerFile);
            tmp = txt_soulbattlperiod.Text;
            CIniCtrl.WriteIniData("soul", "battle_period", tmp, LoginServerFile);

            m_SGExHandle.ReloadLoginServer();
        }