Beispiel #1
0
        private void Lbl_MouseClick(object sender, MouseEventArgs e)
        {
            MyLabel lbl   = (MyLabel)sender;
            int     index = tabCtrlMain.SelectedIndex;

            if (index < 0 && index >= lstCtrlBrowser.Count)
            {
                return;
            }
            MenuBrowser menuBrowser = (MenuBrowser)lbl.Tag;
            CtrlBrowser ctrlBrowser = lstCtrlBrowser[index];

            if (!ctrlBrowser.GetIsLoadedForFirstTime())
            {
                return;
            }
            int i = 0;

            while (!ctrlBrowser.GetCanCopy() && i < 400)
            {
                Thread.Sleep(10);
                i++;
            }
            if (ctrlBrowser.GetCanCopy())
            {
                this.last_command           = menuBrowser.Command;
                this.isCopyWithoutTranslate = true;
                ctrlBrowser.webBrowser.Copy();
            }
        }
Beispiel #2
0
        private void LblMyCopy_MouseClick(object sender, MouseEventArgs e)
        {
            int index = tabCtrlMain.SelectedIndex;

            if (index < 0 && index >= lstCtrlBrowser.Count)
            {
                return;
            }

            CtrlBrowser ctrlBrowser = lstCtrlBrowser[index];

            if (ctrlBrowser.GetCanCopy())
            {
                this.last_command           = ContextMenuCommand.CMD_MY_COPY;
                this.isCopyWithoutTranslate = true;
                ctrlBrowser.webBrowser.Copy();
            }
        }