Esempio n. 1
0
 private void MiAddStock_Click(object sender, EventArgs e)
 {
     FrmFilter frmFilter = new FrmFilter("添加/查找股票...", "加入/定位(&S)", string.Empty);
     if (frmFilter.ShowDialog(this) == DialogResult.OK
     && FrmStockEdit.NewAddedStock != null
     ) {
         MutexObject.Set();
         InitThMarquee();
     } else if (frmFilter.StockTag != null)
         GvMainSelectRow(frmFilter.StockTag);
 }
Esempio n. 2
0
 private void GvMain_KeyPress(object sender, KeyPressEventArgs e)
 {
     int keyValue = e.KeyChar;
     if (
         (keyValue >= 48 && keyValue <= 57)
         || (keyValue >= 65 && keyValue <= 90)
         || (keyValue >= 96 && keyValue <= 105)
         || (keyValue >= 97 && keyValue <= 122)
         || keyValue == 106
         ) {
         FrmFilter frmFilter = new FrmFilter("添加/查找股票...", "加入/定位(&S)", e.KeyChar.ToString());
         if (frmFilter.ShowDialog(this) == DialogResult.OK
         && FrmStockEdit.NewAddedStock != null
         ) {
             MutexObject.Set();
             InitThMarquee();
         } else if (frmFilter.StockTag != null)
             GvMainSelectRow(frmFilter.StockTag);
     }
 }