Пример #1
0
        public void RemoveProcessLink(EventTokenProcessLinkTrigger token)
        {
            var links = Parts.GetParts <PartsJitProcessLink>(LAYER.JitProcessConnector, a =>
            {
                return(a.ProcessFrom.ID == token.ProcessIDFrom && a.ProcessTo.ID == token.ProcessIDTo);
            });

            foreach (var link in links)
            {
                Parts.Remove(Pane.Target, link, LAYER.JitProcessConnector);
            }
        }
Пример #2
0
        public void AddProcessLink(EventTokenProcessLinkTrigger token)
        {
            var link = new PartsJitProcessLink
            {
                ProcessFrom = Parts.GetParts <PartsJitProcess>(LAYER.JitProcess, a => a.ID == token.ProcessIDFrom).FirstOrDefault(),
                ProcessTo   = Parts.GetParts <PartsJitProcess>(LAYER.JitProcess, a => a.ID == token.ProcessIDTo).FirstOrDefault(),
                Width       = Distance.FromMeter(0.5),
                Height      = Distance.FromMeter(0.5),
                PositionerX = DistancePositionerX,
                PositionerY = DistancePositionerY,
                CoderX      = DistanceCoderX,
                CoderY      = DistanceCoderY,
            };

            Parts.Add(Pane.Target, link, LAYER.JitProcessConnector);
        }