Esempio n. 1
0
 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();
         }
     }
 }
Esempio n. 2
0
 protected override void OnMouseUp(MouseEventArgs e)
 {
     base.OnMouseUp(e);
     if (this.ContentBound.Contains(e.Location))
     {
         foreach (ChooseListItem item in this.Items)
         {
             if (item.Bounds.Contains(e.Location) && item.MouseState == EMouseState.MouseDown)
             {
                 if (Owner != null && Owner is CityTextBox)
                 {
                     CityTextBox textBox = Owner as CityTextBox;
                     textBox.SetText(item.Text);
                     textBox.Tag = (item.Tag as City).code;
                     textBox.FindForm().Activate();
                     HideSelf();
                 }
                 this.OnSelectedItem(new SelectedItemEventArgs(item.Tag));
             }
             item.MouseState = EMouseState.Normal;
         }
     }
 }