private void button2_Click(object sender, EventArgs e) { string k = textBox1.Text.Trim(); if (k != "" && listBox1.Items.IndexOf(k) < 0) { this.listBox1.Items.Add(k); Evt.AddNewsKey(k); AddKeyToFile(k); textBox1.Text = ""; textBox1.Focus(); listBox1.SelectedIndex = 0; } }
private void AddTabs() { KeysHelper kh = new KeysHelper(); string[] keys = kh.GetAllText("keys"); if (keys != null && keys.Length > 0) { foreach (string k in keys) { if (!string.IsNullOrEmpty(k)) { Evt.AddNewsKey(k); } } } }