Ejemplo n.º 1
0
        private void OnButtonSelected(object sender, EventArgs e)
        {
            // Cast to correct type
            ButtonSpecHeaderGroup spec = (ButtonSpecHeaderGroup)sender;

            // Make it the selected button spec
            propertyGrid.SelectedObject = spec;

            UpdateActionButtons();
        }
Ejemplo n.º 2
0
        private void ButtonSpecPluginClick(object sender, EventArgs e)
        {
            ButtonSpecHeaderGroup hg = sender as ButtonSpecHeaderGroup;
            DataPlugin            ip = hg.Tag as DataPlugin;

            if (ip != null)
            {
                this.ExecutePlugin(ip);
            }
        }
Ejemplo n.º 3
0
        private void kryptonButtonRemove_Click(object sender, EventArgs e)
        {
            // Get access to the selected button spec
            ButtonSpecHeaderGroup spec = (ButtonSpecHeaderGroup)propertyGrid.SelectedObject;

            // Remove just the selected button spec
            kryptonHeaderGroup1.ButtonSpecs.Remove(spec);

            // Nothing selected in the property grid
            propertyGrid.SelectedObject = null;

            UpdateActionButtons();
        }
Ejemplo n.º 4
0
        private void kryptonButtonAdd_Click(object sender, EventArgs e)
        {
            // Create a new button spec entry
            ButtonSpecHeaderGroup spec = new ButtonSpecHeaderGroup();

            spec.Type = PaletteButtonSpecStyle.Close;

            // Need to know when button is selected
            spec.Click += new EventHandler(OnButtonSelected);

            // Add to end of the collection of button specs
            kryptonHeaderGroup1.ButtonSpecs.Add(spec);

            // Make it the selected button spec
            propertyGrid.SelectedObject = spec;

            UpdateActionButtons();
        }