Example #1
0
        public TransformationTreeLoopValue GetCopy()
        {
            TransformationTreeLoopValue value = new TransformationTreeLoopValue();

            value.scope          = this.scope;
            value.position       = this.position;
            value.measure        = this.measure;
            value.periodInterval = this.periodInterval;
            value.periodName     = this.periodName;
            value.loop           = this.loop;
            return(value);
        }
        public TransformationTreeItem GetCopy(bool isCutMode = false)
        {
            TransformationTreeItem item = new TransformationTreeItem();

            item.name                   = isCutMode ? this.name : "Copy Of " + this.name;
            item.position               = -1;
            item.parent                 = null;
            item.tree                   = this.tree;
            item.type                   = this.type;
            item.ranking                = this.ranking;
            item.increase               = this.increase;
            item.conditions             = this.conditions;
            item.reportOid              = this.reportOid;
            item.loop                   = this.loop;
            item.valueListChangeHandler = new PersistentListChangeHandler <TransformationTreeLoopValue>();
            foreach (TransformationTreeLoopValue loopValue in this.valueListChangeHandler.Items)
            {
                TransformationTreeLoopValue value = loopValue.GetCopy();
                value.loop = item;
                item.valueListChangeHandler.AddNew(value);
            }
            return(item);
        }
 /// <summary>
 /// Oublier un LineItem
 /// </summary>
 /// <param name="cell"></param>
 public void ForgetValue(TransformationTreeLoopValue item)
 {
     item.position = -1;
     valueListChangeHandler.forget(item);
 }
 /// <summary>
 /// Retire un LineItem
 /// </summary>
 /// <param name="cell"></param>
 public void RemoveValue(TransformationTreeLoopValue item)
 {
     item.position = -1;
     valueListChangeHandler.AddDeleted(item);
 }
 /// <summary>
 /// Met à jour un LineItem
 /// </summary>
 /// <param name="cell"></param>
 public void UpdateValue(TransformationTreeLoopValue item)
 {
     valueListChangeHandler.AddUpdated(item);
 }
 /// <summary>
 /// Rajoute un LineItem
 /// </summary>
 /// <param name="cell"></param>
 public void AddValue(TransformationTreeLoopValue item)
 {
     item.position = valueListChangeHandler.Items.Count;
     valueListChangeHandler.AddNew(item);
 }