示例#1
0
        private void Form1_KeyDown(object sender, KeyEventArgs e)
        {
            InputCommand command = InputHandler.HandleInput(e.KeyCode);

            if (command != null)
            {
                command.Execute();
            }
        }
示例#2
0
 private void BigSoftKeyboardUserControl_Loaded(object sender, RoutedEventArgs e)
 {
     CheckBox.IsChecked = false;
     //初始化界面
     if (Win32Helper.CapsLockStatus)
     {
         InputCommand?.Execute("CapsLock");//恢复小写
     }
     Letter.Visibility      = Visibility.Visible;
     Symbol.Visibility      = Visibility.Collapsed;
     MoreOrReturn.IsChecked = false;
     MoreOrReturn.Content   = "更多";
 }
示例#3
0
    //-----------------------------------------------------------------

    public void UpdateCommandInput()
    {
        if (m_Unit == null)
        {
            return;
        }
        if (Input.GetKeyDown((KeyCode)350 + m_ControllerMod))
        {
            ButtonA.Execute(m_Unit);
        }
        if (Input.GetKeyDown((KeyCode)351 + m_ControllerMod))
        {
            ButtonB.Execute(m_Unit);
        }
        if (Input.GetKeyDown((KeyCode)352 + m_ControllerMod))
        {
            ButtonX.Execute(m_Unit);
        }
        if (Input.GetKeyDown((KeyCode)353 + m_ControllerMod))
        {
            ButtonY.Execute(m_Unit);
        }
        if (Input.GetKeyDown((KeyCode)354 + m_ControllerMod))
        {
            ButtonLB.Execute(m_Unit);
        }
        if (Input.GetKeyDown((KeyCode)355 + m_ControllerMod))
        {
            ButtonRB.Execute(m_Unit);
        }
        if (Input.GetKeyDown((KeyCode)356 + m_ControllerMod))
        {
            ButtonBack.Execute(m_Unit);
        }
        if (Input.GetKeyDown((KeyCode)357 + m_ControllerMod))
        {
            ButtonStart.Execute(m_Unit);
        }
    }
示例#4
0
 public void Update()
 {
     inputCommand.Execute(this);
 }