Пример #1
0
 private void WebRegister_KeyDown(object sender, KeyEventArgs e)
 {
     if ((e.Modifiers & Keys.Control) == Keys.Control && e.KeyCode == Keys.S)
     {
         {
             string name = dataGridView1.SelectedRows[0].Cells["ItemName"].Value.ToString();
             if (name.Length > 0)
             {
                 string result;
                 string result2;
                 TitleSplitForm.Show_Dialog(name, out result);
                 if (result != null && InputBox.Show_Dialog("「" + result + "」の巻数を入力してください", "セット商品支援", "", out result2, ImeMode.Off, HorizontalAlignment.Left)
                     == DialogResult.OK && result2.Length > 0)
                 {
                     name = result + " [" + result2 + "]";
                     dataGridView1.SelectedRows[0].Cells["ItemName"].Value = name;
                 }
                 else
                 {
                     return;
                 }
             }
             else
             {
                 return;
             }
         }
     }
     if ((e.Modifiers & Keys.Control) == Keys.Control && e.KeyCode == Keys.R)
     {
         supplement = !supplement;
         this.label_supplement.Visible = supplement;
     }
 }
Пример #2
0
 private void AddItem_KeyDown(object sender, KeyEventArgs e)
 {
     if ((e.Modifiers & Keys.Control) == Keys.Control && e.KeyCode == Keys.S && text_itemname.Text.Length > 0)
     {
         if (!groupBox_volume.Enabled)
         {
             if (text_itemname.Text.Length > 0)
             {
                 string result;
                 string result2;
                 TitleSplitForm.Show_Dialog(text_itemname.Text, out result);
                 if (InputBox.Show_Dialog("「" + result + "」の巻数を入力してください", "セット商品支援", "", out result2, ImeMode.Off, HorizontalAlignment.Left)
                     == DialogResult.OK && result2.Length > 0)
                 {
                     text_itemname.Text = result + " [" + result2 + "]";
                 }
                 else
                 {
                     return;
                 }
             }
             else
             {
                 return;
             }
         }
         groupBox_volume.Enabled = !groupBox_volume.Enabled;
     }
     else if ((e.Modifiers & Keys.Control) == Keys.Control && e.KeyCode == Keys.C && text_itemname.Text.Length > 0)
     {
         string result;
         if (InputBox.Show_Dialog("コメントを入力してください", "コメント入力", "", out result, ImeMode.On, HorizontalAlignment.Left)
             == DialogResult.OK && result.Length > 0)
         {
             comment = result;
         }
     }
     else if ((e.Modifiers & Keys.Control) == Keys.Control && e.KeyCode == Keys.R)
     {
         supplement = !supplement;
         this.label_supplement.Visible = supplement;
     }
 }