private void button3_Click(object sender, EventArgs e) { this.Hide(); var dataEntry = new DataEntryForm(); dataEntry.Closed += (s, args) => this.Close(); dataEntry.Show(); }
private void btnSave_Click(object sender, EventArgs e) { string json = File.ReadAllText("map_beac_paints.json"); dynamic jsonObj = Newtonsoft.Json.JsonConvert.DeserializeObject(json); jsonObj["telegram"]["Port"] = txtPort.Text.ToString(); jsonObj["telegram"]["chatID"] = txtChatId.Text.ToString(); string output = Newtonsoft.Json.JsonConvert.SerializeObject(jsonObj, Newtonsoft.Json.Formatting.Indented); File.WriteAllText("map_beac_paints.json", output); MessageBox.Show("Submitted Successfully"); this.Hide(); var dataEntry = new DataEntryForm(); dataEntry.Closed += (s, args) => this.Close(); dataEntry.Show(); }