Ejemplo n.º 1
0
        public void PasteContents(TriggerClipboard clipboard, object input, Dictionary <int, int> triggerMapping, bool bShallow)
        {
            int     newID;
            Trigger copy = new Trigger();

            this.ParentTriggerNamespace = mTriggerHost.CurrentTriggerNamespace;
            Trigger data  = input as Trigger;
            int     oldID = data.ID;

            if (bShallow == true) //not working yet?
            {
                data.DeepCopyTo(copy);
                mParentTriggerNamespace.InsertTrigger(copy, out newID);
                this.Trigger = copy;
            }
            else
            {
                //data.DeepCopyTo(copy);
                //mParentTriggerNamespace.InsertTrigger(copy, out newID);

                //clipboard.

                copy = clipboard.GetTrigger(data, this.ParentTriggerNamespace, out newID);

                this.Trigger = copy;
            }

            triggerMapping[oldID] = newID;
        }
Ejemplo n.º 2
0
 public void PasteContents(TriggerClipboard clipboard, object input, Dictionary <int, int> triggerMapping, bool bShallow)
 {
     if (bShallow == true)
     {
     }
     else
     {
     }
 }
Ejemplo n.º 3
0
        public override void OnCopyRequest(SuperList otherlist, SuperListDragButton toMove)
        {
            //base.OnCopyRequest(otherlist, toMove);
            Control       c = toMove.Tag as Control;
            FunctorEditor f = c as FunctorEditor;

            if (f == null)
            {
                return;
            }
            TriggerCondition comp = f.Tag as TriggerCondition;

            if (comp == null)
            {
                return;
            }
            //comp.CopyTo

            TriggerControl trigCont = otherlist.Parent.Parent as TriggerControl;

            TriggerClipboard temp = new TriggerClipboard();

            //temp.CopyValues(this.mParentTriggerNamespace.GetValueList());
            temp.mValues = this.ParentTriggerNamespace.GetValues();

            int newID;
            TriggerCondition e = temp.GetCondition(comp, this.mParentTriggerNamespace);

            ConditionsList ef = otherlist as ConditionsList;

            //mParentTriggerNamespace.InsertCondition(trigCont.Trigger.ID, e, temp.mValues, out newID);
            mParentTriggerNamespace.InsertCondition(trigCont.Trigger.ID, e, this.ParentTriggerNamespace.GetValues(), out newID);


            ef.AddExistingConditionToUI(e, this.mParentTriggerNamespace.GetValues());

            mParentTriggerNamespace.ProcessVarMapping();
        }