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 { } }
void _hookMouse_OnMouseActivity(object sender, MouseEventArgs e) { if (e.Clicks > 0) { if (ChooseList.IsShow && !ChooseList.Bound.Contains(e.Location)) { this.FindForm().Focus(); ChooseList.HideSelf(); this.UnInstallHook(); } else if (PWCitysPanel.IsShow && !PWCitysPanel.Bound.Contains(e.Location)) { this.FindForm().Focus(); PWCitysPanel.HideSelf(); this.UnInstallHook(); } } }