BF2Statistics.MedalData.MedalOrRankCondition.SetParams C# (CSharp) Method

SetParams() public method

Sets the params for this condition
public SetParams ( List Params ) : void
Params List
return void
        public override void SetParams(List<string> Params)
        {
            this.Params = Params;
        }

Usage Example

        private void FinishBtn_Click(object sender, EventArgs e)
        {
            // Tell the base condition form that we modifed the condition
            base.Canceled = false;

            // First param is always the python method name
            List <string> Params = new List <string>();
            KeyValuePair  I      = (KeyValuePair)AwardSelect.SelectedItem;

            Params.Add((TypeSelect.SelectedIndex < 3) ? "has_medal" : "has_rank");
            Params.Add(I.Key);

            // Are we creating a new Object?
            if (Obj == null)
            {
                Obj = new MedalOrRankCondition(Params);
            }
            else
            {
                Obj.SetParams(Params);
            }

            // Close the form
            this.Node.Tag = Obj;
            MedalDataEditor.ChangesMade = true;
            this.DialogResult           = DialogResult.OK;
        }