示例#1
0
        public static void MoveUp(BaseController Controller)
        {
            // --------------------------------------------------------
            // Move all selected items up
            // --------------------------------------------------------
            List <string> PathsToMove = new List <string>();

            foreach (string SelectedPath in Controller.SelectedPaths)
            {
                PathsToMove.Add(SelectedPath.Substring(SelectedPath.LastIndexOf(XmlHelper.Delimiter) + 1));
            }
            ApsimFile.Component Parent = Controller.ApsimData.Find(Controller.SelectedPaths[0]).Parent;
            Parent.MoveUp(PathsToMove);
        }