Beispiel #1
0
 protected override void OnMouseUp(MouseEventArgs e)
 {
     base.OnMouseUp(e);
     try
     {
         if (!this.DesignMode)
         {
             this.MouseIcon = EMouseState.MouseUp;
             if (e.Button == MouseButtons.Left && this.IconRect.Contains(e.Location))
             {
                 ChooseList.HideSelf();
                 PWCitysPanel.Show(this);
                 this.InstallHook();
             }
         }
     }
     catch { }
 }
Beispiel #2
0
        public static string Show(Control owner)
        {
            if (owner == null)
            {
                throw new Exception("owner is null!");
            }
            Self._owner = owner;
            int xPos = owner.RectangleToScreen(Rectangle.Empty).X;
            int yPos = owner.RectangleToScreen(Rectangle.Empty).Y + Self._owner.Height + 5;

            Self.TopMost = true;
            if (!Self.Visible)
            {
                Self.Show();
            }
            Self.Location = new Point(xPos, yPos);
            owner.Select();
            return(string.Empty);
        }