Ejemplo n.º 1
0
        private void btnSearch_Click(object sender, EventArgs e)
        {
            DialogInlineSearch search = new DialogInlineSearch();

            search.SetBounds(this.PointToScreen(Point.Empty).X, this.btnOK.PointToScreen(Point.Empty).Y - 15, search.Bounds.Width, search.Bounds.Height);
            if (search.ShowDialog() == DialogResult.OK)
            {
                Console.WriteLine(" => " + search.keyword);
            }
        }
Ejemplo n.º 2
0
        private void DialogSelectComp_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar.ToString().Length > 0)
            {
                DialogInlineSearch search = new DialogInlineSearch(e.KeyChar.ToString());
                search.SetBounds(this.PointToScreen(Point.Empty).X, this.btnOK.PointToScreen(Point.Empty).Y - 15, search.Bounds.Width, search.Bounds.Height);

                if (search.ShowDialog() == DialogResult.OK)
                {
                    Console.WriteLine(" ==> " + search.keyword);
                }
            }
        }