コード例 #1
0
 private void dg_ProductDetailsSO_KeyDown(object sender, KeyEventArgs e)
 {
     if (dg_ProductDetailsSO.CurrentCell.ColumnIndex == 1)
     {
         if (e.Modifiers == Keys.Alt && e.KeyCode == Keys.F2)
         {
             ColorAdd cA = new ColorAdd();
             cA.ShowDialog();
             this.dg_ProductDetailsSO.CurrentRow.Cells[1].Value = cA.cCode;
             this.dg_ProductDetailsSO.CurrentRow.Cells[2].Value = cA.cColor;
         }
     }
     if (dg_ProductDetailsSO.CurrentCell.ColumnIndex == 3)
     {
         if (e.Modifiers == Keys.Alt && e.KeyCode == Keys.F2)
         {
             SearchSize ss = new SearchSize();
             ss.ShowDialog();
             this.dg_ProductDetailsSO.CurrentRow.Cells[3].Value = ss.sCode;
             this.dg_ProductDetailsSO.CurrentRow.Cells[4].Value = ss.sSize;
         }
     }
     if (dg_ProductDetailsSO.CurrentCell.ColumnIndex == 5)
     {
         if (e.Modifiers == Keys.Alt && e.KeyCode == Keys.F2)
         {
             SearchQuality searchQuality = new SearchQuality();
             searchQuality.ShowDialog();
             this.dg_ProductDetailsSO.CurrentRow.Cells[5].Value = searchQuality.qCode;
             this.dg_ProductDetailsSO.CurrentRow.Cells[6].Value = searchQuality.qQuality;
         }
     }
 }
コード例 #2
0
 private void txt_ColorCode_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.Modifiers == Keys.Alt && e.KeyCode == Keys.F2)
     {
         ColorAdd cA = new ColorAdd();
         cA.ShowDialog();
         this.txt_ColorCode.Text = cA.cCode;
         this.txt_Color.Text     = cA.cColor;
     }
     if (e.Modifiers == Keys.Alt && e.KeyCode == Keys.F)
     {
         fetch();
     }
 }