Esempio n. 1
0
        private void TryStickBottom(StickContext top, Position currentPosition, ref int topPriority)
        {
            foreach (StickPoint other in pointProvider.ForBottom())
            {
                if (other.Handle == handle)
                {
                    continue;
                }

                if (topPriority < other.Priority)
                {
                    break;
                }

                if (top.TryStickTo(other.Value, currentPosition.Height))
                {
                    topPriority = other.Priority;
                }
            }
        }
Esempio n. 2
0
        private void TryStickRight(StickContext left, Position currentPosition, ref int leftPriority)
        {
            foreach (StickPoint other in pointProvider.ForRight())
            {
                if (other.Handle == handle)
                {
                    continue;
                }

                if (leftPriority < other.Priority)
                {
                    break;
                }

                if (left.TryStickTo(other.Value, currentPosition.Width))
                {
                    leftPriority = other.Priority;
                }
            }
        }
Esempio n. 3
0
        private void TryStickTop(StickContext top, ref int topPriority)
        {
            foreach (StickPoint other in pointProvider.ForTop())
            {
                if (other.Handle == handle)
                {
                    continue;
                }

                if (topPriority < other.Priority)
                {
                    break;
                }

                if (top.TryStickTo(other.Value))
                {
                    topPriority = other.Priority;
                }
            }
        }
Esempio n. 4
0
        private void TryStickLeft(StickContext left, ref int leftPriority)
        {
            foreach (StickPoint other in pointProvider.ForLeft())
            {
                if (other.Handle == handle)
                {
                    continue;
                }

                if (leftPriority < other.Priority)
                {
                    break;
                }

                if (left.TryStickTo(other.Value))
                {
                    leftPriority = other.Priority;
                }
            }
        }