Пример #1
0
        void DropDown_Click(object sender, EventArgs e)
        {
            if (Popup == null)
            {
                Popup = new ContextMenuStripEx();
                m_disposeList.Add(Popup);
            }
            Popup.Items.Clear();
            var mb = new MenuBuilder();

            foreach (var tbl in Node.Designer.Frame.Tables)
            {
                int weight = 0;
                foreach (var col in tbl.Columns)
                {
                    mb.AddItem(
                        tbl.AliasOrName + "/" + col.ColumnName,
                        new ColumnHandler {
                        Table = tbl.AliasOrName, Column = col.ColumnName, Edit = Edit
                    }.Click,
                        weight);
                    weight++;
                }
            }
            if (m_supportsVars)
            {
                mb.AddItem("s_variable", InsertVariable, CoreIcons.variable);
            }

            mb.AddObject(this);
            mb.GetMenuItems(Popup.Items);
            Popup.Show(DropDown, new Point(0, DropDown.Height));
        }
Пример #2
0
        protected override void OnMouseDown(MouseEventArgs e)
        {
            base.OnMouseDown(e);

            ContextMenuStripEx menu = new ContextMenuStripEx();
            MenuBuilder        mb   = new MenuBuilder();

            mb.AddObject(this);
            mb.GetMenuItems(menu.Items);
            menu.Show(PointToScreen(new Point(0, Height)));
        }
Пример #3
0
 private void panCols_MouseUp(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Right && m_hightlightedColName >= 0)
     {
         var menu = new ContextMenuStripEx();
         var mb   = new MenuBuilder();
         mb.AddObject(new QueryDesignColumnPopupMenu(this, m_hightlightedColName));
         mb.GetMenuItems(menu.Items);
         menu.Show(this, e.Location);
     }
 }
Пример #4
0
        void CtrlButton_Click(object sender, EventArgs e)
        {
            if (Popup == null)
            {
                Popup = new ContextMenuStripEx();
                m_disposeList.Add(Popup);
            }
            Popup.Items.Clear();
            var mb = new MenuBuilder();

            mb.AddObject(this);
            mb.GetMenuItems(Popup.Items);
            Popup.Show(CtrlButton, new Point(0, CtrlButton.Height));
        }