Beispiel #1
0
        void contextMenu_onElementSelected(ContextMenu.ElementSelectedArgs e)
        {
            switch (e.index)
            {
            case 0:    //undo
                undo();
                break;

            case 1:    //redo
                redo();
                break;

            case 2:    //-----
                break;

            case 3:    //copy
                copy();
                break;

            case 4:    //cut
                cut();
                break;

            case 5:    //paste
                paste();
                break;

            default:
                break;
            }
        }
Beispiel #2
0
        void contextMenu_onElementSelected(ContextMenu.ElementSelectedArgs e)
        {
            contextMenu.isVisible = false;
            curElement.Text       = contextMenu.Elements[e.index].Text;

            if (onElementSelected != null)
            {
                onElementSelected.Invoke(this, curElement.Text);
            }
        }