public JsonForm() { InitializeComponent(); optionsPanel.FlowDirection = FlowDirection.TopDown; for (int i = 1; i <= 10; i++) { var optionCtrl = new RadioButton(); optionCtrl.Text = $"Option {i}"; optionsPanel.Controls.Add(optionCtrl); } optionsPanel.ResumeLayout(); string json = null; using (var settingReader = new StreamReader(File.OpenRead("settings.json"))) { json = settingReader.ReadToEnd(); setting = JsonConvert.DeserializeObject <JsonSetting>(json); } }
public OptionForm(JsonSetting setting) { InitializeComponent(); resultSetting = new JsonSetting(); }