Inheritance: System.Windows.Forms.Form
Exemplo n.º 1
0
        private void ShowList()
        {
            if (ListOpening != null)
            {
                ListOpening.Invoke(this, null);
            }
            isOpened            = true;
            topForm             = new TpTopMostForm();
            topForm.Deactivate += (sender, args) => HideList();
            int   a = topForm.Height;
            int   b = Screen.PrimaryScreen.Bounds.Height;
            Point c = PointToScreen(new Point(0, Height));

            topForm.Controls.Add(_innerList);

            _innerList.Location = new Point(0, 0);
            bool t = _innerList.Focus();

            topForm.Size = _innerList.Size;

            if (PointToScreen(new Point(0, Height)).Y + topForm.Height > Screen.PrimaryScreen.Bounds.Height)
            {
                topForm.Location = PointToScreen(new Point(0, -topForm.Height));
            }
            else
            {
                topForm.Location = PointToScreen(new Point(0, Height));
            }

            mouseHook.SetHook();
            topForm.ShowDialog();
        }
Exemplo n.º 2
0
 private void HideList()
 {
     mouseHook.RemoveHook();
     isOpened = false;
     if (topForm != null)
     {
         topForm.Close();
         topForm = null;
     }
 }
Exemplo n.º 3
0
		private void ShowList()
		{
			if (ListOpening != null)
				ListOpening.Invoke(this, null);
			isOpened = true;
			topForm = new TpTopMostForm();
			topForm.Deactivate += (sender, args) => HideList();
			int a = topForm.Height;
			int b = Screen.PrimaryScreen.Bounds.Height;
			Point c = PointToScreen(new Point(0, Height));
			topForm.Controls.Add(_innerList);

			_innerList.Location = new Point(0, 0);
			bool t = _innerList.Focus();
			topForm.Size = _innerList.Size;

			if (PointToScreen(new Point(0, Height)).Y + topForm.Height > Screen.PrimaryScreen.Bounds.Height)
				topForm.Location = PointToScreen(new Point(0, -topForm.Height));
			else
				topForm.Location = PointToScreen(new Point(0, Height));

			mouseHook.SetHook();
			topForm.ShowDialog();
		}		
Exemplo n.º 4
0
		private void HideList()
		{
			mouseHook.RemoveHook();
			isOpened = false;
			if (topForm != null)
			{
				topForm.Close();
				topForm = null;
			}
		}