AdvancedHMI Software

General Category => Feature Request => Topic started by: thebestg2002 on November 16, 2018, 07:32:58 AM

Title: PLC address to disable keypad input
Post by: thebestg2002 on November 16, 2018, 07:32:58 AM
A PLC address to disable keypad input would be a nice future enhancement.
Title: Re: PLC address to disable keypad input
Post by: bachphi on November 16, 2018, 03:59:04 PM
keyboardinput ?
Title: Re: PLC address to disable keypad input
Post by: Godra on November 17, 2018, 06:57:33 PM
The keypad will not show simply by not entering an address into the PLCAddressKeypad property field (which is equivalent of being disabled).

But if you still need it then you could add 2 new properties to those controls that have the keypad included:

Code: [Select]
    Private m_KeypadDisable As Boolean
    <System.ComponentModel.Browsable(False)>
    Public Property KeypadDisable As Boolean
        Get
            Return m_KeypadDisable
        End Get
        Set(value As Boolean)
            If m_KeypadDisable <> value Then
                m_KeypadDisable = value
                If KeypadPopUp IsNot Nothing Then
                    If m_KeypadDisable Then
                        KeypadPopUp.Enabled = False
                    Else
                        KeypadPopUp.Enabled = True
                    End If
                    KeypadPopUp.Invalidate()
                End If
            End If
        End Set
    End Property

    '*****************************************
    '* Property - Address in PLC to Link to
    '*****************************************
    Private m_PLCAddressKeypadDisable As String = ""
    <System.ComponentModel.DefaultValue("")> _
    <System.ComponentModel.Category("PLC Properties")> _
    Public Property PLCAddressKeypadDisable() As String
        Get
            Return m_PLCAddressKeypadDisable
        End Get
        Set(ByVal value As String)
            If m_PLCAddressKeypadDisable <> value Then
                m_PLCAddressKeypadDisable = value

                '* When address is changed, re-subscribe to new address
                SubscribeToComDriver()
            End If
        End Set
    End Property