SVN r1162

SVN-Revision: r1162
This commit is contained in:
cyf
2026-05-09 07:56:18 +00:00
parent a3e194911d
commit 6f97314c83
5 changed files with 25 additions and 6 deletions
@@ -116,4 +116,12 @@ namespace Lskj.Control.BrowserSetting
else if (message.Name.Equals("SelectPro")) else if (message.Name.Equals("SelectPro"))
{ {
string arg0 = message.Arguments.GetString(0); string arg0 = message.Arguments.GetString(0);
if (frmWebBrowser != null && frmWebBrowser.Parent != null && frmWebBrowser.Parent.Parent != null && frmWebBrowser.Parent.Parent is BaseForm string arg1 = message.Arguments.GetString(1);
bool isclose = arg1!=null&&!string.IsNullOrWhiteSpace(arg1) && arg1.Equals("1") ? true : false;
if (frmWebBrowser != null && frmWebBrowser.Parent != null && frmWebBrowser.Parent.Parent != null && frmWebBrowser.Parent.Parent is BaseForm baseForm)
{
if (baseForm.InvokeRequired)
{
baseForm.Invoke(new Action(() =>
{
BsOpenModuleHandler.AddReturn
@@ -53,11 +53,19 @@ namespace Lskj.Control.BrowserSetting
{ {
//弹出当前网址 //弹出当前网址
string NUrl = browser.GetMainFrame().Url + ""; string NUrl = browser.GetMainFrame().Url + "";
if (string.IsNullOrWhiteSpace(NUrl))
{
MessageBox.Show("地址还未加载");
}
else
{
MessageBox.Show(string.Format("Url:{0}已复制到粘贴板", NUrl)); MessageBox.Show(string.Format("Url:{0}已复制到粘贴板", NUrl));
System.Windows.Forms.Clipboard.SetText(NUrl); System.Windows.Forms.Clipboard.SetText(NUrl);
} }
} }
}
catch (Exception ex) catch (Exception ex)
{ {
MessageBox.Show(ex.Message); MessageBox.Show(ex.Message);
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms;
using Xilium.CefGlue; using Xilium.CefGlue;
namespace Lskj.Control.BrowserSetting namespace Lskj.Control.BrowserSetting
@@ -23,5 +24,6 @@ namespace Lskj.Control.BrowserSetting
{ {
base.OnBeforeClose(browser); base.OnBeforeClose(browser);
} }
} }
} }
@@ -64,10 +64,11 @@ namespace Lskj.Control.BrowserSetting
outexception = null; outexception = null;
outtrn = true; outtrn = true;
} }
else if (name == "SelectPro" && arguments.Length == 1) else if (name == "SelectPro" && arguments.Length == 2)
{ {
CefProcessMessage cefProcessMessage = CefProcessMessage.Create("SelectPro"); CefProcessMessage cefProcessMessage = CefProcessMessage.Create("SelectPro");
cefProcessMessage.Arguments.SetString(0, arguments[0].GetStringValue()); cefProcessMessage.Arguments.SetString(0, arguments[0].GetStringValue());
cefProcessMessage.Arguments.SetString(1, arguments[1].GetStringValue());
V8Context.GetFrame().SendProcessMessage(CefProcessId.Browser, cefProcessMessage); V8Context.GetFrame().SendProcessMessage(CefProcessId.Browser, cefProcessMessage);
outreturnValue = CefV8Value.CreateUndefined(); outreturnValue = CefV8Value.CreateUndefined();
outexception = null; outexception = null;
@@ -23,4 +23,4 @@ namespace Lskj.Control.BrowserSetting
native function OpenModule(); native function OpenModule();
return OpenModule(menuId, menuName, dllName, modelFlag, urlParams); return OpenModule(menuId, menuName, dllName, modelFlag, urlParams);
}; };
boundObject.OpenOnRightClick = function(arrayIte boundObject.OpenOnRightClick = function(arrayItem, rightId,MenuN