private void btnAdd_Click(object sender, RoutedEventArgs e) { string key = txtKey.Text; string context = txtInput.Text; string data = ""; check_data chk_Data = new check_data(); bool chkKey = chk_Data.chk_values("KEY", key); if (chkKey == true) { bool chkText = chk_Data.chk_values("TEXT", context); if (chkText == true) { sortedList1.Add(int.Parse(key), context); intitialValuse(); ICollection collection1 = sortedList1.Keys; foreach (int cntkey in collection1) { data = data + sortedList1[cntkey].ToString() + " \n"; } MessageBox.Show(data); //MessageBox.Show(sortedList1[cntkey].ToString()); } } }
private void btnRemove_Click(object sender, RoutedEventArgs e) { string key = txtKey.Text; check_data chk_Data = new check_data(); bool chkKey = chk_Data.chk_values("KEY", key); if (chkKey == true) { hashtable1.Remove(key); intitialValuse(); } }
private void btnAdd_Click(object sender, RoutedEventArgs e) { string key = txtKey.Text; string context = txtInput.Text; check_data chk_Data = new check_data(); bool chkKey = chk_Data.chk_values("KEY", key); if (chkKey == true) { bool chkText = chk_Data.chk_values("TEXT", context); if (chkText == true) { hashtable1.Add(key, context); intitialValuse(); } } //hashtable1.Add("Rockman","X"); //hashtable1.Add("Cat","OnThRoof"); //hashtable1.Add("Dog", "OnThRock"); }