private void AddCharacter()
        {
            clsCharacter character = new clsCharacter();

            CastList.Add(character);
            EditCharacter(character);
        }
        private void EditCharacter(clsCharacter character)
        {
            frmCharacter dialog = new frmCharacter();

            dialog.Character = character;
            dialog.ShowDialog();
            UpdateCast();
        }
 private void reRollToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (clstCast.SelectedIndex > -1)
     {
         clsCharacter character = (clsCharacter)clstCast.SelectedItem;
         character.Roll();
         UpdateInitiative();
     }
 }
 private void setToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (clstCast.SelectedIndex > -1)
     {
         clsCharacter     character = (clsCharacter)clstCast.SelectedItem;
         frmSetInitiative dialog    = new frmSetInitiative();
         dialog.Character = character;
         dialog.ShowDialog();
         UpdateInitiative();
     }
 }
 private void setToolStripMenuItem_Click_1(object sender, EventArgs e)
 {
     if (clstInitiative.SelectedIndex > -1)
     {
         clsCharacter     character = ((clsTurn)clstInitiative.SelectedItem).Character;
         frmSetInitiative dialog    = new frmSetInitiative();
         dialog.Character           = character;
         dialog.nudInitiative.Value = character.CurrentInitiative;
         dialog.ShowDialog();
         UpdateInitiative();
     }
 }
        private void frmMain_clstCast_ItemCheck(object sender, ItemCheckEventArgs e)
        {
            clsCharacter character = clstCast.Items[e.Index] as clsCharacter;

            if (e.NewValue == System.Windows.Forms.CheckState.Checked)
            {
                character.Enabled = true;
            }
            else
            {
                character.Enabled = false;
            }

            UpdateInitiative();
        }
Example #7
0
 public clsTurn(clsCharacter Character, int Value, int Pass)
 {
     _character = Character;
     _value     = Value;
     _pass      = Pass;
 }
 private void RemoveCharacter(clsCharacter character)
 {
     CastList.Remove(character);
     UpdateCast();
 }