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; } } }
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; } } }
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; } } }
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; } } }