public static IdEncryption StringConstructor(string s) { List <Transformation> lt = s.Split('}').Where(e => e.Length > 0).Select(e => Transformation.StringConstrucor(e + "}")).Where(t => t != null).ToList(); IdEncryption enc = new IdEncryption(lt); return(enc); }
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 button5_Click(object sender, EventArgs e) { SettingDialog sd = new SettingDialog(); DialogResult sdRes = sd.ShowDialog(); if (sdRes == DialogResult.Cancel) { sd.Dispose(); return; } string encryptString = sd.getEncryptionString(); encrypt = IdEncryption.StringConstructor(encryptString); encryptId = sd.getEncryptId(); ambiguousBirthDate = sd.getAmbiguousBirthDate(); bdmod = BirthDateModifier.TypedConstructor(sd.getBirthDateModifyType()); ambiguousPostalCode = sd.getAmbiguousPostalCode(); pcmod = PostalCodeModifier.TypedConstructor(sd.getPostalCodeModifyType()); sd.Dispose(); }