Beyond_Beyaan.GameMain.MouseDown C# (CSharp) Метод

MouseDown() публичный Метод

public MouseDown ( MouseEventArgs e ) : void
e System.Windows.Forms.MouseEventArgs
Результат void
        public void MouseDown(MouseEventArgs e)
        {
            int whichButton = 0;
            switch (e.Button)
            {
                case System.Windows.Forms.MouseButtons.Left:
                    {
                        whichButton = 1;
                    } break;
                case System.Windows.Forms.MouseButtons.Right:
                    {
                        whichButton = 2;
                    } break;
                case System.Windows.Forms.MouseButtons.Middle:
                    {
                        whichButton = 3;
                    } break;
            }
            bool handleTaskBar = false;
            if (_currentScreen != Screen.MainMenu && _currentScreen != Screen.NewGame && _currentScreen != Screen.Battle)
            {
                handleTaskBar = true;
            }
            if (handleTaskBar)
            {
                if (_situationReport.MouseDown(e.X, e.Y))
                {
                    return;
                }
            }
            _screenInterface.MouseDown(e.X, e.Y, whichButton);
        }

Usage Example

Пример #1
0
 private void BeyondBeyaan_MouseDown(object sender, MouseEventArgs e)
 {
     try
     {
         gameMain.MouseDown(e);
     }
     catch (Exception exception)
     {
         HandleException(exception);
     }
 }