开启辅助访问 切换到宽版

精易论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

用微信号发送消息登录论坛

新人指南 邀请好友注册 - 我关注人的新帖 教你赚取精币 - 每日签到


求职/招聘- 论坛接单- 开发者大厅

论坛版规 总版规 - 建议/投诉 - 应聘版主 - 精华帖总集 积分说明 - 禁言标准 - 有奖举报

查看: 10008|回复: 46
打印 上一主题 下一主题
收起左侧

[易语言纯源码] EPL language 开发多页浏览器源码

[复制链接]
结帖率:33% (3/9)
跳转到指定楼层
发表于 2012-10-27 21:27:23 | 只看该作者 回帖奖励 |正序浏览 |阅读模式   四川省成都市
分享源码
界面截图:
是否带模块: -
备注说明: 无法显示标题我也无赖....
EPL核心支持库问题啊....
本帖最后由 玲心韩雪 于 2012-10-28 09:36 编辑

EPL language 开发多页浏览器源码
  1. .DocVersion 2
  2. .Lib HtmlView
  3. .Lib iext3
  4. .Lib iext

  5. .Module FormModule1
  6. .ModuleVar IE, HTMLBrowser, , "0"
  7. .ModuleVar MainCaption, String

  8. .Sub _MainForm_AfterCreate

  9. 窗口布局 ()

  10. .Sub 窗口布局, , Export

  11. MainCaption = "Themyth Browser"
  12. SSL.Text = "百度一下,你就知道"
  13. MainForm.Caption = MainCaption
  14. MainForm.MinButton = True
  15. Browser1.Visible = False
  16. Browser1.Silence = Not (True)
  17. FstOneRun_CSH_Function ()
  18. IE [Tab.CurrentTab].SetFocus ()
  19. CSH_CDBT ()

  20. .Sub CSH_CDBT, , Export

  21. 主页A.Caption = "主页"
  22. 空白页A.Caption = "空白页"
  23. 搜索页A.Caption = "搜索页"

  24. .Sub FstOneRun_CSH_Function, , Export
  25. .LocalVar aa, HTMLBrowser

  26. Tab.AddTab ("", , , , )
  27. Tab.HideTab (0, True)
  28. CopyControl (Browser1, aa)
  29. AddElement (IE, aa)
  30. Tab.CurrentTab = GetAryElementCount (IE)
  31. IE [Tab.CurrentTab].Visible = True
  32. ' // IE [Tab.CurrentTab].ZOrder ()
  33. IE [Tab.CurrentTab].Execute (2)
  34. 同步显示WEB页 (Tab.CurrentTab)

  35. .Sub 同步显示WEB页, , Export
  36. .Arg XSSY, Integer
  37. .LocalVar CurLoopTime, Integer

  38. .Count (GetAryElementCount (IE), CurLoopTime)
  39.     .If (CurLoopTime <> XSSY)
  40.         IE [CurLoopTime].Visible = False
  41.         IE [CurLoopTime].ZOrder (2)
  42.     .else
  43.         IE [CurLoopTime].Visible = True
  44.         IE [CurLoopTime].ZOrder ()
  45.     .ife_end

  46. .CountNext ()

  47. .Sub 新建页面, , Export
  48. .Arg 地址, String, ByRef AllowEmpty
  49. .LocalVar aa, HTMLBrowser

  50. Tab.AddTab ("", , , , )
  51. Tab.HideTab (0, True)
  52. CopyControl (Browser1, aa)
  53. AddElement (IE, aa)
  54. Tab.CurrentTab = GetAryElementCount (IE)
  55. IE [Tab.CurrentTab].Visible = True
  56. IE [Tab.CurrentTab].ZOrder ()
  57. IE [Tab.CurrentTab].URL = 地址
  58. 同步显示WEB页 (Tab.CurrentTab)


  59. .Sub 跳转页面
  60. .Arg 地址, String, AllowEmpty
  61. .Arg 特殊, Boolean, AllowEmpty
  62. .Arg 内定, Integer, AllowEmpty
  63. .Arg 索引, Integer, AllowEmpty

  64. .If (IsEmpty (特殊) = True)
  65.     .If (特殊 <> True)
  66.         Tab.CurrentTab = 索引
  67.         IE [索引].Navigate (地址, , )
  68.         同步显示WEB页 (索引)
  69.     .else
  70.         跳转面页_Function (内定, 索引)
  71.     .ife_end

  72. .else
  73.     跳转面页_Function (内定, 索引)
  74. .ife_end


  75. .Sub 跳转面页_Function
  76. .Arg 内定, Integer
  77. .Arg 索引, Integer

  78. IE [索引].Execute (内定)
  79. Tab.CurrentTab = 索引
  80. 同步显示WEB页 (索引)

  81. .Sub _主页A_Click

  82. 新建页面 (GetTextKey (3, "SOFTWARE\Microsoft\Internet Explorer\Main\Start Page", ))
  83. ' Search Page

  84. .Sub _搜索页A_Click

  85. 新建页面 (GetTextKey (3, "SOFTWARE\Microsoft\Internet Explorer\Main\Search Page", ))

  86. .Sub _空白页A_Click

  87. ' //新建页面 (GetTextKey (3, "SOFTWARE\Microsoft\Internet Explorer\Main\Security Risk Page", ))
  88. 新建页面 ("about:inprivate")

  89. .Sub _Tab_HeadRightClick
  90. .Arg TabIndex, Integer

  91. PopupMenu (t12jinkninwi1no31123, , )

  92. .Sub _主页_Click

  93. 跳转页面 ("", True, 2, Tab.CurrentTab)

  94. .Sub _搜索页_Click

  95. 跳转页面 ("", True, 3, Tab.CurrentTab)

  96. .Sub _空白页_Click

  97. 跳转页面 ("about:inprivate", , , Tab.CurrentTab)


  98. .Sub _Tab_TabChange
  99. .LocalVar Temp, String

  100. .IfTrue (GetAryElementCount (IE) > 0)
  101.     同步显示WEB页 (Tab.CurrentTab)
  102.     _Browser1_CaptionChange ()
  103.     ' //Caption = MainCaption + " " + IE [Tab.CurrentTab].Caption
  104.     ' //SetTab_Box_Function (Tab.CurrentTab, TabCaptionFunction (#MY_24, IE [Tab.CurrentTab].Caption), IE [Tab.CurrentTab].Caption)
  105. .if_end


  106. .Sub _当前页_Click
  107. .LocalVar 索引, Integer

  108. ' // 关闭面页 (Tab.CurrentTab, "about:inprivate")

  109. .IfTrue (Tab.CurrentTab > 0)
  110.     .If (Tab.GetTabCount () = 2)
  111.         _空白页_Click ()
  112.     .else
  113.         IE [Tab.CurrentTab].Destroy ()
  114.         RemoveElement (IE, Tab.CurrentTab, )
  115.         Tab.DeleteTab (Tab.CurrentTab)
  116.     .ife_end
  117.     同步显示WEB页 (Tab.CurrentTab)
  118. .if_end


  119. .Sub _全部页_Click
  120. .LocalVar s, Integer
  121. .LocalVar f

  122. .IfTrue (GetAryElementCount (IE) > 0)
  123.     .Count (GetAryElementCount (IE), s)
  124.         ' f = GetAryElementCount (IE)
  125.         ' f = f - s
  126.         .If (GetAryElementCount (IE) = 1)
  127.             跳转页面 ("about:inprivate", False, -1, Tab.CurrentTab)
  128.         .else
  129.             IE [s].Destroy ()
  130.             Tab.DeleteTab (s)
  131.             RemoveElement (IE, s, )
  132.         .ife_end
  133.         同步显示WEB页 (Tab.CurrentTab)

  134.     .CountNext ()
  135. .if_end


  136. .Sub _Browser1_StatusTextChange

  137. Statusbar.SetText (1, IE [Tab.CurrentTab].StatusText)

  138. .Sub _Browser1_BeforeNavigate, Boolean

  139. Return (Not (False))
  140. DZL.Text = IE [Tab.CurrentTab].URL
  141. Swap (IE [Tab.CurrentTab].URL)

  142. .Sub Swap, , Export
  143. .Arg UrlAdderss, String, , url地址
  144. .LocalVar ico, Bin, Static, "0"
  145. .LocalVar url, String, Static, "0"
  146. .LocalVar linseed, Bin, , "0"
  147. .LocalVar Sy, Integer
  148. .LocalVar Cs, Integer
  149. .LocalVar bni, Bin

  150. .For (1, GetAryElementCount (url), 1, Sy)
  151.     .IfTrue (url [Sy] = UrlAdderss)
  152.         AddElement (linseed, ico [Sy])
  153.         Cs = Cs + 1
  154.     .if_end

  155. .Next ()
  156. .If (Cs <> 0)
  157.     bni = Readehtmlico (CliocAdderss (UrlAdderss))
  158. .else
  159.     bni = linseed [1]
  160. .ife_end
  161. .If (bni <> {  })
  162.     htmlIco.Picture = bni
  163. .else
  164.     htmlIco.Picture = Icon
  165. .ife_end



  166. .Sub CliocAdderss, String, Export
  167. .Arg adderss, String
  168. .LocalVar a, String, , "0"
  169. .LocalVar c
  170. .LocalVar d, String

  171. a = SplitString (adderss, "/", )
  172. .Count (#MY_03, c)
  173.     .If (c < 2 And c > 0)
  174.         d = a [c] + "//"
  175.     .else
  176.         d = d + a [c] + "/"
  177.     .ife_end

  178. .CountNext ()
  179. .IfTrue (StrRight (d, 1) <> "/")
  180.     d = d + "/"
  181. .if_end
  182. d = d + "favicon.ico"
  183. Return (d)


  184. .Sub Readehtmlico, Bin, Export
  185. .Arg call, String, AllowEmpty
  186. .Arg adder, String, AllowEmpty
  187. .LocalVar oject, Object
  188. .LocalVar bin, Bin

  189. .If (oject.Create ("Microsoft.XMLHTTP", ))
  190.     .If (IsEmpty (call) = True)
  191.         oject.Call ("Open", "GET", adder, False)
  192.     .else
  193.         oject.Call ("Open", call, adder, False)
  194.     .ife_end
  195.     oject.Call ("Send", )
  196.     bin = oject.GetProperty ("ResponseBody", ).GetBin ()
  197.     Return (bin)
  198. .else
  199.     Return (CBin (""))
  200. .ife_end


  201. .Sub _Browser1_StartLoading

  202. SetTab_Box_Function (Tab.CurrentTab, TabCaptionFunction (#MY_024, "StartLoading"), "StartLoading")


  203. .Sub _Browser1_AfterLoad

  204. SetTab_Box_Function (Tab.CurrentTab, TabCaptionFunction (#MY_024, "AfterLoad"), "AfterLoad")
  205. 同步标题 ()

  206. .Sub SetTab_Box_Function, , Export
  207. .Arg Index, Integer
  208. .Arg Name, String
  209. .Arg Tip, String

  210. Tab.SetTabName (Index, Name)
  211. Tab.SetTabTip (Index, Tip)

  212. .Sub _Browser1_OpeningNew, Boolean

  213. 新建页面 (IE [Tab.CurrentTab].StatusText)

  214. .Sub _Browser1_CaptionChange

  215. 同步标题 ()

  216. .Sub 同步标题, , Export, EPL HTMLBrower Fne Error SY dome TB Caption
  217. .LocalVar Temp, String

  218. .If (IE [Tab.CurrentTab].Caption <> "Internet Explorer 无法显示该网页")
  219.     SetTab_Box_Function (Tab.CurrentTab, TabCaptionFunction (#MY_024, Temp), IE [Tab.CurrentTab].Caption)
  220.     Caption = MainCaption + " " + IE [Tab.CurrentTab].Caption
  221. .else
  222.     Temp = MainCaption + " " + "无法显示该网页"
  223.     SetTab_Box_Function (Tab.CurrentTab, TabCaptionFunction (#MY_024, Temp), Temp)
  224.     Caption = Temp
  225. .ife_end


  226. .Sub TabCaptionFunction, String
  227. .Arg Width, Integer
  228. .Arg Char, String
  229. .LocalVar temp_Width, Integer
  230. .LocalVar Temp_Count, Integer, , "2"
  231. .LocalVar Temp_Char, String

  232. temp_Width = Width
  233. Temp_Count [1] = StrLen (Char)
  234. Temp_Count [2] = temp_Width - Temp_Count [1]
  235. .If (Temp_Count [2] <= 0)
  236.     Return (StrLeft (Char, temp_Width) + "...")
  237. .else
  238.     .Count (Temp_Count [2] / 2, )
  239.         Temp_Char = Temp_Char + " "
  240.     .CountNext ()
  241.     Temp_Char = Temp_Char + Char + Temp_Char
  242.     Return (StrLeft (Temp_Char, #MY_024))
  243. .ife_end


  244. .Sub _Browser1_AfterNavigate

  245. DZL.Text = IE [Tab.CurrentTab].URL
  246. ProgressBar1.Position = ProgressBar1.Min
  247. ComboBox_Add (IE [Tab.CurrentTab].URL)

  248. .Sub _Browser1_Progress
  249. .Arg ProgressPercent, Integer

  250. ProgressBar1.Position = ProgressPercent
  251. ProgressBar1.ZOrder (3)


  252. .Sub _Tab_DblClick, Boolean
  253. .Arg x, Integer
  254. .Arg y, Integer
  255. .Arg KeyState, Integer

  256. _当前页_Click ()


  257. .Sub _SSL_GetFocus

  258. SSL.Text = ""

  259. .Sub _SSL_LostFocus

  260. SSL.Text = "百度一下,你就知道"

  261. .Sub _DZL_LButtonDown, Boolean
  262. .Arg x, Integer
  263. .Arg y, Integer
  264. .Arg KeyState, Integer

  265. DZL.SetFocus ()


  266. .Sub _Tab_LButtonDown, Boolean
  267. .Arg x, Integer
  268. .Arg y, Integer
  269. .Arg KeyState, Integer

  270. IE [Tab.CurrentTab].SetFocus ()


  271. .Sub _XLCD_Click

  272. ComboBox1.SendMessage (335, 1, 0)


  273. .Sub ComboBox_Add, , Export
  274. .Arg 文本, String
  275. .LocalVar 寄存器, String
  276. .LocalVar 索引, Integer
  277. .LocalVar 次数, Integer

  278. 寄存器 = 文本
  279. .IfTrue (InStr (寄存器, "about:blank", , False) = -1)
  280.     .Count (ComboBox1.GetItemCount (), 索引)
  281.         .IfTrue (ComboBox1.GetItemText (索引 - 1) = 文本)
  282.             次数 = 次数 + 1
  283.         .if_end

  284.     .CountNext ()
  285.     .IfTrue (次数 = 0)
  286.         ComboBox1.AddItem (寄存器, )
  287.     .if_end

  288. .if_end


  289. .Sub _ComboBox1_ItemSelect

  290. DZL.Text = ComboBox1.Text
  291. _ZD_Click ()

  292. .Sub _ZD_Click

  293. .IfTrue (TrimAll (DZL.Text) <> "")
  294.     跳转页面 (DZL.Text, False, -1, Tab.CurrentTab)
  295. .if_end


  296. .Sub _SS_Click

  297. .IfTrue (TrimAll (SSL.Text) <> "")
  298.     DZL.Text = SSL.Text
  299.     _ZD_Click ()
  300. .if_end

复制代码
启动函数集
  1. .DocVersion 2

  2. .Module MainModule

  3. .Sub _MainFunction, Integer, , This sub function will be executed first after program starts


  4. Return (Function_LoadWindow () - 1)  ' You can return any number as you need

  5. .Sub Function_LoadWindow, Integer, Export

  6. Return (CInt (Load (MainForm, , False)))
复制代码
  1. .DocVersion 2

  2. .Const MY_024, "24"
  3. .Const MY_03, "3"
复制代码
源码下载地址:
EPL Source Code.rar (51.75 KB, 下载次数: 290)

点评

呵呵,毕竟现在只有少数的人装了win8系统啊,但是由于电脑还比较落后,所以装不了那样的系统,只可以看了   广东省广州市  发表于 2012-10-27 22:05

结帖率:33% (3/9)
来自 46楼
 楼主| 发表于 2012-10-27 21:39:39 | 只看该作者   四川省成都市
String 字符串,文本型
Bin 字节集
boolean 逻辑型
Datetime 时间
Byte 字节
float 浮点
integer 整数型
functionAddress 子程序指针
回复 支持 反对

使用道具 举报

结帖率:33% (3/9)
来自 45楼
 楼主| 发表于 2012-10-27 21:46:52 | 只看该作者   四川省成都市

  1. on(relss)
  2. {
  3.         var a:new Date;
  4.         switch ( a.Day )
  5.         {
  6.                 case : 0
  7.                 trace ( “星期日" ) ;
  8.                 break;
  9.                 default :
  10.                 trace("未知日期") ;
  11.         }

  12. }
复制代码
回复 支持 反对

使用道具 举报

结帖率:85% (17/20)
44
发表于 2019-4-29 20:55:25 | 只看该作者   江西省吉安市
感谢分享~····
回复 支持 反对

使用道具 举报

43
发表于 2017-10-29 16:53:37 | 只看该作者   广东省深圳市
66666666666666666
回复 支持 反对

使用道具 举报

结帖率:100% (69/69)

签到天数: 1 天

42
发表于 2014-12-1 17:17:55 | 只看该作者   北京市北京市
我要找一个非常好的浏览器
回复 支持 反对

使用道具 举报

结帖率:0% (0/1)
41
发表于 2013-8-18 23:49:32 | 只看该作者   重庆市重庆市
美观不错 呵呵
回复 支持 反对

使用道具 举报

40
发表于 2013-7-28 20:02:21 | 只看该作者   陕西省榆林市
的数据库哈斯就
回复 支持 反对

使用道具 举报

结帖率:40% (2/5)

签到天数: 1 天

39
发表于 2013-7-21 20:31:19 | 只看该作者   江苏省苏州市
学习正需要,谢谢

本文章来自:精易论坛(http://125.confly.eu.org/forum.php?mod=viewthread&tid=136309)请保留此链接, 感谢!
回复 支持 反对

使用道具 举报

头像被屏蔽
38
发表于 2013-7-5 09:43:51 | 只看该作者   河南省洛阳市
下载看看吧
回复 支持 反对

使用道具 举报

结帖率:0% (0/1)
37
发表于 2013-6-29 15:52:21 | 只看该作者   浙江省宁波市
EPL是什么?
回复 支持 反对

使用道具 举报

36
发表于 2013-6-1 12:29:12 | 只看该作者   山西省太原市
下载后告诉你们好用不
回复 支持 反对

使用道具 举报

结帖率:100% (1/1)
35
发表于 2013-5-1 10:36:36 | 只看该作者   广东省广州市
萨达阿是大声道阿斯达
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则 致发广告者

发布主题 收藏帖子 返回列表

sitemap| 易语言源码| 易语言教程| 易语言论坛| 易语言模块| 手机版| 广告投放| 精易论坛
拒绝任何人以任何形式在本论坛发表与中华人民共和国法律相抵触的言论,本站内容均为会员发表,并不代表精易立场!
论坛帖子内容仅用于技术交流学习和研究的目的,严禁用于非法目的,否则造成一切后果自负!如帖子内容侵害到你的权益,请联系我们!
防范网络诈骗,远离网络犯罪 违法和不良信息举报QQ: 793400750,邮箱:[email protected]
网站简介:精易论坛成立于2009年,是一个程序设计学习交流技术论坛,隶属于揭阳市揭东区精易科技有限公司所有。
Powered by Discuz! X3.4 揭阳市揭东区精易科技有限公司 ( 粤ICP备12094385号-1) 粤公网安备 44522102000125 增值电信业务经营许可证 粤B2-20192173

快速回复 返回顶部 返回列表