public Pat.AnimationDamageInfo GetData()
        {
            if (AttackType == Pat.AttackType.None)
            {
                return(null);
            }
            var ret = new Pat.AnimationDamageInfo()
            {
                AttackType = AttackType,
                BaseDamage = textBox1.GetIntegerValue(0),
                HitStop    = new Pat.HitStop
                {
                    Self     = textBox3.GetIntegerValue(0),
                    Opponent = textBox4.GetIntegerValue(0),
                },
                Knockback = new Pat.HitKnockback
                {
                    SpeedX  = textBox5.GetIntegerValue(0),
                    SpeedY  = textBox6.GetIntegerValue(0),
                    Gravity = textBox7.GetIntegerValue(0),
                },
                SoundEffect = textBox2.GetIntegerValue(0),
            };

            return(ret);
        }
        public DamageEditForm(Pat.AnimationDamageInfo data)
        {
            InitializeComponent();

            if (data == null)
            {
                AttackType = Pat.AttackType.None;
            }
            else
            {
                AttackType    = data.AttackType;
                textBox1.Text = data.BaseDamage.ToString();
                textBox2.Text = data.SoundEffect.ToString();
                textBox3.Text = data.HitStop.Self.ToString();
                textBox4.Text = data.HitStop.Opponent.ToString();
                textBox5.Text = data.Knockback.SpeedX.ToString();
                textBox6.Text = data.Knockback.SpeedY.ToString();
                textBox7.Text = data.Knockback.Gravity.ToString();
            }
        }