private void initControls()
        {
            PropertyGrid = new PropertyDescriptorListEditor();
            List <PropertyDescriptor> pList = Descriptor.getPropertySet();

            PropertyGrid.PropertyList = pList;



            PropertyGrid.addOtherProperty("Type", "\tBasic", Descriptor.TypeDescriptorInFileManager.Name).PropIsReadOnly = true;

            PropertyGrid.PropertyAdapter.PropertyValueChanged += (s, a) =>
            {
            };

            editScriptsAction = new AddRemoveInstanceScriptsAction(Descriptor, this);
            ToolStripItems.Add(editScriptsAction.generateControl());
            //ToolStripContentPanel

            deleteAction = new DeleteInstanceAction(Descriptor);
            ToolStripItems.Add(deleteAction.generateControl <ToolStripButton>());



            refreshScripts();
        }
Exemple #2
0
        private void initControls()
        {
            WhiskeyPropertyListGrid.PropertyList = Descriptor.getPropertySet();

            remPropertyActions = new List <WhiskeyAction>();

            WhiskeyPropertyListGrid.PropertyAdapter.PropertyValueChanged += updateFile;
            WhiskeyPropertyListGrid.PropertyGrid.PropertyValueChanged    += updateFile;


            addPropertyAction = new AddPropertyAction(Descriptor, WhiskeyPropertyListGrid);
            ToolStripItems.Add(addPropertyAction.generateControl <ToolStripButton>());


            dropDownBtn = new ToolStripDropDownButton("Remove", Assets.AssetManager.ICON_MINUS);


            //updateItems();

            // dropDownBtn.DropDownItems.Add(removeBox);
            dropDownBtn.DropDownDirection = ToolStripDropDownDirection.BelowRight;
            dropDownBtn.DropDown.AutoSize = false;
            dropDownBtn.DropDown.Width    = 200;

            dropDownOpeningHandler = new EventHandler(onDropDownOpening);
            propRemovedHandler     = new PropertyRemovedEventHandler(onPropRemoved);


            dropDownBtn.DropDownOpening += dropDownOpeningHandler;
            // Descriptor.PropertyRemoved += propRemovedHandler;
            //removeBox.Alignment = ToolStripItemAlignment.Right;
            //removeBox.ImageIndex = 1;
            //removeBox.DropDownStyle = ComboBoxStyle.DropDownList;
            ToolStripItems.Add(dropDownBtn);

            editScriptsAction = new AddRemoveTypeScriptsAction(Descriptor, this);
            ToolStripItems.Add(editScriptsAction.generateControl());
        }