DesktopHelper.UI.Adapter.mStopAnthor C# (CSharp) Метод

mStopAnthor() приватный Метод

private mStopAnthor ( ) : void
Результат void
        private void mStopAnthor()
        {
            if (this.Top < screenRect.Bottom / 2)
            {
                if (this.Left < screenRect.Right / 2)
                {
                    if (this.Top < this.Left) StopAanhor = System.Windows.Forms.AnchorStyles.Top;
                    else StopAanhor = System.Windows.Forms.AnchorStyles.Left;
                }
                else
                {
                    if (this.Top < (screenRect.Right - this.Left + this.Width)) StopAanhor = System.Windows.Forms.AnchorStyles.Top;
                    else StopAanhor = System.Windows.Forms.AnchorStyles.Right;
                }
            }
            else
            {
                if (this.Left < screenRect.Right / 2)
                {
                    if ((screenRect.Bottom - this.Top - this.Height) < this.Left) StopAanhor = System.Windows.Forms.AnchorStyles.Bottom;
                    else StopAanhor = System.Windows.Forms.AnchorStyles.Left;
                }
                else
                {
                    if ((screenRect.Bottom - this.Top - this.Height) < (screenRect.Right - this.Left + this.Width)) StopAanhor = System.Windows.Forms.AnchorStyles.Bottom;
                    else StopAanhor = System.Windows.Forms.AnchorStyles.Right;
                }
            }
        }