示例#1
0
        void hook_KeyPressed(object sender, KeyPressedEventArgs e)
        {
            Thread.Sleep(10);
            SendKeys.Send("^(c)");
            //SendKeys.SendWait("^(c)");



            strClip = Clipboard.GetText().Trim().ToLower();
            Clipboard.Clear();

            if (strClip != "")
            {
                if (newDic.search(strClip) != "Không tìm thấy từ này !")
                {
                    Form_Information fi = new Form_Information(strClip, newDic.search(strClip));
                    fi.Show();
                }
                else
                {
                    Form_Ask fa = new Form_Ask();
                    fa.Show();
                }
            }
            else
            {
                MessageBox.Show("SCAN NO TEXT !\n Try again!");
            }
        }
示例#2
0
        //search từ
        private void btnSearch_Click(object sender, EventArgs e)
        {
            if (txtSearch.Text != "")
            {
                string RESULT = txtSearch.Text.ToString().ToLower();
                if (newDic.search(RESULT) != "Không tìm thấy từ này !")
                {
                    Thread thr = new Thread(downloadImage);
                    if (_mode == 0)   // chế độ online
                    {
                        thr.Start();
                    }
                    else
                    {
                        LoadImage(RESULT);
                    }
                    Form_Information fi = new Form_Information(RESULT, newDic.search(RESULT));
                    fi.Show();
                }
                else
                {
                    Form_Ask fa = new Form_Ask();
                    fa.Show();
                }



                // load hình từ url ra form
            }
            else
            {
                MessageBox.Show("Please enter text !");
            }
        }
示例#3
0
        private void listBoxHistory_DoubleClick(object sender, EventArgs e)
        {
            Form_Information fi = new Form_Information(listBoxHistory.Text.ToString().TrimEnd(), dic.search(listBoxHistory.Text.ToString().TrimEnd()));

            fi.Show();
        }