예제 #1
0
 private void GetFloorIfo()
 {
     Dictionary<string, string> dictionary = new Dictionary<string, string>();
     dictionary.Add("", "");
     IDictionary<string, string> parameters = dictionary;
     parameters.Clear();
     parameters.Add("area_id", this.Encrypt(this.iAreaID.ToString(), this.key12));
     string url = "http://" + this.szhostport + "/connect/app/exploration/floor?cyt=1";
     CookieCollection cookies = new CookieCollection();
     Cookie cookie2 = new Cookie("S", this.szCookie) {
         Domain = this.szhost
     };
     Cookie cookie = cookie2;
     cookies.Add(cookie);
     XmlDocument document = null;
     this.actionlog.Text = this.actionlog.Text + "更新层数\r\n";
     Label_00B1:;
     try
     {
         document = this.CreatePostHttpResponse(url, parameters, 0xc350, string.Empty, Encoding.Default, cookies);
     }
     catch (Exception)
     {
         goto Label_00B1;
     }
     this.areaxml = document;
     if (document != null)
     {
         XmlNode node = document.SelectSingleNode("response").SelectSingleNode("body").SelectSingleNode("exploration_floor").SelectSingleNode("floor_info_list");
         this.comboBox3.Items.Clear();
         foreach (XmlNode node2 in node.ChildNodes)
         {
             try
             {
                 int num = int.Parse(node2.SelectSingleNode("id").InnerText);
                 int num2 = int.Parse(node2.SelectSingleNode("cost").InnerText);
                 int num3 = int.Parse(node2.SelectSingleNode("progress").InnerText);
                 ComboBoxItem item2 = new ComboBoxItem {
                     Value = num,
                     Text = "区域" + num.ToString() + "|" + num2.ToString() + "|" + num3.ToString()
                 };
                 ComboBoxItem item = item2;
                 this.comboBox3.Items.Add(item);
             }
             catch (Exception)
             {
             }
         }
         if (this.comboBox3.Items.Count > 0)
         {
             this.comboBox3.SelectedIndex = 0;
         }
     }
 }
예제 #2
0
        private void UpdateJob()
        {
            string url = "http://" + this.szhostport + "/connect/app/job/job_top?cyt=1";
            CookieCollection cookies = new CookieCollection();
            Cookie cookie2 = new Cookie("S", this.szCookie) {
                Domain = this.szhost
            };
            Cookie cookie = cookie2;
            cookies.Add(cookie);
            XmlDocument document = null;
            this.actionlog.Text = this.actionlog.Text + "更新职业\r\n";
            Label_006B:;
            try
            {
                document = this.CreatePostHttpResponse(url, null, 0xc350, string.Empty, Encoding.Default, cookies);
            }
            catch (Exception)
            {
                goto Label_006B;
            }
            this.areaxml = document;
            if (document != null)
            {
                XmlNode node = document.SelectSingleNode("response").SelectSingleNode("body").SelectSingleNode("job_top");
                XmlNodeList list = node.SelectNodes("job_states");
                this.iJobID = int.Parse(node.SelectSingleNode("equipping_job_id").InnerText);
                this.comboBox2.Items.Clear();
                int num = 0;
                foreach (XmlNode node2 in list)
                {
                    string str2;
                    int num2 = int.Parse(node2.SelectSingleNode("job_id").InnerText);
                    int num3 = int.Parse(node2.SelectSingleNode("job_lv").InnerText);
                    switch (num2)
                    {
                        case 1:
                            str2 = "士兵|" + num3;
                            break;

                        case 2:
                            str2 = "武斗|" + num3;
                            break;

                        case 3:
                            str2 = "操纵|" + num3;
                            break;

                        case 4:
                            str2 = "弓手|" + num3;
                            break;

                        case 5:
                            str2 = "(推荐)风水|" + num3;
                            break;

                        case 6:
                            str2 = "曜魔|" + num3;
                            break;

                        case 7:
                            str2 = "会长|" + num3;
                            break;

                        case 8:
                            str2 = "妹妹|" + num3;
                            break;

                        default:
                            str2 = "??|" + num3;
                            break;
                    }
                    this.actionlog.Text = this.actionlog.Text + str2 + "、";
                    ComboBoxItem item2 = new ComboBoxItem {
                        Value = num2,
                        Text = str2
                    };
                    ComboBoxItem item = item2;
                    this.comboBox2.Items.Add(item);
                    if (num2 == this.iJobID)
                    {
                        this.comboBox2.SelectedIndex = num;
                    }
                    num++;
                }
                this.actionlog.Text = this.actionlog.Text + "\r\n";
            }
        }
예제 #3
0
 private void GetAreaIfo()
 {
     string url = "http://" + this.szhostport + "/connect/app/exploration/area?cyt=1";
     CookieCollection cookies = new CookieCollection();
     Cookie cookie2 = new Cookie("S", this.szCookie) {
         Domain = this.szhost
     };
     Cookie cookie = cookie2;
     cookies.Add(cookie);
     XmlDocument document = null;
     this.actionlog.Text = this.actionlog.Text + "更新地图~啊呜\r\n";
     Label_006B:;
     try
     {
         document = this.CreatePostHttpResponse(url, null, 0xc350, string.Empty, Encoding.Default, cookies);
     }
     catch (Exception)
     {
         goto Label_006B;
     }
     this.areaxml = document;
     if (document != null)
     {
         XmlNode node = document.SelectSingleNode("response").SelectSingleNode("body").SelectSingleNode("exploration_area").SelectSingleNode("area_info_list");
         this.comboBox1.Items.Clear();
         foreach (XmlNode node2 in node.ChildNodes)
         {
             if (node2.SelectSingleNode("area_type").InnerText == "0")
             {
                 break;
             }
             int num = int.Parse(node2.SelectSingleNode("id").InnerText);
             ComboBoxItem item2 = new ComboBoxItem {
                 Value = num,
                 Text = node2.SelectSingleNode("name").InnerText
             };
             ComboBoxItem item = item2;
             this.comboBox1.Items.Add(item);
         }
         if (this.comboBox1.Items.Count > 0)
         {
             this.comboBox1.SelectedIndex = 0;
         }
     }
     this.actionlog.Text = this.actionlog.Text + "更新成功(∩_∩)\r\n";
 }