private void btnLoadParametersFromFile_Click(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); ofd.InitialDirectory = ""; ofd.Filter = "App Configuration Files | *.json"; ofd.DefaultExt = "json"; ofd.RestoreDirectory = true; if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK) { app_settings = MyAppSettings.Load(ofd.FileName); RestoreDataFromControlForm(); UpdateControlForm(); //updateControlVariables(); } }
public ControlForm() { app_settings = MyAppSettings.Load(); InitializeComponent(); }