Example #1
0
        public void Hook(ResourceHookType hookType, IResourceAccess rawAccess)
        {
            ILayoutAccess access = rawAccess as ILayoutAccess;

            if (hookType == ResourceHookType.AfterWrite)
            {
                nodes.LayoutChanged(access);
            }
            else if (hookType == ResourceHookType.AfterDowngrade)
            {
                IEnumerable <Connection> conns = connections.UpdateConnections(access);
                OnLayoutModified(access);
                ProjectModule mod = this.module;
                if (mod != null && conns != null)
                {
                    // done after OnLayoutModified since that will add pin instances into simulation substates
                    mod.UpdateConnections(conns);
                }
            }
        }