Example #1
0
        /// <summary>Perform the command</summary>
        /// <param name="commandHistory">The command history.</param>
        public void Do(CommandHistory commandHistory)
        {
            this.modelToAdd = Apsim.Add(parent, child);

            // The add method above may have renamed the model to avoid a clash with the
            // name of an existing model so just in case, reset the name for the tree.
            nodeDescription.Name = this.modelToAdd.Name;

            this.explorerView.Tree.AddChild(Apsim.FullPath(parent), nodeDescription);

            this.modelAdded = true;
        }