private void Magic_DoubleClick(object sender, EventArgs e) { FrmItemSelect itemSelectForm = new FrmItemSelect(); itemSelectForm.ShowDialog(); if (itemSelectForm.SelectedItemName != "") { ((TextBox)sender).Text = itemSelectForm.SelectedItemName; ((TextBox)sender).Tag = itemSelectForm.SelectedItemCode; } }
private void Item_DoubleClick(object sender, EventArgs e) { FrmItemSelect itemSelectForm = new FrmItemSelect(); this.Activated -= frmRoleInfo_Activated; itemSelectForm.ShowDialog(); if (itemSelectForm.SelectedItemName != "") { ((TextBox)sender).Text = itemSelectForm.SelectedItemName; ((TextBox)sender).Tag = itemSelectForm.SelectedItemCode; } this.Activated += frmRoleInfo_Activated; }