コード例 #1
0
ファイル: CityTextBox.cs プロジェクト: mythslove/12306-1
 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();
         }
     }
 }
コード例 #2
0
ファイル: CityTextBox.cs プロジェクト: mythslove/12306-1
 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 { }
 }
コード例 #3
0
ファイル: PWCitysPanel.cs プロジェクト: mythslove/12306-1
 void lblHotCity_Click(object sender, EventArgs e)
 {
     if (sender is Label)
     {
         Label label = sender as Label;
         if (label.Tag != null && label.Tag is string[])
         {
             string[] array = label.Tag as string[];
             if (this._owner != null && this._owner is CityTextBox)
             {
                 CityTextBox textBox = this._owner as CityTextBox;
                 textBox.SetText(array[1]);
                 textBox.Tag = array[2];
             }
             PWCitysPanel.HideSelf();
         }
     }
 }