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(); } }
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(); } }