Beispiel #1
0
        private void testBTN_Click(object sender, EventArgs e)
        {
            int[] arr = new int[6];

            foreach (var x in checkedListBox1.CheckedIndices)
            {
                int temp = (int)x;
                //MessageBox.Show(temp.ToString());
                arr[temp] = 1;
            }

            JArray array = new JArray();

            foreach (int x in arr)
            {
                array.Add(x);
            }

            JObject newBell = new JObject();

            //newBell.Add("id", listBox1.Items.Count);
            newBell.Add("hour", dateTimePicker1.Value.Hour.ToString("D2"));
            newBell.Add("minute", dateTimePicker1.Value.Minute.ToString("D2"));
            newBell.Add("days", array);

            Data_Manipulation.Write_JObject_Data_ToFile(newBell);
            WriteBellData_ToList();

            //MessageBox.Show(newRing);
            //WriteBellData();
        }
Beispiel #2
0
        private void button4_Click(object sender, EventArgs e)
        {
            JObject jobj = new JObject();

            jobj.Add("id", "vitaly");
            Data_Manipulation.Write_JObject_Data_ToFile(jobj);
            //WriteBellData_ToList();
        }