Esempio n. 1
0
        public static void LinkWherePossible(BaseController Controller)
        {
            Cursor.Current = Cursors.WaitCursor;
            ApsimFile.Component        Base     = Controller.Selection;
            List <ApsimFile.Component> Siblings = new List <ApsimFile.Component>();

            Base.Parent.FindRecursively(Base.Type, ref Siblings);

            foreach (ApsimFile.Component Sibling in Siblings)
            {
                if (Sibling.FullPath != Base.FullPath)
                {
                    Sibling.ConvertToShortcutsUsingBase(Base);
                }
            }
            Controller.ApsimData.PublishComponentChanged(Controller.ApsimData.RootComponent);

            Cursor.Current = Cursors.Default;
        }