コード例 #1
0
        void timelineView_ActiveDataChanged(object sender, EventArgs e)
        {
            if (propTimelineData != null)
            {
                propTimelineData.editingCompleted();
            }
            propTimelineData = (PropTimelineData)timelineView.CurrentData;
            if (propTimelineData != null)
            {
                propEditController.ShowTools = false;
                propTimelineData.editingStarted();
            }
            else
            {
                propEditController.ShowTools = true;
                if (propEditController.CurrentShowPropAction != null)
                {
                    propEditController.CurrentShowPropAction._movePreviewProp(propEditController.CurrentShowPropAction.Translation, propEditController.CurrentShowPropAction.Rotation);
                }
            }

            EditInterfaceHandler editInterfaceHandler = ViewHost.Context.getModel <EditInterfaceHandler>(EditInterfaceHandler.DefaultName);

            if (editInterfaceHandler != null)
            {
                if (propTimelineData != null)
                {
                    editInterfaceHandler.changeEditInterface(propTimelineData.Action.EditInterface);
                }
                else if (propData != null)
                {
                    editInterfaceHandler.changeEditInterface(propData.getEditInterface());
                }
            }
        }
コード例 #2
0
        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());
                    }
                }
            }
        }