Exemple #1
0
 public Tact(int id, string name = "", TACT_BASIC basic = TACT_BASIC.TACT_IGNORE, string skill = "SKILL_ALWAYS", TACT_KITE kite = TACT_KITE.KITE_NEVER, TACT_CAST cast = TACT_CAST.CAST_REACT, TACT_PUSHBACK push = TACT_PUSHBACK.PUSH_NEVER, TACT_DEBUFF debuff = TACT_DEBUFF.DEBUFF_NEVER, TACT_SKILLCLASS sclass = TACT_SKILLCLASS.CLASS_BOTH, TACT_RESCUE rescue = TACT_RESCUE.RESCUE_NEVER, int sp = -1, TACT_SNIPE snipe = TACT_SNIPE.SNIPE_OK, TACT_KS ffa = TACT_KS.KS_NEVER, decimal weight = 1, TACT_CHASE chase = TACT_CHASE.CHASE_NORMAL)
 {
     // Set the tactic variables
     _id     = id;
     _basic  = basic;
     _skill  = skill;
     _kite   = kite;
     _cast   = cast;
     _push   = push;
     _debuff = debuff;
     _sclass = sclass;
     _rescue = rescue;
     _sp     = sp;
     _snipe  = snipe;
     _ffa    = ffa;
     _weight = weight;
     _chase  = chase;
     _name   = name;
 }
Exemple #2
0
        private void listBoxTactics_SelectedIndexChanged(object sender, EventArgs e)
        {
            // Remove event handlers
            buttonAdd.Click                       -= new EventHandler(buttonAdd_Click);
            buttonRemove.Click                    -= new EventHandler(buttonRemove_Click);
            textBoxName.TextChanged               -= new EventHandler(textBoxName_TextChanged);
            textBoxID.TextChanged                 -= new EventHandler(textBoxID_TextChanged);
            comboBoxBasic.SelectedIndexChanged    -= new EventHandler(comboBoxBasic_SelectedIndexChanged);
            comboBoxReact.SelectedIndexChanged    -= new EventHandler(comboBoxReact_SelectedIndexChanged);
            checkBoxFfa.CheckedChanged            -= new EventHandler(checkBoxFfa_CheckedChanged);
            comboBoxDebuff.SelectedIndexChanged   -= new EventHandler(comboBoxDebuff_SelectedIndexChanged);
            comboBoxSkill.SelectedIndexChanged    -= new EventHandler(comboBoxSkill_SelectedIndexChanged);
            numericUpDownSkill.ValueChanged       -= new EventHandler(numericUpDownSkill_ValueChanged);
            comboBoxPushback.SelectedIndexChanged -= new EventHandler(comboBoxPushback_SelectedIndexChanged);
            comboBoxKite.SelectedIndexChanged     -= new EventHandler(comboBoxKite_SelectedIndexChanged);
            comboBoxSize.SelectedIndexChanged     -= new EventHandler(comboBoxSize_SelectedIndexChanged);
            comboBoxRescue.SelectedIndexChanged   -= new EventHandler(comboBoxRescue_SelectedIndexChanged);
            numericUpDownSP.ValueChanged          -= new EventHandler(numericUpDownSP_ValueChanged);
            numericUpDownWeight.ValueChanged      -= new EventHandler(numericUpDownWeight_ValueChanged);
            comboBoxChase.SelectedIndexChanged    -= new EventHandler(comboBoxChase_SelectedIndexChanged);
            comboBoxKS.SelectedIndexChanged       -= new EventHandler(comboBoxKS_SelectedIndexChanged);
            comboBoxDebuff2.SelectedIndexChanged  -= new EventHandler(comboBoxDebuff2_SelectedIndexChanged);

            // Check if the listBoxTactics selected item is not null
            if (listBoxTactics.SelectedItem != null)
            {
                // Get the listBoxTactics selected tactic
                Tact t = (Tact)listBoxTactics.SelectedItem;

                // Update the graphical user interface with the values of the current tactic
                TACT_ID         = t.ID;
                TACT_NAME       = t.Name;
                TACT_BASIC      = t.TACT_BASIC;
                TACT_CAST       = t.TACT_CAST;
                TACT_KS         = t.TACT_KS;
                TACT_DEBUFF     = t.TACT_DEBUFF;
                TACT_SKILL      = t.TACT_SKILL;
                TACT_PUSHBACK   = t.TACT_PUSHBACK;
                TACT_KITE       = t.TACT_KITE;
                TACT_SKILLCLASS = t.TACT_SKILLCLASS;
                TACT_RESCUE     = t.TACT_RESCUE;
                TACT_SNIPE      = t.TACT_SNIPE;
                TACT_WEIGHT     = t.TACT_WEIGHT;
                TACT_CHASE      = t.TACT_CHASE;
                TACT_SP         = t.TACT_SP;

                // Check if the TACT_ID is 0
                if (TACT_ID == 0)
                {
                    // Disable buttonRemove, textBoxName, and textBoxID
                    buttonRemove.Enabled = false;
                    textBoxName.Enabled  = false;
                    textBoxID.Enabled    = false;
                }
                // If the TACT_ID is not 0
                else
                {
                    // Enable buttonRemove, textBoxName, and textBoxID
                    buttonRemove.Enabled = true;
                    textBoxName.Enabled  = true;
                    textBoxID.Enabled    = true;
                }
            }

            // Add event handlers
            buttonAdd.Click                       += new EventHandler(buttonAdd_Click);
            buttonRemove.Click                    += new EventHandler(buttonRemove_Click);
            textBoxName.TextChanged               += new EventHandler(textBoxName_TextChanged);
            textBoxID.TextChanged                 += new EventHandler(textBoxID_TextChanged);
            comboBoxBasic.SelectedIndexChanged    += new EventHandler(comboBoxBasic_SelectedIndexChanged);
            comboBoxReact.SelectedIndexChanged    += new EventHandler(comboBoxReact_SelectedIndexChanged);
            checkBoxFfa.CheckedChanged            += new EventHandler(checkBoxFfa_CheckedChanged);
            comboBoxDebuff.SelectedIndexChanged   += new EventHandler(comboBoxDebuff_SelectedIndexChanged);
            comboBoxSkill.SelectedIndexChanged    += new EventHandler(comboBoxSkill_SelectedIndexChanged);
            numericUpDownSkill.ValueChanged       += new EventHandler(numericUpDownSkill_ValueChanged);
            comboBoxPushback.SelectedIndexChanged += new EventHandler(comboBoxPushback_SelectedIndexChanged);
            comboBoxKite.SelectedIndexChanged     += new EventHandler(comboBoxKite_SelectedIndexChanged);
            comboBoxSize.SelectedIndexChanged     += new EventHandler(comboBoxSize_SelectedIndexChanged);
            comboBoxRescue.SelectedIndexChanged   += new EventHandler(comboBoxRescue_SelectedIndexChanged);
            numericUpDownSP.ValueChanged          += new EventHandler(numericUpDownSP_ValueChanged);
            numericUpDownWeight.ValueChanged      += new EventHandler(numericUpDownWeight_ValueChanged);
            comboBoxChase.SelectedIndexChanged    += new EventHandler(comboBoxChase_SelectedIndexChanged);
            comboBoxKS.SelectedIndexChanged       += new EventHandler(comboBoxKS_SelectedIndexChanged);
            comboBoxDebuff2.SelectedIndexChanged  += new EventHandler(comboBoxDebuff2_SelectedIndexChanged);
        }