Esempio n. 1
0
 private void cbRemove_CheckedChanged(object sender, System.EventArgs e)
 {
     if (this.Tag != null)
     {
         return;
     }
     for (int i = 0; i < lv.SelectedItems.Count; i++)
     {
         ImportedFrameBlock a = (ImportedFrameBlock)lv.SelectedItems[i].Tag;
         a.RemoveUnneeded = cbRemove.Checked;
     }
 }
Esempio n. 2
0
 private void cbnames_SelectedIndexChanged(object sender, System.EventArgs e)
 {
     if (this.Tag != null)
     {
         return;
     }
     for (int i = 0; i < lv.SelectedItems.Count; i++)
     {
         ImportedFrameBlock a = (ImportedFrameBlock)lv.SelectedItems[i].Tag;
         a.Target = (AnimationFrameBlock)cbnames.SelectedItem;
         lv.SelectedItems[i].SubItems[2].Text = a.Target.ToString();
         lv.SelectedItems[i].ForeColor        = a.MarkColor;
     }
 }
Esempio n. 3
0
        private void cbaction_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            cbnames.Visible = ((AnimImporterAction)cbaction.SelectedItem) == AnimImporterAction.Replace;
            if (this.Tag != null)
            {
                return;
            }

            for (int i = 0; i < lv.SelectedItems.Count; i++)
            {
                ImportedFrameBlock a = (ImportedFrameBlock)lv.SelectedItems[i].Tag;
                a.Action = (AnimImporterAction)cbaction.SelectedItem;
                lv.SelectedItems[i].SubItems[1].Text = a.Action.ToString();
                lv.SelectedItems[i].ForeColor        = a.MarkColor;
            }
        }
Esempio n. 4
0
        /// <summary>
        /// A Bone was selected
        /// </summary>
        void SelectJoint()
        {
            gbgroups.Enabled = true;
            this.Tag         = true;
            try
            {
                ImportedFrameBlock a = (ImportedFrameBlock)lv.SelectedItems[0].Tag;

                this.cbDiscard.Checked = a.DiscardZeroFrame;
                this.cbRemove.Checked  = a.RemoveUnneeded;

                cbaction.SelectedIndex = 0;
                for (int i = 0; i < cbaction.Items.Count; i++)
                {
                    AnimImporterAction ea = (AnimImporterAction)cbaction.Items[i];
                    if (ea == a.Action)
                    {
                        cbaction.SelectedIndex = i;
                        break;
                    }
                }
                lbname.Text = a.ImportedName;


                cbnames.SelectedIndex = -1;
                if (a.Target != null)
                {
                    for (int i = 0; i < cbnames.Items.Count; i++)
                    {
                        AnimationFrameBlock afb = (AnimationFrameBlock)cbnames.Items[i];
                        if (afb == a.Target)
                        {
                            cbnames.SelectedIndex = i;
                            break;
                        }
                    }
                }
            }
            finally
            {
                this.Tag = null;
            }
        }
Esempio n. 5
0
 private void cbDiscard_CheckedChanged(object sender, System.EventArgs e)
 {
     if (this.Tag != null)
     {
         return;
     }
     for (int i = 0; i < lv.SelectedItems.Count; i++)
     {
         ImportedFrameBlock a = (ImportedFrameBlock)lv.SelectedItems[i].Tag;
         a.DiscardZeroFrame = cbDiscard.Checked;
         if (a.DiscardZeroFrame)
         {
             lv.SelectedItems[i].SubItems[5].Text = "no";
         }
         else
         {
             lv.SelectedItems[i].SubItems[5].Text = "yes";
         }
         lv.SelectedItems[i].ForeColor = a.MarkColor;
     }
 }
Esempio n. 6
0
 /// <summary>
 /// Checks wether or not the object is already stored in the List
 /// </summary>
 /// <param name="item">The Object you are looking for</param>
 /// <returns>true, if it was found</returns>
 public bool Contains(ImportedFrameBlock item)
 {
     return(base.Contains(item));
 }
Esempio n. 7
0
 /// <summary>
 /// remove an Element
 /// </summary>
 /// <param name="item">The object that should be removed</param>
 public void Remove(ImportedFrameBlock item)
 {
     base.Remove(item);
 }
Esempio n. 8
0
 /// <summary>
 /// insert a new Element
 /// </summary>
 /// <param name="index">The Index where the Element should be stored</param>
 /// <param name="item">The object that should be inserted</param>
 public void Insert(int index, ImportedFrameBlock item)
 {
     base.Insert(index, item);
 }
Esempio n. 9
0
 /// <summary>
 /// add a new Element
 /// </summary>
 /// <param name="item">The object you want to add</param>
 /// <returns>The index it was added on</returns>
 public int Add(ImportedFrameBlock item)
 {
     return(base.Add(item));
 }