Exemplo n.º 1
0
        private void AddBtn_Click(object sender, EventArgs e)
        {
            OngoingCondition ongoingCondition = new OngoingCondition();
            EffectForm       effectForm       = new EffectForm(ongoingCondition, this.fEncounter, this.fCurrentActor, this.fCurrentRound);

            if (effectForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                this.fData.Conditions.Add(effectForm.Effect);
                this.update_effects();
            }
        }
Exemplo n.º 2
0
        private void AddBtn_Click(object sender, EventArgs e)
        {
            OngoingCondition oc = new OngoingCondition();

            EffectForm dlg = new EffectForm(oc, fEncounter, fCurrentActor, fCurrentRound);

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                fData.Conditions.Add(dlg.Effect);
                update_effects();
            }
        }
Exemplo n.º 3
0
        private void EffectAddBtn_Click(object sender, EventArgs e)
        {
            OngoingCondition oc = new OngoingCondition();

            EffectForm dlg = new EffectForm(oc, fHero);

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                fHero.Effects.Add(dlg.Effect);
                update_effects();
            }
        }
Exemplo n.º 4
0
 private void EditBtn_Click(object sender, EventArgs e)
 {
     if (this.SelectedCondition != null)
     {
         int        effect     = this.fData.Conditions.IndexOf(this.SelectedCondition);
         EffectForm effectForm = new EffectForm(this.SelectedCondition, this.fEncounter, this.fCurrentActor, this.fCurrentRound);
         if (effectForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             this.fData.Conditions[effect] = effectForm.Effect;
             this.update_effects();
         }
     }
 }
Exemplo n.º 5
0
        private void EditBtn_Click(object sender, EventArgs e)
        {
            if (SelectedCondition != null)
            {
                int index = fData.Conditions.IndexOf(SelectedCondition);

                EffectForm dlg = new EffectForm(SelectedCondition, fEncounter, fCurrentActor, fCurrentRound);
                if (dlg.ShowDialog() == DialogResult.OK)
                {
                    fData.Conditions[index] = dlg.Effect;
                    update_effects();
                }
            }
        }
Exemplo n.º 6
0
 private void EditBtn_Click(object sender, EventArgs e)
 {
     if (this.SelectedEffect != null)
     {
         CombatData       first  = this.SelectedEffect.First;
         OngoingCondition second = this.SelectedEffect.Second;
         int        num          = first.Conditions.IndexOf(second);
         EffectForm effectForm   = new EffectForm(second, this.fEncounter, this.fCurrentActor, this.fCurrentRound);
         if (effectForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             first.Conditions[num] = effectForm.Effect;
             this.update_list();
         }
     }
 }
Exemplo n.º 7
0
        private void EditBtn_Click(object sender, EventArgs e)
        {
            if (SelectedEffect != null)
            {
                CombatData       cd = SelectedEffect.First;
                OngoingCondition oc = SelectedEffect.Second;

                int index = cd.Conditions.IndexOf(oc);

                EffectForm dlg = new EffectForm(oc, fEncounter, fCurrentActor, fCurrentRound);
                if (dlg.ShowDialog() == DialogResult.OK)
                {
                    cd.Conditions[index] = dlg.Effect;
                    update_list();
                }
            }
        }
Exemplo n.º 8
0
        private void EffectEditBtn_Click(object sender, EventArgs e)
        {
            if (SelectedEffect != null)
            {
                int index = fHero.Effects.IndexOf(SelectedEffect);

                EffectForm dlg = new EffectForm(SelectedEffect, fHero);
                if (dlg.ShowDialog() == DialogResult.OK)
                {
                    fHero.Effects[index] = dlg.Effect;
                    update_effects();
                }
            }

            if (SelectedToken != null)
            {
                int index = fHero.Tokens.IndexOf(SelectedToken);

                switch (SelectedToken.Type)
                {
                case CustomTokenType.Token:
                {
                    CustomTokenForm dlg = new CustomTokenForm(SelectedToken);
                    if (dlg.ShowDialog() == DialogResult.OK)
                    {
                        fHero.Tokens[index] = dlg.Token;
                        update_effects();
                    }
                }
                break;

                case CustomTokenType.Overlay:
                {
                    CustomOverlayForm dlg = new CustomOverlayForm(SelectedToken);
                    if (dlg.ShowDialog() == DialogResult.OK)
                    {
                        fHero.Tokens[index] = dlg.Token;
                        update_effects();
                    }
                }
                break;
                }
            }
        }