Exemplo n.º 1
0
        public ConstantEditor()
        {
            InitializeComponent();

            ConstantTypes.Items.Add(new NoneOperandEditor());
            ConstantTypes.Items.Add(new NullOperandEditor());
            ConstantTypes.Items.Add(new BooleanEditor());
            ConstantTypes.Items.Add(new ByteEditor());
            ConstantTypes.Items.Add(new SByteEditor());
            ConstantTypes.Items.Add(new ShortEditor());
            ConstantTypes.Items.Add(new UShortEditor());
            ConstantTypes.Items.Add(new IntegerEditor());
            ConstantTypes.Items.Add(new UIntegerEditor());
            ConstantTypes.Items.Add(new LongEditor());
            ConstantTypes.Items.Add(new ULongEditor());
            ConstantTypes.Items.Add(new SingleEditor());
            ConstantTypes.Items.Add(new DoubleEditor());

            var stringEditor         = new StringEditor();
            var verbatimStringEditor = new VerbatimStringEditor();
            var bridge = new OperandEditorBridge <string>(stringEditor, verbatimStringEditor);

            Disposed += delegate { bridge.Dispose(); };

            ConstantTypes.Items.Add(stringEditor);
            ConstantTypes.Items.Add(verbatimStringEditor);

            ConstantTypes.SelectedIndex = 0;
        }
Exemplo n.º 2
0
        public CustomAttributeArgumentEditor()
        {
            InitializeComponent();

            TypeSpecification.Items.Add(Editors.TypeSpecification.Default);
            if (AllowArray)
            {
                TypeSpecification.Items.Add(Editors.TypeSpecification.Array);
            }
            TypeSpecification.SelectedIndex = 0;

            ArgumentTypes.Items.Add(new NullOperandEditor());
            ArgumentTypes.Items.Add(new BooleanEditor());
            ArgumentTypes.Items.Add(new ByteEditor());
            ArgumentTypes.Items.Add(new SByteEditor());
            ArgumentTypes.Items.Add(new IntegerEditor());
            ArgumentTypes.Items.Add(new LongEditor());
            ArgumentTypes.Items.Add(new SingleEditor());
            ArgumentTypes.Items.Add(new DoubleEditor());

            var stringEditor         = new StringEditor();
            var verbatimStringEditor = new VerbatimStringEditor();
            var bridge = new OperandEditorBridge <string>(stringEditor, verbatimStringEditor);

            Disposed += delegate { bridge.Dispose(); };

            ArgumentTypes.Items.Add(stringEditor);
            ArgumentTypes.Items.Add(verbatimStringEditor);

            ArgumentTypes.Items.Add(new TypeReferenceEditor());

            ArgumentTypes.SelectedIndex = 0;
        }