LcdReadSoftButtons() private méthode

private LcdReadSoftButtons ( int device ) : uint
device int
Résultat uint
Exemple #1
0
        private void LCDButtonAction()
        {
            if (this.currentScreen == LCD_SCREEN_LOADING)
            {
                return;
            }

            uint LCDbtn = DMcLgLCD.LcdReadSoftButtons(this.device);

            if (this.button != LCDbtn)
            {
                this.button = LCDbtn;
                if (this.button == DMcLgLCD.LGLCD_BUTTON_OK)
                {
                    if ((this.currentScreen != this.Screens.Length - 1) && (this.currentScreen >= LCD_SCRERN_INFO_TEAM1))
                    {
                        this.currentScreen++;
                    }
                    else
                    {
                        this.currentScreen--;
                    }
                }
            }
        }
Exemple #2
0
        private void _OnLCDButtonPressTimer(object sender, EventArgs e)
        {
            uint button = DMcLgLCD.LcdReadSoftButtons(_device);

            if (button != 0)
            {
                OnLCDButtonPress(button);
            }
        }
        private void timInput_Tick(object sender, EventArgs e)
        {
            if (ConfigForm == null || !ConfigForm.Visible)
            {
                buttons = DMcLgLCD.LcdReadSoftButtons(device);

                if (LetterMgr.Instance.State == eState.Normal)
                {
                    if ((buttons & DMcLgLCD.LGLCD_BUTTON_LEFT) == DMcLgLCD.LGLCD_BUTTON_LEFT)
                    {
                        LetterMgr.Instance.Chose(LetterMgr.eChoice4.Left);
                    }
                    if ((buttons & DMcLgLCD.LGLCD_BUTTON_RIGHT) == DMcLgLCD.LGLCD_BUTTON_RIGHT)
                    {
                        LetterMgr.Instance.Chose(LetterMgr.eChoice4.Right);
                    }
                    if ((buttons & DMcLgLCD.LGLCD_BUTTON_UP) == DMcLgLCD.LGLCD_BUTTON_UP)
                    {
                        LetterMgr.Instance.Chose(LetterMgr.eChoice4.Up);
                    }
                    if ((buttons & DMcLgLCD.LGLCD_BUTTON_DOWN) == DMcLgLCD.LGLCD_BUTTON_DOWN)
                    {
                        LetterMgr.Instance.Chose(LetterMgr.eChoice4.Down);
                    }

                    if ((buttons & DMcLgLCD.LGLCD_BUTTON_CANCEL) == DMcLgLCD.LGLCD_BUTTON_CANCEL)
                    {
                        LetterMgr.Instance.DirIDx++;
                        Render();
                    }

                    if ((buttons & DMcLgLCD.LGLCD_BUTTON_OK) == DMcLgLCD.LGLCD_BUTTON_OK)
                    {
                        if (LetterMgr.Instance.LanguageDirection == LetterMgr.eLanguageDirection.J2E)
                        {
                            LetterMgr.Instance.LanguageDirection = LetterMgr.eLanguageDirection.E2J;
                        }
                        else
                        {
                            LetterMgr.Instance.LanguageDirection = LetterMgr.eLanguageDirection.J2E;
                        }

                        Render();
                    }
                }
            }
        }
Exemple #4
0
        public void DoButtons()
        {
            uint buttons = DMcLgLCD.LcdReadSoftButtons(device);

            if (buttons != last_buttons)
            {
                if ((buttons & (DMcLgLCD.LGLCD_BUTTON_1 | DMcLgLCD.LGLCD_BUTTON_LEFT)) != 0)
                {
                    ButtonLEFT(this);
                }
                if ((buttons & (DMcLgLCD.LGLCD_BUTTON_2 | DMcLgLCD.LGLCD_BUTTON_RIGHT)) != 0)
                {
                    ButtonRIGHT(this);
                }
                if ((buttons & (DMcLgLCD.LGLCD_BUTTON_3 | DMcLgLCD.LGLCD_BUTTON_OK)) != 0)
                {
                    ButtonOK(this);
                }
                if ((buttons & (DMcLgLCD.LGLCD_BUTTON_4 | DMcLgLCD.LGLCD_BUTTON_MENU)) != 0)
                {
                    ButtonMENU(this);
                }
                if ((buttons & DMcLgLCD.LGLCD_BUTTON_UP) != 0)
                {
                    ButtonUP(this);
                }
                if ((buttons & DMcLgLCD.LGLCD_BUTTON_DOWN) != 0)
                {
                    ButtonDOWN(this);
                }
                if ((buttons & DMcLgLCD.LGLCD_BUTTON_CANCEL) != 0)
                {
                    ButtonCANCEL(this);
                }

                last_buttons = buttons;
            }
        }