示例#1
0
        //private int tt() {
        //	return 0;
        //}
        //Action aa;// = tt;
        //Object aaa = tt;
        //Func<int> aab;//b; = tt;//object tta = tt;
        private void test(object sender, EventArgs e)         //(object sender, EventArgs e)
        {
            //Small code hack to support the sorting w/o opening pop-up list...
            if ((Control.ModifierKeys & Keys.Control) == Keys.Control)
            {
                //aa = tt;//nudrc(sender, null);
                //aab = tt;
                return;
            }
            //lpnl.Hide();
            //pnl.BackColor = Color.Brown;
            lpnl    = new Panel();
            curList = (ButtonL)sender;
            //sl2.mItems = itemsL[i];
            //sl2.Tb_TextChanged(null, null);
            lpnl.Show();

            sl2.doTableListbox(lpnl, txt, items);
            lpnl.Left      = 300;
            lpnl.Width     = 250;
            lpnl.Top       = 20;
            lpnl.Height    = pnl.Height - 40;
            sl2.lv.Height -= 20;

            Button ok = new Button();

            ok.Left = 0;
            ok.Top  = lpnl.Height - 20;
            //cntAddr.Text = lpnl.Height.ToString();
            ok.Width  = 120;
            ok.Height = 20;
            ok.Text   = "Ok";
            lpnl.Controls.Add(ok);
            ok.Click += okClick;

            Button cancel = new Button();

            cancel.Left   = 120;
            cancel.Top    = lpnl.Height - 20;
            cancel.Width  = 120;
            cancel.Height = 20;
            cancel.Text   = "Cancel";
            lpnl.Controls.Add(cancel);
            cancel.Click += cancelClick;

            //pnl.Controls.Add(sl2);
            pnl.Controls.Add(lpnl);
            lpnl.BringToFront();
            //ok.BringToFront();
        }
示例#2
0
        public Control doCombo(int x, int y, byte[] txt, List <int> items, int offset, int numOfBits)
        //public Control doCombo(int x, int y, string[] items, int offset, int numOfBits)
        {
            if (combo2numeric == 1)
            {
                return(doNud(x, y, offset, numOfBits));
                //return;
            }
            ButtonL bn = new ButtonL();

            bn.doCombo(pnl, x, y, txt, items, buf, entryAddr + offset, numOfBits);
            bn.MouseClick += new MouseEventHandler(nudrc3);
            butls.Add(bn);
            return(bn);
        }