Пример #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            this.Hide();
            var dataEntry = new DataEntryForm();

            dataEntry.Closed += (s, args) => this.Close();
            dataEntry.Show();
        }
Пример #2
0
        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();
        }