//thay đổi từ điển private void btnSwap_Click(object sender, EventArgs e) { if (newDic is DictEV) { newDic = new DictVE(); newDic.load(); var arrayOfAllKeys = newDic.Dic.Keys.ToArray(); var source = new AutoCompleteStringCollection(); source.AddRange(arrayOfAllKeys); txtSearch.AutoCompleteCustomSource = source; btnSwap.Text = "V-E"; // add từ vào thư viện auto complete text return; } if (newDic is DictVE) { newDic = new DictEV(); newDic.load(); var arrayOfAllKeys = newDic.Dic.Keys.ToArray(); var source = new AutoCompleteStringCollection(); source.AddRange(arrayOfAllKeys); txtSearch.AutoCompleteCustomSource = source; btnSwap.Text = "E-V"; return; } }
public Form_History(Idict d) { InitializeComponent(); dic = d; this.TopMost = true; FileStream fs = new FileStream("saveEV.txt", FileMode.Open); StreamReader sr = new StreamReader(fs, Encoding.UTF8); string a = sr.ReadToEnd(); fs.Close(); string[] g = new string[10]; g = a.Split('\n'); string[] q = g.Distinct().ToArray(); o = q; o = o.Where(str => str != "").ToArray(); // xoa khoang trang o cuoi foreach (string ga in o) { listBoxHistory.Items.Add(ga); } //listBoxHistory.Items.AddRange(q); }
public Form_GameWord(Idict a) { InitializeComponent(); dic = a; }
public Form_PhatAm(Idict a) { InitializeComponent(); dic = a; }
public Form_remind(Idict a) { InitializeComponent(); dic = a; }