示例#1
0
        private void LoadInfo(string type)
        {
            OleDbConnection conn = new OleDbConnection();

            conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|data.mdb";
            conn.Open();
            string          strcmd = String.Format("SELECT * FROM [TSkill] where [Type] = '{0}' order by [Prior]", type);
            OleDbCommand    cmd    = new OleDbCommand(strcmd, conn);
            OleDbDataReader dr     = cmd.ExecuteReader();
            int             id     = 1;

            while (dr.Read())
            {
                ((TalentSkillBox)(Controls["talentSkillBox" + id])).Head   = PicLoader.Read(String.Format("TSkill.{0}.JPG", dr[0].ToString()));
                ((TalentSkillBox)(Controls["talentSkillBox" + id])).DName  = dr[1].ToString();
                ((TalentSkillBox)(Controls["talentSkillBox" + id])).Effect = dr[2].ToString();
                ((TalentSkillBox)(Controls["talentSkillBox" + id])).Str    = int.Parse(dr[3].ToString());
                ((TalentSkillBox)(Controls["talentSkillBox" + id])).Agi    = int.Parse(dr[4].ToString());
                ((TalentSkillBox)(Controls["talentSkillBox" + id])).Intp   = int.Parse(dr[5].ToString());
                ((TalentSkillBox)(Controls["talentSkillBox" + id])).SetChart(int.Parse(dr[3].ToString()), int.Parse(dr[4].ToString()), int.Parse(dr[5].ToString()), dr[2].ToString());
                ((TalentSkillBox)(Controls["talentSkillBox" + id])).Effect2 = dr[6].ToString();
                if (dr[6].ToString() != "")
                {
                    ((TalentSkillBox)(Controls["talentSkillBox" + id])).Str2  = int.Parse(dr[7].ToString());
                    ((TalentSkillBox)(Controls["talentSkillBox" + id])).Agi2  = int.Parse(dr[8].ToString());
                    ((TalentSkillBox)(Controls["talentSkillBox" + id])).Intp2 = int.Parse(dr[9].ToString());
                }
                id++;
            }
            conn.Close();
        }
示例#2
0
 private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (comboBox1.SelectedIndex >= 0)
     {
         pictureBox1.Image = PicLoader.Read(String.Format("SigBack.{0}.JPG", comboBox1.SelectedIndex + 1));
         pictureBox7.Image = PicLoader.Read(String.Format("SigBack.{0}.JPG", comboBox1.SelectedIndex + 1));
     }
 }
示例#3
0
 private void ItemView_Load(object sender, EventArgs e)
 {
     BackgroundImage = PicLoader.Read("Bg.t1.JPG");
     for (int i = 0; i < 17; i++)
     {
         ((Button)panel4.Controls["button" + (i + 1)]).BackgroundImage = PicLoader.Read(String.Format("Shop.{0}.JPG", i + 1));
     }
     LoadInfo("ÎäÆ÷ÉÌÈË");
 }
示例#4
0
 private void BossView_Load(object sender, EventArgs e)
 {
     BackgroundImage = PicLoader.Read("Bg.t1.JPG");
     for (int i = 0; i < 8; i++)
     {
         ((Button)panel4.Controls["button" + (i + 1)]).BackgroundImage = PicLoader.Read(String.Format("Boss.{0}.JPG", i + 1));
     }
     id = 1;
     LoadInfo();
 }
示例#5
0
 private void PetView_Load(object sender, EventArgs e)
 {
     BackgroundImage = PicLoader.Read("Bg.t1.JPG");
     p = new int[8];
     for (int i = 0; i < 10; i++)
     {
         ((Button)panel4.Controls["buttons" + (i + 1)]).BackgroundImage = PicLoader.Read(String.Format("AttrRace.A{0}.JPG", i + 1));
     }
     ShowElement(0);
 }
示例#6
0
        private void LoadInfo()
        {
            OleDbConnection conn = new OleDbConnection();

            conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|data.mdb";
            conn.Open();
            string          strcmd = String.Format("SELECT * from Boss where [ID] = {0}", id);
            OleDbCommand    cmd    = new OleDbCommand(strcmd, conn);
            OleDbDataReader dr     = cmd.ExecuteReader();

            if (dr.Read())
            {
                labelname.Text  = dr[1].ToString();
                textBoxHis.Text = dr[2].ToString();
                labelatk.Text   = dr[4].ToString();
                labeldef.Text   = dr[3].ToString();
                labelmhp.Text   = dr[5].ToString();
                labelmmp.Text   = dr[6].ToString();
                labelAts.Text   = dr[7].ToString();
                labelSpd.Text   = dr[8].ToString();
                labelRag.Text   = dr[9].ToString();
                labelReg.Text   = dr[10].ToString();
                labelGiv.Text   = dr[11].ToString();
                for (int i = 0; i < 4; i++)
                {
                    type[i] = int.Parse(dr[12 + i * 2].ToString());
                    ((PictureBox)(panel5.Controls["pictureBox" + (i + 1)])).Image = PicLoader.Read(String.Format("Items.C{0}.JPG", dr[12 + i * 2].ToString()));
                    ((Label)(panel5.Controls["labelp" + (i + 1)])).Text           = string.Format("{0}%", double.Parse(dr[13 + i * 2].ToString()) * 100);
                }
            }
            strcmd = String.Format("SELECT * from MSkill where [Group] = '{0}'", labelname.Text);
            cmd    = new OleDbCommand(strcmd, conn);
            dr     = cmd.ExecuteReader();
            richTextBox1.Clear();
            while (dr.Read())
            {
                int ip;
                int ip2;
                ip = richTextBox1.Text.Length;
                richTextBox1.AppendText(String.Format("{0} ", dr[1].ToString()));
                ip2 = richTextBox1.Text.Length;
                richTextBox1.Select(ip, ip2 - ip - 1);
                richTextBox1.SelectionColor = Color.Red;
                richTextBox1.AppendText(String.Format("{0}\n", dr[3].ToString()));
            }
            conn.Close();

            pictureBoxhero.Image = PicLoader.Read(String.Format("Boss.{0}.JPG", id));
        }
示例#7
0
 private void CheckRace()
 {
     for (int i = 1; i <= 9; i++)
     {
         if (race[i - 1] == '1')
         {
             (Controls["pictureBoxd" + i] as PictureBox).Image = PicLoader.Read(String.Format("AttrRace.R{0}.JPG", i));
             (Controls["pictureBoxd" + i] as PictureBox).Show();
         }
         else
         {
             (Controls["pictureBoxd" + i] as PictureBox).Image = null;
             (Controls["pictureBoxd" + i] as PictureBox).Hide();
         }
     }
 }
示例#8
0
 private void FillMapInfo(TimeSpan time)
 {
     labelFileLength.Text  = replay.Size.ToString();
     labelGameTime.Text    = time.ToString().Substring(0, 8);
     labelGameName.Text    = replay.GameName;
     labelGameType.Text    = replay.GameType.ToString();
     labelGameVersion.Text = String.Format("1.{0}", replay.Version.ToString());
     labelHost.Text        = replay.Host.Name.ToString();
     labelMapPath.Text     = replay.Map.Path;
     if (replay.Map.Path.Contains("Eternia"))
     {
         pictureBoxLogo.Image = PicLoader.Read("Basic.logo.JPG");
     }
     else
     {
         pictureBoxLogo.Image = null;
     }
 }
示例#9
0
 private void buttons1_Click(object sender, EventArgs e)
 {
     shop = int.Parse(((Button)sender).Name.Substring(7)) - 1;
     for (int i = 0; i < 11; i++)
     {
         if (hid[shop * 11 + i] != 0)
         {
             ((Button)panel4.Controls["button" + (i + 1)]).Show();
             ((Button)panel4.Controls["button" + (i + 1)]).BackgroundImage = PicLoader.Read(String.Format("Heros.{0}.JPG", hid[shop * 11 + i]));
         }
         else
         {
             ((Button)panel4.Controls["button" + (i + 1)]).Hide();
         }
     }
     id = hid[shop * 11];
     LoadInfo();
 }
示例#10
0
        private void ShowElement(int shop)
        {
            for (int i = 0; i < 8; i++)
            {
                p[i] = 0;
            }
            switch (shop)
            {
            case 0: p[0] = 33; p[1] = 34; p[2] = 35; p[3] = 36; p[4] = 37; p[5] = 52; p[6] = 47; p[7] = 53; break;

            case 1: p[0] = 29; p[1] = 30; p[2] = 31; p[3] = 32; p[4] = 46; p[5] = 57; break;

            case 2: p[0] = 13; p[1] = 14; p[2] = 15; p[3] = 16; p[4] = 38; p[5] = 45; break;

            case 3: p[0] = 21; p[1] = 22; p[2] = 23; p[3] = 24; p[4] = 43; p[5] = 55; break;

            case 4: p[0] = 9; p[1] = 10; p[2] = 11; p[3] = 12; p[4] = 39; p[5] = 48; break;

            case 5: p[0] = 5; p[1] = 6; p[2] = 7; p[3] = 8; p[4] = 40; p[5] = 56; break;

            case 6: p[0] = 25; p[1] = 26; p[2] = 27; p[3] = 28; p[4] = 44; p[5] = 58; break;

            case 7: p[0] = 17; p[1] = 18; p[2] = 19; p[3] = 20; p[4] = 41; p[5] = 49; break;

            case 8: p[0] = 1; p[1] = 2; p[2] = 3; p[3] = 4; p[4] = 42; p[5] = 54; break;

            case 9: p[0] = 50; p[1] = 51; p[2] = 59; break;

            default: break;
            }
            for (int i = 0; i < 8; i++)
            {
                if (p[i] != 0)
                {
                    ((Button)panel4.Controls["button" + (i + 1)]).Show();
                    ((Button)panel4.Controls["button" + (i + 1)]).BackgroundImage = PicLoader.Read(String.Format("Pet.{0}.JPG", p[i]));
                }
                else
                {
                    ((Button)panel4.Controls["button" + (i + 1)]).Hide();
                }
            }
            ShowPet(p[0]);
        }
示例#11
0
        private void LoadInfo(String seller)
        {
            OleDbConnection conn = new OleDbConnection();

            conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|data.mdb";
            conn.Open();
            string          strcmd = String.Format("SELECT * FROM [Item] where [Seller] = '{0}' order by [Order]", seller);
            OleDbCommand    cmd    = new OleDbCommand(strcmd, conn);
            OleDbDataReader dr     = cmd.ExecuteReader();
            int             id     = 1;

            while (dr.Read())
            {
                for (int i = id; i <= 12; i++)
                {
                    ((ItemBox)(Controls["itembox" + i])).CClear();
                }
                if (((ItemBox)(Controls["itembox" + id])).DName != dr[1].ToString())
                {
                    ((ItemBox)(Controls["itembox" + id])).Head   = PicLoader.Read(String.Format("Items.C{0}.JPG", dr[0].ToString()));
                    ((ItemBox)(Controls["itembox" + id])).DName  = dr[1].ToString();
                    ((ItemBox)(Controls["itembox" + id])).Effect = dr[2].ToString();
                    ((ItemBox)(Controls["itembox" + id])).Des    = String.Format("{0,4:G}", dr[7].ToString());
                    if (dr[4].ToString() != "")
                    {
                        ((ItemBox)(Controls["itembox" + id])).D1      = PicLoader.Read(String.Format("Items.C{0}.JPG", dr[4].ToString()));
                        ((ItemBox)(Controls["itembox" + id])).Type[0] = int.Parse(dr[4].ToString());
                    }
                    if (dr[5].ToString() != "")
                    {
                        ((ItemBox)(Controls["itembox" + id])).D2      = PicLoader.Read(String.Format("Items.C{0}.JPG", dr[5].ToString()));
                        ((ItemBox)(Controls["itembox" + id])).Type[1] = int.Parse(dr[5].ToString());
                    }
                    if (dr[6].ToString() != "")
                    {
                        ((ItemBox)(Controls["itembox" + id])).D3      = PicLoader.Read(String.Format("Items.C{0}.JPG", dr[6].ToString()));
                        ((ItemBox)(Controls["itembox" + id])).Type[2] = int.Parse(dr[6].ToString());
                    }
                }
                id++;
            }
            conn.Close();
        }
示例#12
0
 private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (comboBox2.SelectedValue != null)
     {
         int id = int.Parse(comboBox2.SelectedValue.ToString());
         pictureBox2.Image  = PicLoader.Read(String.Format("Skill.s{0}.JPG", id * 4 - 3));
         pictureBox3.Image  = PicLoader.Read(String.Format("Skill.s{0}.JPG", id * 4 - 2));
         pictureBox4.Image  = PicLoader.Read(String.Format("Skill.s{0}.JPG", id * 4 - 1));
         pictureBox5.Image  = PicLoader.Read(String.Format("Skill.s{0}.JPG", id * 4));
         pictureBox12.Image = PicLoader.Read(String.Format("Skill.s{0}.JPG", id * 4 - 3));
         pictureBox11.Image = PicLoader.Read(String.Format("Skill.s{0}.JPG", id * 4 - 2));
         pictureBox10.Image = PicLoader.Read(String.Format("Skill.s{0}.JPG", id * 4 - 1));
         pictureBox9.Image  = PicLoader.Read(String.Format("Skill.s{0}.JPG", id * 4));
         pictureBox6.Image  = PicLoader.Read(String.Format("Heros.{0}.JPG", id));
         pictureBox8.Image  = PicLoader.Read(String.Format("Heros.{0}.JPG", id));
         LoadInfo();
         pictureBox7.Invalidate();
     }
 }
示例#13
0
 private void listViewItems_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (listViewItems.SelectedItems.Count != 0)
     {
         OleDbConnection conn = new OleDbConnection();
         conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|data.mdb";
         conn.Open();
         string          strcmd = String.Format("SELECT [id],[Effect] FROM [Item] where [Name] = '{0}'", listViewItems.SelectedItems[0].SubItems[2].Text);
         OleDbCommand    cmd    = new OleDbCommand(strcmd, conn);
         OleDbDataReader dr     = cmd.ExecuteReader();
         if (dr.Read())
         {
             pictureBoxItem.Image = PicLoader.Read(String.Format("Items.C{0}.JPG", dr[0].ToString()));
             labelItemName.Text   = listViewItems.SelectedItems[0].SubItems[2].Text;
             textBoxDes.Text      = dr[1].ToString();
         }
         conn.Close();
     }
 }
示例#14
0
 private void comboBoxPlayer_SelectedIndexChanged(object sender, EventArgs e)
 {
     listViewItems.Items.Clear();
     imageListItems.Images.Clear();
     foreach (Player p in replay.Players)
     {
         if (!p.IsComputer && p.Name == comboBoxPlayer.SelectedItem.ToString())
         {
             foreach (OrderItem oi in p.Items.BuildOrders)
             {
                 int  range = ChineseItemString.GetStringFromItemId(oi.Name).IndexOf('-');
                 int  id    = int.Parse(ChineseItemString.GetStringFromItemId(oi.Name).Substring(0, range));
                 bool flag  = false;
                 if (comboBoxItemType.SelectedIndex == 0)
                 {
                     flag = true;
                 }
                 else if (comboBoxItemType.SelectedIndex == 1 && id >= 107 && id <= 114)
                 {
                     flag = true;
                 }
                 else if (comboBoxItemType.SelectedIndex == 2 && id <= 43)
                 {
                     flag = true;
                 }
                 else if (comboBoxItemType.SelectedIndex == 3 && ((id >= 44 && id <= 106) || (id >= 115 && id <= 118)))
                 {
                     flag = true;
                 }
                 if (flag)
                 {
                     imageListItems.Images.Add(PicLoader.Read(String.Format("Items.C{0}.JPG", id)));
                     ListViewItem item = new ListViewItem("", imageListItems.Images.Count - 1);
                     item.SubItems.Add(TimeSpan.FromSeconds(oi.Time / 1000).ToString());
                     item.SubItems.Add(ChineseItemString.GetStringFromItemId(oi.Name).Substring(range + 1));
                     listViewItems.Items.Add(item);
                 }
             }
         }
     }
 }
示例#15
0
 private void HeroView_Load(object sender, EventArgs e)
 {
     BackgroundImage = PicLoader.Read("Bg.t1.JPG");
     for (int i = 0; i < 3; i++)
     {
         ((Button)panel4.Controls["buttons" + (i + 1)]).BackgroundImage = PicLoader.Read("Altar.1.JPG");
     }
     buttons8.BackgroundImage = PicLoader.Read("Altar.1.JPG");
     for (int i = 3; i < 6; i++)
     {
         ((Button)panel4.Controls["buttons" + (i + 1)]).BackgroundImage = PicLoader.Read("Altar.2.JPG");
     }
     buttons9.BackgroundImage = PicLoader.Read("Altar.2.JPG");
     ((Button)panel4.Controls["buttons7"]).BackgroundImage = PicLoader.Read("Altar.3.JPG");
     for (int i = 0; i < 11; i++)
     {
         ((Button)panel4.Controls["button" + (i + 1)]).BackgroundImage = PicLoader.Read(String.Format("Heros.{0}.JPG", hid[i]));
     }
     id = 21;
     LoadInfo();
 }
示例#16
0
        private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (listBox1.SelectedItem == null)
            {
                return;
            }
            string s = listBox1.SelectedItem.ToString();

            switch (s)
            {
            case "英雄特长": pictureBox1.Image = PicLoader.Read("Basic.talent.JPG"); break;

            case "英雄特长续": pictureBox1.Image = PicLoader.Read("Basic.talent2.JPG"); break;

            case "木桶掉符概率": pictureBox1.Image = PicLoader.Read("Basic.stone.JPG"); break;

            case "大精灵能力": pictureBox1.Image = PicLoader.Read("Basic.spirit.JPG"); break;

            default: break;
            }
        }
示例#17
0
        private void LoadInfo(string type)
        {
            OleDbConnection conn = new OleDbConnection();

            conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|data.mdb";
            conn.Open();
            string          strcmd = String.Format("SELECT * FROM [HItem] where [Type] = '{0}' order by [ID]", type);
            OleDbCommand    cmd    = new OleDbCommand(strcmd, conn);
            OleDbDataReader dr     = cmd.ExecuteReader();
            int             id     = 1;

            while (dr.Read())
            {
                ((HItemBox)(Controls["hItemBox" + id])).Head   = PicLoader.Read(String.Format("HItems.I{0}.JPG", dr[0].ToString()));
                ((HItemBox)(Controls["hItemBox" + id])).DName  = dr[1].ToString();
                ((HItemBox)(Controls["hItemBox" + id])).Effect = dr[2].ToString();
                ((HItemBox)(Controls["hItemBox" + id])).Des    = String.Format("ħÁ¦({0})", dr[4].ToString());
                ((HItemBox)(Controls["hItemBox" + id])).Race   = dr[3].ToString();
                id++;
            }
            conn.Close();
        }
示例#18
0
        private void ShowPet(int id)
        {
            OleDbConnection conn = new OleDbConnection();

            conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|data.mdb";
            conn.Open();
            string          strcmd = String.Format("SELECT * FROM Pet where [ID] = {0}", id);
            OleDbCommand    cmd    = new OleDbCommand(strcmd, conn);
            OleDbDataReader dr     = cmd.ExecuteReader();

            if (dr.Read())
            {
                labelname.Text  = dr[1].ToString();
                labelatk.Text   = dr[7].ToString();
                labelmhp.Text   = dr[8].ToString();
                labelRag.Text   = dr[9].ToString();
                labeldef.Text   = dr[10].ToString();
                labelSpd.Text   = dr[11].ToString();
                labelAts.Text   = dr[12].ToString();
                labeldps.Text   = String.Format("{0:0.0}", double.Parse(dr[14].ToString()));
                labelReg.Text   = dr[6].ToString();
                textBoxHis.Text = dr[15].ToString();
                int aid = 0;
                switch (dr[4].ToString())
                {
                case "ÎÞ": aid = 1; break;

                case "Ë®": aid = 2; break;

                case "·ç": aid = 3; break;

                case "»ð": aid = 4; break;

                case "µØ": aid = 5; break;

                case "±ù": aid = 6; break;

                case "À×": aid = 7; break;

                case "¹â": aid = 8; break;

                case "°µ": aid = 9; break;

                case "»Ã": aid = 10; break;

                default: aid = 0; break;
                }
                pictureBox1.Image = PicLoader.Read(String.Format("AttrRace.A{0}.JPG", aid));
                ToolTip tooltip1 = new ToolTip();
                tooltip1.SetToolTip(pictureBox1, dr[4].ToString() + "ÊôÐÔ");
                switch (dr[5].ToString())
                {
                case "Ò°ÊÞ": aid = 1; break;

                case "ÍöÁé": aid = 2; break;

                case "Áú": aid = 3; break;

                case "ħÎï": aid = 4; break;

                case "·ÉÐÐ": aid = 5; break;

                case "»úе": aid = 6; break;

                case "À¥³æ": aid = 7; break;

                case "Ö²Îï": aid = 8; break;

                case "¶ñħ": aid = 9; break;

                default: aid = 0; break;
                }
                pictureBox2.Image = PicLoader.Read(String.Format("AttrRace.R{0}.JPG", aid));
                ToolTip tooltip2 = new ToolTip();
                tooltip2.SetToolTip(pictureBox2, dr[5].ToString());
                pictureBoxhero.Image = PicLoader.Read(String.Format("Pet.{0}.JPG", id));
                labelre1.Text        = "";
                if (dr[2].ToString() != "")
                {
                    labelre1.Text = String.Format("»ù±¾{0} ", dr[2].ToString());
                }
                if (dr[3].ToString() != "")
                {
                    labelre1.Text = String.Format("{0}{1}", labelre1.Text, dr[3].ToString());
                }
                int    lv = int.Parse(dr[6].ToString());
                String s  = "";
                for (int i = 0; i < lv; i++)
                {
                    s = s + "¡ï";
                }
                labellv.Text = s;
            }

            strcmd = String.Format("SELECT * FROM MSkill where [Group] = '{0}'", labelname.Text);
            cmd    = new OleDbCommand(strcmd, conn);
            dr     = cmd.ExecuteReader();
            for (int i = 0; i < 2; i++)
            {
                if (dr.Read())
                {
                    Panel p = ((Panel)(Controls["panel" + (i + 2)]));
                    ((PictureBox)(p.Controls["pictureBoxs" + (i + 1)])).Image = PicLoader.Read(String.Format("MSkill.{0}.JPG", dr[0].ToString()));
                    int         ip;
                    int         ip2;
                    RichTextBox r = ((RichTextBox)(p.Controls["richTextBoxs" + (i + 1)]));
                    r.Clear();
                    ip = r.Text.Length;
                    r.AppendText(String.Format("{0}\n", dr[1].ToString()));
                    ip2 = r.Text.Length;
                    r.Select(ip, ip2 - ip - 1);
                    r.SelectionColor = Color.Red;

                    r.AppendText(String.Format("{0}\n", dr[3].ToString()));

                    if (dr[2].ToString() != "")
                    {
                        ip = r.Text.Length;
                        r.AppendText(String.Format("Àäȴʱ¼ä{0}Ãë", dr[2].ToString()));
                        ip2 = r.Text.Length;
                        r.Select(ip, ip2 - ip);
                        r.SelectionColor = Color.LightBlue;
                    }
                }
            }
            conn.Close();
        }
示例#19
0
 private void MapView_Load(object sender, EventArgs e)
 {
     pictureBox1.Image = PicLoader.Read("Basic.map.JPG");
 }
示例#20
0
 private void Thanks_Load(object sender, EventArgs e)
 {
     pictureBox1.Image = PicLoader.Read("Basic.logo.JPG");
     pictureBox2.Image = PicLoader.Read("Basic.high.JPG");
 }
示例#21
0
        private void LoadInfo()
        {
            lv           = 1;
            labellv.Text = "Lv01";
            OleDbConnection conn = new OleDbConnection();

            conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|data.mdb";
            conn.Open();
            string          strcmd = String.Format("SELECT * FROM Hero where [ID] = {0}", id);
            OleDbCommand    cmd    = new OleDbCommand(strcmd, conn);
            OleDbDataReader dr     = cmd.ExecuteReader();

            if (dr.Read())
            {
                labelid.Text            = dr[0].ToString();
                labelname.Text          = dr[1].ToString();
                labelstr.Text           = dr[2].ToString();
                labelagi.Text           = dr[3].ToString();
                labelint.Text           = dr[4].ToString();
                bstr                    = int.Parse(labelstr.Text);
                bagi                    = int.Parse(labelagi.Text);
                bint                    = int.Parse(labelint.Text);
                bdef                    = int.Parse(dr[17].ToString());
                labelstrp.Text          = dr[5].ToString();
                labelagip.Text          = dr[6].ToString();
                labelintp.Text          = dr[7].ToString();
                labelmhp.Text           = dr[8].ToString();
                labelmmp.Text           = dr[9].ToString();
                labelatk.Text           = dr[10].ToString();
                batk                    = labelatk.Text;
                labeljob.Text           = dr[11].ToString();
                pictureBoxsskill1.Image = PicLoader.Read(String.Format("SSkill.Attribute{0}.JPG", int.Parse(dr[12].ToString()) + 1));
                pictureBoxsskill2.Image = PicLoader.Read(String.Format("SSkill.Attribute{0}.JPG", int.Parse(dr[13].ToString()) + 1));
                pictureBoxsskill3.Image = PicLoader.Read(String.Format("SSkill.Attribute{0}.JPG", int.Parse(dr[14].ToString()) + 1));
                string[] skillname = new string[] { "攻击学", "防御学", "后勤学", "启蒙学", "外交学", "冥想学" };
                ToolTip  tooltip1  = new ToolTip();
                tooltip1.SetToolTip(pictureBoxsskill1, skillname[int.Parse(dr[12].ToString())]);
                ToolTip tooltip2 = new ToolTip();
                tooltip2.SetToolTip(pictureBoxsskill2, skillname[int.Parse(dr[13].ToString())]);
                ToolTip tooltip3 = new ToolTip();
                tooltip3.SetToolTip(pictureBoxsskill3, skillname[int.Parse(dr[14].ToString())]);
                labelSpd.Text = dr[15].ToString();
                labelRag.Text = dr[16].ToString();
                labeldef.Text = string.Format("{0:0.0}", double.Parse(dr[17].ToString()) + double.Parse(labelagi.Text) * 0.14 - 2);
            }
            dr.Close();

            strcmd = String.Format("SELECT TOP 4 * FROM Skill where [ID] >= {0} order by [ID]", (id - 1) * 4 + 1);
            cmd    = new OleDbCommand(strcmd, conn);
            dr     = cmd.ExecuteReader();
            int ex = 1;

            while (dr.Read())
            {
                (Controls["skillBox" + ex] as SkillBox).Hname = dr[1].ToString();
                (Controls["skillBox" + ex] as SkillBox).Hkey  = dr[2].ToString();
                (Controls["skillBox" + ex] as SkillBox).Des   = dr[5].ToString();
                (Controls["skillBox" + ex] as SkillBox).Id    = (id - 1) * 4 + ex;
                ex++;
            }
            conn.Close();
            ////           pictureBoxskill1.BackgroundImage = PicLoader.Read(String.Format("Skill.s{0}.JPG", int.Parse(labelid.Text) * 4 - 3));
            //          pictureBoxskill2.BackgroundImage = PicLoader.Read(String.Format("Skill.s{0}.JPG", int.Parse(labelid.Text) * 4 - 2));
            //           pictureBoxskill3.BackgroundImage = PicLoader.Read(String.Format("Skill.s{0}.JPG", int.Parse(labelid.Text) * 4 - 1));
            //        pictureBoxskill4.BackgroundImage = PicLoader.Read(String.Format("Skill.s{0}.JPG", int.Parse(labelid.Text) * 4));
            pictureBoxhero.Image = PicLoader.Read(String.Format("Heros.{0}.JPG", int.Parse(labelid.Text)));
            ShowSkill(1);
            updateLog();
        }
示例#22
0
 private void SystemView_Load(object sender, EventArgs e)
 {
     pictureBox1.Image = PicLoader.Read("Basic.talent.JPG");
 }
示例#23
0
 private void ItemView_Load(object sender, EventArgs e)
 {
     BackgroundImage = PicLoader.Read("Bg.t1.JPG");
     LoadInfo("¾ö¶Ï");
 }