public SettingDialog() { InitializeComponent(); SettingData sd = SettingData.load(); if (sd.encryptStrings != null) { sd.encryptStrings.ForEach(es => listBox1.Items.Add(es)); } if (sd.selectedEnc != null) { textBox1.Text = sd.selectedEnc; } checkBox1.Checked = sd.encryptId; checkBox2.Checked = sd.ambiguousBirthDate; checkBox3.Checked = sd.ambiguousPostalCode; string[] bddes = BirthDateModifier.descriptions(); comboBox1.Items.AddRange(bddes); comboBox1.Text = (BirthDateModifier.TypedConstructor(sd.birthDateModifyType)).ToString(); string[] cpdes = PostalCodeModifier.descriptions(); comboBox2.Items.AddRange(cpdes); comboBox2.Text = (PostalCodeModifier.TypedConstructor(sd.postalCodeModifyType)).ToString(); if (textBox1.Text != "") { initialAvailableTransRule_.Add(textBox1.Text); } foreach (string str in listBox1.Items) { initialAvailableTransRule_.Add(str); } }
public Form1() { InitializeComponent(); SettingData sd = SettingData.load(); types_ = sd.types; encrypt = IdEncryption.StringConstructor(sd.selectedEnc); encryptId = sd.encryptId; ambiguousBirthDate = sd.ambiguousBirthDate; ambiguousPostalCode = sd.ambiguousPostalCode; bdmod = BirthDateModifier.TypedConstructor(sd.birthDateModifyType); pcmod = PostalCodeModifier.TypedConstructor(sd.postalCodeModifyType); if (encrypt.isBlank()) { button5_Click(null, null); } }
private void button4_Click(object sender, EventArgs e) { TypeSet ts = new TypeSet(); ts.initialize(); DialogResult tsRes = ts.ShowDialog(); string ftname = ts.selectedFileTypeName(); if (tsRes == DialogResult.Cancel || ftname == null) { ts.Dispose(); return; } ts.Dispose(); SettingData sd = SettingData.load(); this.types_ = sd.types; FileType selft = this.types_[ftname]; for (int i = listBox1.Items.Count - 1; i >= 0; i--) { if (listBox1.GetSelected(i)) { setTypeToList(selft, i); } //選ばれてたtypesが消されてたときの処理 string tn = getTypeNameFromList(listBox1.Items[i].ToString()); if (!this.types_.ContainsKey(tn)) { setTypeToList(null, i); } } listBox1.ClearSelected(); displayProcessableFiles(); }
public void initialize() { sd_ = SettingData.load(); sd_.types.Keys.ToList().ForEach(ftn => listBox1.Items.Add(ftn)); tboxs = new TextBox[] { textBox1, textBox2, textBox3, textBox4, textBox5, textBox6, textBox7, textBox8, textBox9, textBox10 }; }