Exemplo n.º 1
0
        void Init()
        {
            default_peice = new SimpleImagePeice("Images/breadboard_back.png");

            AddNewThing      = new ContextMenuStrip();
            ContextMenuStrip = new ContextMenuStrip();
            ToolStripItem     tsi = ContextMenuStrip.Items.Add("Click Me");
            ToolStripMenuItem sub = tsi as ToolStripMenuItem;

            sub          = ContextMenuStrip.Items.Add("Drop List") as ToolStripMenuItem;
            sub.DropDown = AddNewThing;
        }
Exemplo n.º 2
0
        void Board_MouseMove(object sender, MouseEventArgs e)
        {
            ComputeCursor(e);

            if (Dragging && !CursorDelta.IsEmpty)
            {
                // UPdate the position of the neuron.
                Origin = Point.Add(Origin, CursorDelta);
                Cursor = Point.Subtract(Cursor, CursorDelta);
                Refresh();
            }
            else
            if (e.Button == MouseButtons.Right)
            {
                Peice p = null;                // FindPeice( ref Cursor );
                if (p != null)
                {
                    ContextMenu menu = new ContextMenu();
                    menu.MenuItems.Add(new MenuItem("CLick me", onClickMe));
                }
            }

            //base.OnMouseMove(e);
        }