Esempio n. 1
0
        private void OnMenuSplitButtonClick(NEventArgs arg)
        {
            // Get the selected index
            NMenuSplitButton splitButton = (NMenuSplitButton)arg.CurrentTargetNode;
            int selectedIndex            = splitButton.SelectedIndex;

            if (selectedIndex == -1)
            {
                m_EventsLog.LogEvent("No item selected");
                return;
            }

            // Obtain and show the selected enum value
            ENTableBorders selectedSide = (ENTableBorders)splitButton.SelectedValue;

            m_EventsLog.LogEvent("Action button clicked, index: " + selectedIndex.ToString() + " (" +
                                 selectedSide.ToString() + ")");
        }
Esempio n. 2
0
        private void OnMenuSplitButtonSelectedIndexChanged(NValueChangeEventArgs arg)
        {
            // Get the selected index
            int selectedIndex = (int)arg.NewValue;

            if (selectedIndex == -1)
            {
                m_EventsLog.LogEvent("No item selected");
                return;
            }

            // Obtain and show the selected enum value
            NMenuSplitButton splitButton  = (NMenuSplitButton)arg.CurrentTargetNode;
            ENTableBorders   selectedSide = (ENTableBorders)splitButton.SelectedValue;

            m_EventsLog.LogEvent("Selected Index: " + selectedIndex.ToString() + " (" +
                                 selectedSide.ToString() + ")");
        }