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(); }
public static void setValueInt(string name, Int32 value) { DbConfig.setValue(name, value.ToString()); }
public static void setValueBool(string name, bool value) { DbConfig.setValue(name, value ? "1" : "0"); }