当前位置: 首页>>代码示例>>C#>>正文


C# Mouse类代码示例

本文整理汇总了C#中Mouse的典型用法代码示例。如果您正苦于以下问题:C# Mouse类的具体用法?C# Mouse怎么用?C# Mouse使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Mouse类属于命名空间,在下文中一共展示了Mouse类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: InvokeContextMenu

        public Menu InvokeContextMenu(Condition condition)
        {
            var mouse = new Mouse();
            mouse.RightClick(this);

            return new Window(AutomationElement.RootElement, "Desktop").Find<Menu>(condition);
        }
开发者ID:pako4u2k,项目名称:wipflash,代码行数:7,代码来源:AutomationElementWrapper.cs

示例2: InputCommands

 public InputCommands(Keyboard keyboard, Mouse mouse, Touch touch, GamePad gamePad)
 {
     this.keyboard = keyboard;
     this.mouse = mouse;
     this.touch = touch;
     this.gamePad = gamePad;
 }
开发者ID:hillwhite,项目名称:DeltaEngine,代码行数:7,代码来源:InputCommands.cs

示例3: GwenInput

        public GwenInput(InputManager inputManager)
        {
            this.inputManager = inputManager;

            canvas = null;
            mouseX = 0;
            mouseY = 0;
            m_AltGr = false;

            mouse = inputManager.Mouse;
            if (mouse != null)
            {
                mouse.MouseMove += ProcessMouseMove;
                mouse.MouseDrag += ProcessMouseDrag;
                mouse.MouseButtonPress += ProcessMouseButtonPressed;
                mouse.MouseButtonRelease += ProcessMouseButtonReleased;
                mouse.MouseWheelMove += ProcessMouseWheel;
            }

            keyboard = inputManager.Keyboard;
            if (keyboard != null)
            {
                keyboard.KeyPress += ProcessKeyDown;
                keyboard.KeyRelease += ProcessKeyUp;
                keyboard.KeyText += ProcessText;
            }
        }
开发者ID:FloodProject,项目名称:flood,代码行数:27,代码来源:GUIRenderer.cs

示例4: EditorOpenTkViewport

 public EditorOpenTkViewport(Window window, Mouse mouse)
 {
     Window = window;
     this.mouse = mouse;
     screenSpace = new Camera2DScreenSpace(window);
     Settings.Current.LimitFramerate = 60;
 }
开发者ID:remy22,项目名称:DeltaEngine,代码行数:7,代码来源:EditorOpenTkViewport.cs

示例5: Main

    public static int Main(string[] args)
    {
        Q_INIT_RESOURCE("mice");
        new QApplication(args);

        scene = new QGraphicsScene();
        scene.SetSceneRect(-300, -300, 600, 600);
        scene.itemIndexMethod = QGraphicsScene.ItemIndexMethod.NoIndex;

        for (int i = 0; i < MouseCount; ++i) {
            Mouse mouse = new Mouse();
            mouse.SetPos(Math.Sin((i * 6.28) / MouseCount) * 200,
                          Math.Cos((i * 6.28) / MouseCount) * 200);
            scene.AddItem(mouse);
        }

        QGraphicsView view = new QGraphicsView(scene);
        view.SetRenderHint(QPainter.RenderHint.Antialiasing);
        view.BackgroundBrush = new QBrush(new QPixmap(":/images/cheese.jpg"));
        view.CacheMode = (int) QGraphicsView.CacheModeFlag.CacheBackground;
        view.dragMode = QGraphicsView.DragMode.ScrollHandDrag;
        view.WindowTitle = QT_TRANSLATE_NOOP("QGraphicsView", "Colliding Mice");
        view.Resize(400, 300);
        view.Show();

        return QApplication.Exec();
    }
开发者ID:KDE,项目名称:qyoto,代码行数:27,代码来源:main.cs

示例6: InputManager

 internal InputManager()
 {
     #if !WINDOWS_PHONE
     Players = new PlayerInputCollection();
     Mouse = new Mouse();
     #endif
 }
开发者ID:Jemeyr,项目名称:Halloween,代码行数:7,代码来源:InputManager.cs

示例7: OnStart

    public override void OnStart()
    {
        base.OnStart();

        sound = gameObject.RequireComponent<CSound>();
        doorButtonMesh = gameObject.RequireComponent<CMeshRenderer>();

        if (doorName != null && doorName.Length > 0)
        {
            door = GameObject.GetGameObjectByName(doorName);
            if (requiresSurveillancePlayer)
                doorButtonMesh.GetMaterial().SetColor(SharpMocha.YELLOW);
            else
                doorButtonMesh.GetMaterial().SetColor(SharpMocha.CORNFLOWER_BLUE);
        }
        else
        {
            isButtonRed = true; // it is a default locked button
        }
        doorButtonColor = doorButtonMesh.GetMaterial().GetColor();

        playerMouse = GetScript<Mouse>(Common.GetStealthPlayerMouse() );
        player = Common.GetStealthPlayer();
        playerScript = Common.GetStealthPlayerScript();
        ocuConsole = GetScript<OcuConsoleScreen>(Common.GetSurveillancePlayerConsoleScreen());
    }
开发者ID:Reticulatas,项目名称:MochaEngineFinal,代码行数:26,代码来源:DoorButton.cs

示例8: Menu

 public Menu(Screen screen, Mouse mouse)
 {
     _screen = screen;
     _mouse = mouse;
     _subjectBarStatus = MenuState.MENU_CLOSED;
     _objectBarStatus = MenuState.MENU_CLOSED;
 }
开发者ID:scemino,项目名称:nscumm,代码行数:7,代码来源:Menu.cs

示例9: HandleWithMouse

		public void HandleWithMouse(Mouse mouse)
		{
			Position = mouse.Position;
			if (mouse.GetButtonState(Button) == State &&
				ScreenSpace.Current.Viewport.Contains(mouse.Position))
				Invoke();
		}
开发者ID:whztt07,项目名称:DeltaEngine,代码行数:7,代码来源:MouseButtonTrigger.cs

示例10: HandleWithMouse

		public void HandleWithMouse(Mouse mouse)
		{
			if (Position == mouse.Position)
				return;
			Position = mouse.Position;
			if (ScreenSpace.Current.Viewport.Contains(mouse.Position))
				Invoke();
		}
开发者ID:whztt07,项目名称:DeltaEngine,代码行数:8,代码来源:MouseMovementTrigger.cs

示例11: Start

	// Use this for initialization
	public void Start () {
		//Debug.Log ("START FROM ABILITY");
		caster = this.transform.parent.gameObject;
		//Debug.Log (caster);
		mouseS = GameObject.Find("Main Camera").GetComponent<Mouse> ();
		aMan = GameObject.Find("AbilityManager").GetComponent<AbilityManager> ();
		guiScript = GameObject.Find ("SpawnGUI").GetComponent<UserInterfaceGUI> ();
	}
开发者ID:Bjeck,项目名称:BM-RTS-game,代码行数:9,代码来源:Ability.cs

示例12: SelectedEventArgs

 public SelectedEventArgs(int position, Mouse mouse, int count, double x,double y,ChessPiece chess)
 {
     this.Position = position;
     this.Mouse = mouse;
     this.Count = count;
     this.Chess = chess;
     this.X = x;
     this.Y = y;
 }
开发者ID:wangjianglin,项目名称:chess,代码行数:9,代码来源:SelectedEvent.cs

示例13: HandleWithMouse

		public void HandleWithMouse(Mouse mouse)
		{
			if (Position == mouse.Position)
				return;
			var isButton = mouse.GetButtonState(Button) == State;
			Position = mouse.Position;
			if (isButton && ScreenSpace.Current.Viewport.Contains(mouse.Position))
				Invoke();
		}
开发者ID:whztt07,项目名称:DeltaEngine,代码行数:9,代码来源:MousePositionTrigger.cs

示例14: Initiliase

        public bool Initiliase(IntPtr windowHandle)
        {
            this.input = MOIS.InputManager.CreateInputSystem((uint)windowHandle.ToInt32());

            //Create all devices (We only catch joystick exceptions here, as, most people have Key/Mouse)
            this.keyboard = (Keyboard)input.CreateInputObject(MOIS.Type.OISKeyboard, true);
            this.mouse = (Mouse)input.CreateInputObject(MOIS.Type.OISMouse, true);
            return true;
        }
开发者ID:andyhebear,项目名称:glueeengine,代码行数:9,代码来源:InputManager.cs

示例15: HandleWithMouse

		public void HandleWithMouse(Mouse mouse)
		{
			bool wasJustStartedPressing = lastState == State.Pressing;
			State currentState = mouse.GetButtonState(Button);
			var isNowReleased = currentState == State.Releasing;
			lastState = currentState;
			if (isNowReleased && wasJustStartedPressing)
				Invoke();
		}
开发者ID:whztt07,项目名称:DeltaEngine,代码行数:9,代码来源:MouseTapTrigger.cs


注:本文中的Mouse类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。