Exemple #1
0
        public void UpdateLimits()
        {
            DeadLine.AddRange(CurrentItem.TopBorder.ToAbsolute(CurrentItem.Position).Select(x => new Point(x.X, x.Y - 1)));
            DeadLine = DeadLine.Except(CurrentItem.BottomBorder.ToAbsolute(CurrentItem.Position)).ToList();

            LeftBorder.AddRange(CurrentItem.RightBorder.ToAbsolute(CurrentItem.Position).Select(x => new Point(x.X + 1, x.Y)));
            LeftBorder = LeftBorder.Where(x => x.X < NetSize.Width).Distinct().ToList();

            RightBorder.AddRange(CurrentItem.LeftBorder.ToAbsolute(CurrentItem.Position).Select(x => new Point(x.X - 1, x.Y)));
            RightBorder = RightBorder.Where(x => x.X >= 0).Distinct().ToList();
        }