Brh.Forms.WindowStateManager.OnMove C# (CSharp) Method

OnMove() private method

private OnMove ( object sender, System e ) : void
sender object
e System
return void
        private void OnMove(object sender, System.EventArgs e)
        {
            if(!settingState)
            {
                System.Drawing.Size screenSize = Screen.FromRectangle(new Rectangle(_parent.Location, _parent.Size)).Bounds.Size;
                if(screenSize == _thisState.ScreenSize)
                {
                    //Debug.WriteLine("Moved");

                    // save position
                    if(_parent.WindowState == FormWindowState.Normal)
                    {
                        _thisState.Location = _parent.Location;

                        Debug.Assert(_thisState.Location == ((WindowSizeLocation)_stateByResolution[_thisState.ScreenSize]).Location);
                    }
                    // save state
                    if(!(_parent.WindowState == FormWindowState.Minimized && !_allowSaveMinimized))
                        _windowState = _parent.WindowState;
                }
            }
        }