public void LoadPoses()
        {
            Ctrls.Clear();
            categories.Clear();
            int count = CategDropDownButton.DropDownItems.Count;

            while (count > 5)
            {
                count--;
                CategDropDownButton.DropDownItems.RemoveAt(count);
            }

            foreach (TK_Action action in library.Actions)
            {
                ActionCtrl ctrl = new ActionCtrl(this, action);
                ctrl.MouseClick       += new MouseEventHandler(ctrl_MouseClick);
                ctrl.MouseDoubleClick += new MouseEventHandler(ctrl_MouseDoubleClick);
                Ctrls.Add(ctrl);

                if (!categories.ContainsKey(action.Category))
                {
                    ToolStripMenuItem item = CategDropDownButton.DropDownItems.Add(action.Category) as ToolStripMenuItem;
                    item.CheckOnClick    = true;
                    item.Checked         = true;
                    item.CheckedChanged += new EventHandler(item_CheckedChanged);
                    categories.Add(action.Category, true);
                }
            }

            SortControls();
            ResetVisibilities();
            UpdateDisplays();
            SetDisplayStates();
        }
        internal void Select(ActionCtrl actionCtrl)
        {
            DeselectAll();
            actionCtrl.Selected = true;
            selectedActionCtrls.Add(actionCtrl);

            propertyGrid1.SelectedObjects = _editor.SetActions(selectedActionCtrls).ToArray();
        }
        void ctrl_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            ActionCtrl actionCtrl = sender as ActionCtrl;

            if (actionCtrl.Action.Type != ActionTypes.Pose)
            {
                library.ShowSequence(actionCtrl.Action);
            }
        }
        internal void RemoveFromSelection(ActionCtrl actionCtrl)
        {
            if (actionCtrl.Selected)
            {
                actionCtrl.Selected = false;
                selectedActionCtrls.Remove(actionCtrl);
            }

            propertyGrid1.SelectedObjects = _editor.SetActions(selectedActionCtrls).ToArray();
        }
        internal void AddToSelection(ActionCtrl actionCtrl)
        {
            if (!actionCtrl.Selected)
            {
                actionCtrl.Selected = true;
                selectedActionCtrls.Add(actionCtrl);
            }

            propertyGrid1.SelectedObjects = _editor.SetActions(selectedActionCtrls).ToArray();
        }
        internal void ToggleSelection(ActionCtrl actionCtrl)
        {
            if (!actionCtrl.Selected)
            {
                actionCtrl.Selected = true;
                selectedActionCtrls.Add(actionCtrl);
            }
            else
            {
                actionCtrl.Selected = false;
                selectedActionCtrls.Remove(actionCtrl);
            }

            propertyGrid1.SelectedObjects = _editor.SetActions(selectedActionCtrls).ToArray();
        }