Exemple #1
0
        private void buttonAddAnim_Click(object sender, EventArgs e)
        {
            if (textBoxAnimName.Text != string.Empty)
            {
                //check name doesn't exist
                if (m_listboxData.Exists(new Predicate<Animation>(x => x.Name == textBoxAnimName.Text))) return;

                Animation anim = new Animation(textBoxAnimName.Text.ToLower(), (uint)numericUpDownAnimStart.Value, (uint)numericUpDownAnimEnd.Value, checkBoxLoop.Checked);
                m_listboxData.Add(anim);
                listBoxAnimations.DataSource = null;
                listBoxAnimations.DataSource = m_listboxData;
                listBoxAnimations.DisplayMember = "Name";

                m_modified = true;
            }
        }
Exemple #2
0
 public void Play(Animation anim)
 {
     Loop = anim.Loop;
     Play(anim.Start, anim.End);
 }