Exemple #1
0
        public static DragTipModel FromDescriptor(TimelineDragDescriptor descriptor)
        {
            DragTipModel dragTipModel = (DragTipModel)null;

            if (descriptor != null)
            {
                dragTipModel = new DragTipModel();
                dragTipModel.SetEffect(descriptor);
                dragTipModel.SetSource(descriptor);
            }
            return(dragTipModel);
        }
Exemple #2
0
        private void SetDataBinding(DataBindingDragDropModel feedback)
        {
            if (feedback == null)
            {
                return;
            }
            this.SourceName = feedback.SourceName;
            this.TargetName = feedback.TargetNodeName;
            string targetPropertyName = feedback.TargetPropertyName;

            if (!string.IsNullOrEmpty(targetPropertyName))
            {
                DragTipModel dragTipModel = this;
                string       str          = dragTipModel.TargetName + "." + targetPropertyName;
                dragTipModel.TargetName = str;
            }
            if ((feedback.DropFlags & DataBindingDragDropFlags.CreateElement) == DataBindingDragDropFlags.CreateElement)
            {
                if (DataBindingModeModel.Instance.Mode == DataBindingMode.Details)
                {
                    this.DropEffectId = DropEffectId.CreateDetails;
                }
                else
                {
                    this.DropEffectId = DropEffectId.CreateElementAndBinding;
                }
            }
            else
            {
                if ((feedback.DropFlags & DataBindingDragDropFlags.SetBinding) != DataBindingDragDropFlags.SetBinding)
                {
                    return;
                }
                this.DropEffectId = DropEffectId.SetBinding;
            }
        }