示例#1
0
        private void AddCharacter()
        {
            clsCharacter character = new clsCharacter();

            CastList.Add(character);
            EditCharacter(character);
        }
示例#2
0
        private void EditCharacter(clsCharacter character)
        {
            frmCharacter dialog = new frmCharacter();

            dialog.Character = character;
            dialog.ShowDialog();
            UpdateCast();
        }
示例#3
0
 private void reRollToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (clstCast.SelectedIndex > -1)
     {
         clsCharacter character = (clsCharacter)clstCast.SelectedItem;
         character.Roll();
         UpdateInitiative();
     }
 }
示例#4
0
 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();
     }
 }
示例#5
0
 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();
     }
 }
示例#6
0
        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();
        }
示例#7
0
 public clsTurn(clsCharacter Character, int Value, int Pass)
 {
     _character = Character;
     _value     = Value;
     _pass      = Pass;
 }
示例#8
0
 private void RemoveCharacter(clsCharacter character)
 {
     CastList.Remove(character);
     UpdateCast();
 }