Ejemplo n.º 1
0
        private void moreInformationToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OccupationalSkill os   = OSkills.FirstOrDefault(o => o.Name == dataGridView1.Rows[selectedrow].Cells[0].Value.ToString());
            string            text = string.Format("Cost: {0}{1}{2}{3}", os.Cost, Environment.NewLine, Environment.NewLine, Regex.Replace(os.Description, @"\t|\n|\r", ""));

            MessageBox.Show(text, os.Name, MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
Ejemplo n.º 2
0
        private void buttonAddOS_Click(object sender, EventArgs e)
        {
            OccupationalSkill os = OSkills.FirstOrDefault(o => o.ID == (int)multiColumnComboBoxOS.SelectedValue);

            Char.OccupationalSkills.Add(os);
            dataGridView1.Rows.Insert(dataGridView1.Rows.Count, os.Name, string.Empty);
            multiColumnComboBoxOS.SelectedIndex = -1;
        }