Ejemplo n.º 1
0
 public static ExportPower ToExportPower(this MonsterPower monsterPower)
 {
     return(new ExportPower()
     {
         Action = Culture.TextInfo.ToTitleCase(monsterPower.Action ?? String.Empty),
         Attacks = monsterPower.Attacks.Count != 0 ? monsterPower.Attacks.Select(a => a.ToExportAttack()).ToList() : null,
         Flavor = monsterPower.Flavor.FixWhitespace(),
         IsBasic = monsterPower.IsBasic,
         Keywords = monsterPower.Keywords.Count != 0 ? monsterPower.Keywords.Select(k => k.Name).ToList() : null,
         Name = monsterPower.Name.FixWhitespace(),
         Requirements = monsterPower.Requirements.FixWhitespace(),
         Trigger = monsterPower.Trigger.FixWhitespace(),
         Type = Culture.TextInfo.ToTitleCase(monsterPower.Type ?? String.Empty).FixWhitespace(),
         Usage = Culture.TextInfo.ToTitleCase(monsterPower.Usage ?? String.Empty).FixWhitespace(),
         UsageDetails = monsterPower.UsageDetails.FixWhitespace()
     });
 }
Ejemplo n.º 2
0
        public void UpdateGridview()
        {
            if (Profiles == null)
            {
                Profiles = new BindingList <Profile>();
            }

            dataGridView1.DataSource = Profiles;
            dataGridView1.Refresh();
            dataGridView1.ReadOnly = false;
            dataGridView1.Columns["isDone"].Visible            = false;
            dataGridView1.Columns["MonsterPowerLevel"].Visible = false;

            // MonsterPowerLevel
            for (int i = 0; i < Profiles.Count; i++)
            {
                MonsterPower pl = Profiles[i].MonsterPowerLevel;
                dataGridView1.Rows[i].Cells["Monster Power"].Value = pl;
            }
        }