public void Execute(PCBI.Automation.IPCBIWindow parent)
        {
            parent.MainForm.KeyPress += MainForm_KeyPress;
            parent.ZoomHome();
            //example work to highlight pins of gnd net
            IStep curStep = parent.GetCurrentStep();

            if (curStep == null)
            {
                return;
            }
            IMatrix matrix = parent.GetMatrix();

            parent.UIAction.Execute(ID_ActionItem.ID_ALL_LAYER_OFF);
            List <string> layernames = matrix.GetAllLayerNames();
            int           count      = layernames.Count;
            int           loopLayer  = 0;

            loopLayer = layernames.IndexOf(matrix.GetTopSignalLayer());
            while (true)
            {
                Thread.Sleep(1000);

                if (isDisposed)
                {
                    break;
                }
                if (pause)
                {
                    continue;
                }

                if (loopLayer > 0)
                {
                    curStep.GetLayer(layernames[loopLayer - 1]).DisableLayer();
                }
                curStep.GetLayer(layernames[loopLayer]).EnableLayer(true);
                parent.UpdateView();

                loopLayer++;
                if (loopLayer > count)
                {
                    break;
                }
                if (loopLayer > layernames.IndexOf(matrix.GetBotSignalLayer()))
                {
                    break;
                }
            }
        }
        public void Execute(PCBI.Automation.IPCBIWindow parent)
        {
            //do  work here
            bool exampleColorReset = true;

            while (true)
            {
                Thread.Sleep(1000);

                if (isDisposed)
                {
                    break;
                }

                //example work to highlight pins of gnd net
                IStep curStep = parent.GetCurrentStep();
                if (curStep == null)
                {
                    return;
                }

                ICMPLayer topLayer = curStep.GetCMPLayer(true);

                if (topLayer == null)
                {
                    continue;
                }

                foreach (ICMPObject cmp in topLayer.GetAllLayerObjects())
                {
                    foreach (IPin pin in cmp.GetPinList())
                    {
                        if (pin.GetNetNameOnIPin(cmp).ToLowerInvariant().Contains("gnd"))
                        {
                            if (exampleColorReset)
                            {
                                pin.ResetPinColor(cmp);
                            }
                            else
                            {
                                pin.SetPinColor(System.Drawing.Color.Aqua, cmp);
                            }
                        }
                    }
                }
                exampleColorReset = !exampleColorReset;
                parent.UpdateView();
            }
        }
        public void Execute(PCBI.Automation.IPCBIWindow parent)
        {
            parent.MainForm.KeyPress += MainForm_KeyPress;
            parent.ZoomHome();
            //example work to highlight pins of gnd net
            IStep curStep = parent.GetCurrentStep();

            if (curStep == null)
            {
                return;
            }

            RectangleF rect = curStep.GetBounds();
            //do  work here
            int   loopX = 0;
            int   loopY = 0;
            float tileX = 300; // 300 / 25,4 entspicht 11 mm
            float tileY = 300; // 300 / 25,4 entspicht 11 mm

            while (true)
            {
                Thread.Sleep(500);

                if (isDisposed)
                {
                    break;
                }
                if (pause)
                {
                    continue;
                }
                RectangleF zoomrect = new RectangleF(rect.X + tileX * loopX, rect.Y + tileY * loopY, tileX, tileY);
                loopX++;
                parent.ZoomRect(zoomrect);

                if (tileX * loopX > rect.Width)
                {
                    loopY++;
                    loopX = 0;
                    if (tileY * loopY > rect.Height)
                    {
                        parent.ZoomHome();
                        break;
                    }
                }
            }
        }