轻便调试JavaScript的旺旺插件基于jzshmyt的javascriptlogger文档格式.docx
《轻便调试JavaScript的旺旺插件基于jzshmyt的javascriptlogger文档格式.docx》由会员分享,可在线阅读,更多相关《轻便调试JavaScript的旺旺插件基于jzshmyt的javascriptlogger文档格式.docx(20页珍藏版)》请在冰豆网上搜索。
![轻便调试JavaScript的旺旺插件基于jzshmyt的javascriptlogger文档格式.docx](https://file1.bdocx.com/fileroot1/2023-1/8/6575e992-a88c-4353-b6db-6daebba979d0/6575e992-a88c-4353-b6db-6daebba979d01.gif)
int
lPluginCookie;
16.
lCookie;
17.
object
pSlot;
18.
string
appid
=
"
18265"
;
19.
}
20.
[ComVisible(true),
21.
Guid("
B221A17A-D3E7-44df-AD67-D45CFA4B5229"
),
22.
ClassInterface(ClassInterfaceType.None)]
23.
Class1
:
ISDKPlugin2
24.
25.
void
OnConnect(object
pApplication,
lPluginCookie)
26.
27.
//
OnConnect
不建议使用末态对话框
28.
//ISDKPluginQueryResult
pqr
(pApplication
as
ISDKApplication3).GetSubScriptionInfo(lPluginCookie)
ISDKPluginQueryResult;
29.
//Global.appid
pqr.appID;
30.
31.
32.
OnDisconnect(object
33.
34.
OnDisConnect
35.
MessageBox.Show("
我被卸载了"
csharp
helloworld"
);
36.
37.
38.
39.
40.
OnNotify(SDKMessageID
MsgID,
pParam)
41.
42.
43.
if
(MsgID
==
SDKMessageID.NOTIFY_OFFLINE)
44.
45.
46.
47.
else
SDKMessageID.NOTIFY_USERLOGIN)
48.
49.
50.
51.
52.
OnUninstall()
53.
54.
55.
56.
Require()
57.
58.
59.
60.
61.
950BFC6C-502A-4239-A36E-90893BA3B03E"
62.
63.
64.
Class2
ISDKPluginItem
65.
66.
Form1
f1;
67.
68.
OnMenuClick(int
lCmdID)
69.
70.
71.
72.
插件作为按钮出现时候得到点击后被调用
73.
本例中此方法将在点击发生后得到调用
74.
75.
OnClick()
76.
77.
try
78.
79.
this.f1.Show();
80.
81.
catch(Exception
ex)
82.
83.
this.f1
new
Form1();
84.
85.
86.
87.
88.
插件接入到插槽后得到通知
89.
90.
OnCreate(object
pSlot,
hParentWnd,
lCookie)
91.
92.
93.
94.
95.
插件在附属插槽被销毁时候得到通知
96.
97.
OnDestroy()
98.
99.
使用模态对话框可能导致异常
100.
聊天对话框输入工具条插件被销毁"
allinone
plugin"
101.
102.
103.
和插件项本身相关的消息通知
104.
105.
OnNotify(SDKItemNotifyID
MsgIDD,
106.
107.
108.
109.
110.
当插件以窗口形式出现情况下,在父窗口发生变化情况下得到通知
111.
112.
OnSize(int
cx,
cy)
113.
114.
115.
116.
117.
118.}
usingSystem.Linq;
usingSystem;
usingSystem.Collections.Generic;
usingSystem.Threading;
usingSystem.Windows.Forms;
usingSystem.Runtime.InteropServices;
usingSystem.Text;
usingwwsdkcomLib;
usingSystem.Xml;
namespaceJSHelper
{
publicclassGlobal
{
publicstaticintlPluginCookie;
publicstaticintlCookie;
publicstaticobjectpSlot;
publicstaticstringappid="
}
[ComVisible(true),
Guid("
),
ClassInterface(ClassInterfaceType.None)]
publicclassClass1:
ISDKPlugin2
publicvoidOnConnect(objectpApplication,intlPluginCookie)
//OnConnect不建议使用末态对话框
//ISDKPluginQueryResultpqr=(pApplicationasISDKApplication3).GetSubScriptionInfo(lPluginCookie)asISDKPluginQueryResult;
//Global.appid=pqr.appID;
publicvoidOnDisconnect(objectpApplication,intlPluginCookie)
//OnDisConnect不建议使用末态对话框
//MessageBox.Show("
"
csharphelloworld"
publicvoidOnNotify(SDKMessageIDMsgID,objectpParam)
if(MsgID==SDKMessageID.NOTIFY_OFFLINE)
elseif(MsgID==SDKMessageID.NOTIFY_USERLOGIN)
publicvoidOnUninstall()
publicvoidRequire()
publicclassClass2:
ISDKPluginItem{
Form1f1;
publicvoidOnMenuClick(intlCmdID)
//插件作为按钮出现时候得到点击后被调用
//本例中此方法将在点击发生后得到调用
publicvoidOnClick()
try
this.f1.Show();
catch(Exceptionex)
this.f1=newForm1();
//插件接入到插槽后得到通知
publicvoidOnCreate(objectpSlot,inthParentWnd,intlCookie)
//插件在附属插槽被销毁时候得到通知
publicvoidOnDestroy()
//使用模态对话框可能导致异常
csharpallinoneplugin"
//和插件项本身相关的消息通知
publicvoidOnNotify(SDKItemNotifyIDMsgIDD,objectpParam)
//当插件以窗口形式出现情况下,在父窗口发生变化情况下得到通知
publicvoidOnSize(intcx,intcy)
}
下面代码是JSHelper窗体主程序,没什么意思。
System.ComponentModel;
System.Data;
System.Drawing;
8.
9.namespace
10.{
11.
partial
Form
12.
String
path;
Form2
f2;
f3;
f4;
f5;
f6;
Form1()
InitializeComponent();
this.path
Application.StartupPath;
this.webBrowser1.Url
System.Uri(this.path
+
\\plugins\\"
Global.appid
\\src\\debugger.html"
false);
private
ExamplesToolStripMenuItem_Click(object
sender,
EventArgs
e)
System.Diagnostics.Process.Start("
explorer"
\\src\\example\\"
//+this.path
请打开插件中的example目录.\n\n该目录的路径可能如下:
\n"
HideToolStripMenuItem_Click(object
this.Hide();
ManualToolStripMenuItem_Click(object
this.f2.Show();
catch
this.f2
Form2("
使用说明"
\\src\\readme\\KingfishersManual.html"
));
AboutJSHelperToolStripMenuItem_Click(object
String[]
info=new
String[7];
info[0]
Version:
0.9.0"
info[1]
Release
Date:
2008-11-17"
info[2]
JSHelper是一款轻巧的Javascript调试工具,"
info[3]
以旺旺插件形式发布在阿里软件平台,"
info[4]
依赖于jzshmyt所写Kingfishers工具包。
info[5]
方便使用是我的唯一目的。
info[6]
Author
CharlesCui"
this.f3.Show();
this.f3
关于--JSHelper"
String.Join("
<
p/>
info,
0,
info.Length));
JavascriptlogToolStripMenuItem_Click(object
info
String[5];
Kingfishers是一个用javascript语言编写的,能够代替alert,在浏览器中连续输出客户端javascript脚本运行日志的工具。
主要用于客户端脚本的分析和查错。
GoogleCode:
Download:
jzshmyt"
this.f4.Show();
this.f4
关于--Kingfishers"
AboutAuthorToolStripMenuItem_Click(object
String[4];
作者博客:
a
href='
'
>
/a>
作者邮箱:
mailto:
zheng.cuizh@?
cc=zheng.cuizh@alibaba-'
zheng.cuizh@<
i