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; }
public void PasteContents(TriggerClipboard clipboard, object input, Dictionary <int, int> triggerMapping, bool bShallow) { if (bShallow == true) { } else { } }
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(); }