Ejemplo n.º 1
0
        private void mi_createEventFireMethod(object sender, EventArgs e)
        {
            EventPath ep = this.Parent as EventPath;

            if (ep != null)
            {
                ClassPointer root = ep.Panes.Loader.GetRootId();
                EventClass   ec   = this.CustomEvent;
                if (ec.ClassId == root.ClassId)
                {
                    root.CreateFireEventAction(ec, ep.Panes.Loader.Writer, null, ep.FindForm());
                }
            }
        }
Ejemplo n.º 2
0
        void mnu_remove(object sender, EventArgs e)
        {
            EventPath ep = this.Parent as EventPath;

            if (ep != null)
            {
                ClassPointer     root = ep.Panes.Loader.GetRootId();
                PropertyOverride po   = Property as PropertyOverride;
                if (po == null)
                {
                    throw new DesignerException("Overriden property is not found. [{0}]", Property);
                }
                if (MessageBox.Show(ep.FindForm(), "Do you want to remove the override of this property?", "Property", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.Yes)
                {
                    root.DeleteProperty(po);
                }
            }
        }