Esempio n. 1
0
        private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            ListBox selected = sender as ListBox;

            if (selected.Text.Length == 0)
            {
                return;
            }

            //pictureBox1.Load(Application.StartupPath + "\\..\\..\\img\\default.png");
            //pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
            panel3.Visible = true;

            SkillInfo curInfo;

            if (SkillXmlManager.GetSelectedSkillInfo(selected.Text, out curInfo))
            {
                textBox1.Text        = curInfo.Name;
                textBox2.Text        = curInfo.Explanation;
                numericUpDown1.Value = curInfo.MasterLevel;

                _curSkillName = curInfo.Name;
                _curSkillType = curInfo.Type;

                CheckRadioButton();
            }
            else
            {
                ClearSkillInfo();
            }
        }
Esempio n. 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text.Length == 0 || textBox2.Text.Length == 0)
            {
                MessageBox.Show("스킬 이름과 설명을 적어주세요");
                return;
            }

            SkillInfo newSkillInfo = new SkillInfo(
                textBox1.Text,
                textBox2.Text,
                _curSkillType,
                (int)numericUpDown1.Value
                );

            if (_curSkillName == null)
            {
                SkillXmlManager.AddSkill(newSkillInfo);
                MessageBox.Show("스킬이 새로 등록되었습니다.");
            }
            else
            {
                if (SkillXmlManager.ModifySkill(_curSkillName, newSkillInfo))
                {
                    MessageBox.Show("스킬이 수정되었습니다.");
                }
                else
                {
                    MessageBox.Show("수정 실패");
                }
            }

            UpdateSkillList();
        }
Esempio n. 3
0
        private void StageComboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            panel2.Visible = true;

            SkillXmlManager._CurJobName = StageComboBox1.SelectedItem.ToString();
            SkillXmlManager._FileName   =
                GetFileName(TypeComboBox1.SelectedItem.ToString(), JobComboBox1.SelectedIndex, StageComboBox1.SelectedIndex);
            SkillXmlManager.LoadFile();

            UpdateSkillList();
        }
Esempio n. 4
0
        private void UpdateSkillList()
        {
            List <string> items = SkillXmlManager.GetSkillList();

            listBox1.Items.Clear();

            foreach (var i in items)
            {
                listBox1.Items.Add(i);
            }

            listBox1.Items.Add("(추가하기)");

            panel3.Visible = false;
        }