예제 #1
0
    //****************************************************************************************************
    //
    //****************************************************************************************************

    private void EnableActions(ACTION_FLAG selection)
    {
        for (int but = 0; but < ( int )BUTTON.NB_BUTTONS; ++but)
        {
            ACTION action = GetActionForButton(( BUTTON )but);

            m_buttons[but].interactable = ((selection & (( ACTION_FLAG )(1 << ( int )action))) != 0);
        }
    }
예제 #2
0
    //****************************************************************************************************
    //
    //****************************************************************************************************

    private void CacheSelection()
    {
        m_deferredSelection.Consume();

        m_picture = (m_items != null) && (m_items.selection != null) ? m_items.selection as string : string.Empty;

        m_possibleActions = GetActionsForSelection();

        EnableActions(m_possibleActions);
    }
예제 #3
0
    //****************************************************************************************************
    //
    //****************************************************************************************************

    private ACTION_FLAG GetActionsForSelection()
    {
        ACTION_FLAG actions = (ACTION_FLAG.UPLOAD | ACTION_FLAG.CANCEL);

        if (string.IsNullOrEmpty(m_picture) == false)
        {
            actions |= ACTION_FLAG.SELECT;

            if (m_picture.CompareTo("NONE") != 0)
            {
                actions |= ACTION_FLAG.DELETE;
            }
        }

        return(actions);
    }