Пример #1
0
        public Form1()
        {
            // Required for Windows Form Designer support
            InitializeComponent();

            // Setup SmartTag and associated ContextMenu
            ContextMenu ctxm = new ContextMenu();
            ctxm.MenuItems.Add("Foo", new EventHandler(HandleCtxMenuItemClick));
            ctxm.MenuItems.Add("Bar", new EventHandler(HandleCtxMenuItemClick));
            ctxm.MenuItems.Add("Qux", new EventHandler(HandleCtxMenuItemClick));

            this.smartTag = new PhysicsIllustrator.SmartTag.SmartTag(this);
            this.smartTag.ContextMenu = ctxm;

            this.Controls.Add(this.smartTag);
        }
Пример #2
0
        public Form1()
        {
            // Required for Windows Form Designer support
            InitializeComponent();

            // Setup SmartTag and associated ContextMenu
            ContextMenu ctxm = new ContextMenu();

            ctxm.MenuItems.Add("Foo", new EventHandler(HandleCtxMenuItemClick));
            ctxm.MenuItems.Add("Bar", new EventHandler(HandleCtxMenuItemClick));
            ctxm.MenuItems.Add("Qux", new EventHandler(HandleCtxMenuItemClick));

            this.smartTag             = new PhysicsIllustrator.SmartTag.SmartTag(this);
            this.smartTag.ContextMenu = ctxm;

            this.Controls.Add(this.smartTag);
        }