Ejemplo n.º 1
0
        public TimelineActionData createData(TimelineAction action)
        {
            TimelineActionData actionData = actionPrototypesType[action.GetType()].createData(action);

            actionDataBindings.Add(action, actionData);
            return(actionData);
        }
        void timelineView_ActiveDataChanged(object sender, EventArgs e)
        {
            if (currentActionData != (TimelineActionData)timelineView.CurrentData) //Did it actually change
            {
                if (currentActionData != null)
                {
                    currentActionData.editingCompleted();
                }
                currentActionData = (TimelineActionData)timelineView.CurrentData;
                if (currentActionData != null)
                {
                    currentActionData.editingStarted();
                }

                EditInterfaceHandler editInterfaceHandler = ViewHost.Context.getModel <EditInterfaceHandler>(EditInterfaceHandler.DefaultName);
                if (editInterfaceHandler != null)
                {
                    if (currentActionData != null)
                    {
                        editInterfaceHandler.changeEditInterface(currentActionData.Action.getEditInterface());
                    }
                    else if (currentTimeline != null)
                    {
                        editInterfaceHandler.changeEditInterface(currentTimeline.getEditInterface());
                    }
                }
            }
        }