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

SetParams() public abstract method

Sets new parameters for the python function
public abstract SetParams ( List Params ) : void
Params List
return void
        public abstract void SetParams(List<string> Params);

Usage Example

        /// <summary>
        /// Converts the data in the form into a condition, and closes the form
        /// </summary>
        public void Save()
        {
            // 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>();

            // 1st param
            Params.Add((StatType.SelectedIndex == 1) ? "player_stat" : "global_stat");

            // 2nd param
            KeyValuePair I = (KeyValuePair)StatName.SelectedItem;

            Params.Add(I.Key);

            // 3rd Param (optional)
            if (ValueBox.Visible)
            {
                Params.Add(((int)ValueBox.Value).ToString());
            }

            // Create the new Stat Object
            if (Obj == null)
            {
                Obj = new PlayerStat(Params);
            }
            else
            {
                Obj.SetParams(Params);
            }

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