protected override void DoCommandAction()
        {
            int tileCount = 0;

            foreach (Tile t in TileSelectionManager.Instance.GetSelectedTiles())
            {
                ProgressInfo.Progress = ProgressStart + (int)((double)tileCount++ / (double)TileSelectionManager.Instance.NumberOfSelectedTiles * ProgressShare);

                // direct block (fast)
                if (!IncludeAllPorts)
                {
                    ExcludePortsFromBlocking.BlockPort(t, PortName, CheckForExistence);
                }
                else if (t.SwitchMatrix.Contains(PortName))
                {
                    ExcludePortsFromBlocking.BlockPortAndReachablePorts(t.Location, PortName, CheckForExistence, IncludeAllPorts);

                    /*
                     * ExcludePortsFromBlocking cmd = new ExcludePortsFromBlocking();
                     * cmd.CheckForExistence = this.CheckForExistence;
                     * cmd.IncludeAllPorts = this.IncludeAllPorts;
                     * cmd.Location = t.Location;
                     * cmd.PortName = this.PortName;
                     * //cmd.Profile = this.Profile;
                     * CommandExecuter.Instance.Execute(cmd);
                     * */
                }
            }
        }
Beispiel #2
0
        protected override void DoCommandAction()
        {
            // port filter
            Regex portFilter = new Regex(PortNameRegexp, RegexOptions.Compiled);
            // progress
            int tileCount = 0;

            foreach (Tile tile in TileSelectionManager.Instance.GetSelectedTiles())
            {
                ProgressInfo.Progress = ProgressStart + (int)((double)tileCount++ / (double)TileSelectionManager.Instance.NumberOfSelectedTiles * ProgressShare);

                foreach (Port port in tile.SwitchMatrix.Ports.Where(p => portFilter.IsMatch(p.Name)))
                {
                    if (IncludeAllPorts)
                    {
                        ExcludePortsFromBlocking cmd = new ExcludePortsFromBlocking();
                        cmd.CheckForExistence = CheckForExistence;
                        cmd.IncludeAllPorts   = IncludeAllPorts;
                        cmd.Location          = tile.Location;
                        cmd.PortName          = port.Name;
                        CommandExecuter.Instance.Execute(cmd);
                    }
                    else
                    {
                        // TODO ExcludePortsFromBlocking.BlockPort
                        ExcludePortsFromBlocking.BlockPort(tile, port.Name, CheckForExistence);
                    }
                }
            }
        }
Beispiel #3
0
        protected override void DoCommandAction()
        {
            Tile tile = FPGA.FPGA.Instance.GetTile(Location);

            Regex filter = new Regex(PortNameRegexp, RegexOptions.Compiled);

            foreach (Port port in tile.SwitchMatrix.Ports.Where(p => filter.IsMatch(p.Name)))
            {
                ExcludePortsFromBlocking cmd = new ExcludePortsFromBlocking();
                cmd.CheckForExistence = CheckForExistence;
                cmd.IncludeAllPorts   = IncludeAllPorts;
                cmd.Location          = tile.Location;
                cmd.PortName          = port.Name;
                CommandExecuter.Instance.Execute(cmd);
            }
        }