コード例 #1
0
        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);
            }
        }
コード例 #2
0
        public OptionForm(JsonSetting setting)
        {
            InitializeComponent();

            resultSetting = new JsonSetting();
        }