Beispiel #1
0
        private void button_ok_Click(object sender, EventArgs e)
        {
            if (!Globals.isValidBarcodePrefix(this.textBox_barcode.Text))
            {
                MessageBox.Show("バーコード識別子が不正です。0-9の数字を2文字指定してください。");
                this.textBox_barcode.SelectAll();
                this.textBox_barcode.Focus();
                return;
            }

            DbConfig.setValue("bumonname", this.textBox_bumon.Text);
            DbConfig.setValue("companyname", this.textBox_company.Text);
            DbConfig.setValueInt("symbolcolor_argb", this.pictureBox1.BackColor.ToArgb());
            DbConfig.setValueInt("bumontextcolor_argb", this.pictureBox2.BackColor.ToArgb());
            DbConfig.setValue("barcodeprefix", this.textBox_barcode.Text);
            DbConfig.setValueBool("itemname_imeon", this.checkBox_imeon.Checked);
            DbConfig.setValueBool("entertotab", this.checkBox_entertotab.Checked);

            this.DialogResult = DialogResult.OK;
            this.Close();
        }
Beispiel #2
0
 public static void setValueInt(string name, Int32 value)
 {
     DbConfig.setValue(name, value.ToString());
 }
Beispiel #3
0
 public static void setValueBool(string name, bool value)
 {
     DbConfig.setValue(name, value ? "1" : "0");
 }