private void InitializeComponentValue() { OptionsForm option = DataMemory.ReviewOptionForm(); if (option == null) { return; } SetInputPath(option.XlsxSrcPath); SetOutputPath(option.XlsxDstPath); foreach (ExportType type in option.ExporterList) { foreach (object obj in this.groupBox2.Controls) { if (!(obj is CheckBox)) { continue; } CheckBox b = obj as CheckBox; ExportType t = b.Text.ToEnum <ExportType>(); if (type == t) { b.Checked = true; } } } DataMemory.SetOptionForm(option); }