Exemplo n.º 1
0
        private void SetAddInsertTypeMenuItems()
        {
            _addInsertTypeMenuButtons = new Dictionary <MenuButton, bool>();
            MenuButton button;

            button = _contextMenu.AddButton("Inside");
            _addInsertTypeMenuButtons.Add(button, true);

            button = _contextMenu.AddButton("Outside");
            _addInsertTypeMenuButtons.Add(button, false);
        }
Exemplo n.º 2
0
        private void SetLabelTypeMenuItems()
        {
            _labelTypeMenuButtons = new Dictionary <MenuButton, ActiveLabelType>();
            MenuButton button;

            button = _contextMenu.AddButton("Constant");
            _labelTypeMenuButtons.Add(button, ActiveLabelType.Constant);

            button = _contextMenu.AddButton("Variable");
            _labelTypeMenuButtons.Add(button, ActiveLabelType.Variable);

            button = _contextMenu.AddButton("Expression");
            _labelTypeMenuButtons.Add(button, ActiveLabelType.Expression);

            if (_setLabelTarget.ValueType == ValueType.Bool)
            {
                button = _contextMenu.AddButton("Condition");
                _labelTypeMenuButtons.Add(button, ActiveLabelType.Condition);
            }

            if (_setLabelTarget.Value is IExpression || _setLabelTarget.Value is Condition)
            {
                button = _contextMenu.AddButton("Operation");
                _labelTypeMenuButtons.Add(button, ActiveLabelType.Operation);
            }
        }