示例#1
0
        //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;
            }
        }
示例#2
0
        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);
        }
示例#3
0
 public Form_GameWord(Idict a)
 {
     InitializeComponent();
     dic = a;
 }
示例#4
0
 public Form_PhatAm(Idict a)
 {
     InitializeComponent();
     dic = a;
 }
示例#5
0
 public Form_remind(Idict a)
 {
     InitializeComponent();
     dic = a;
 }