資源簡(jiǎn)介
自用瀏覽器基于Gecko52內(nèi)核寫的,基于Winform開發(fā),仿Chrome式多選項(xiàng)卡,一個(gè)選項(xiàng)卡獨(dú)立工具欄和顯示網(wǎng)頁(yè)模塊,不是傳統(tǒng)一個(gè)工具欄下面多個(gè)選項(xiàng)卡,可以彈出下載保存框,文件下載完有文件路徑,是否打開文件提示,右鍵菜單全漢化,添加了垃圾回收處理的機(jī)制,不會(huì)產(chǎn)生Cache,多線程編譯,沒(méi)有黑屏現(xiàn)象,界面可以看看我的博客
代碼片段和文件信息
using?Gecko;
using?Gecko.Windows;
using?System;
using?System.Diagnostics;
using?System.Threading;
using?System.Windows.Forms;
namespace?LeoTX
{
????public?partial?class?Form1?:?Form
????{
????????public?static?WebView?Web1;
????????public?static?Thread?thread1;
????????public?static?Thread?thread2;
????????public?void?NewPage()
????????{
????????????Form2?fm2?=?new?Form2();
????????????TabPage?Tab?=?new?TabPage();
????????????fm2.TopLevel?=?false;
????????????fm2.Dock?=?Dockstyle.Fill;
????????????Tab.Controls.Add(fm2);
????????????chrometabControl1.TabPages.Add(Tab);
????????????fm2.Show();
????????????chrometabControl1.SelectedTab?=?Tab;
????????}
????????public?Form1()
????????{
????????????InitializeComponent();
????????????DoubleBuffered?=?true;
????????????CheckForIllegalCrossThreadCalls?=?false;
????????}
????????private?void?Form1_Load(object?sender?EventArgs?e)
????????{
????????????Web1?=?new?WebView();
????????????Web1.Navigate(“www.baidu.com“);
????????????Web1.Dock?=?Dockstyle.Fill;
????????????panel1.Controls.Add(Web1);
????????????thread1?=?new?Thread(new?ThreadStart(Form1_Load))
????????????{
????????????????Priority?=?ThreadPriority.AboveNormal
????????????????IsBackground?=?true
????????????};
????????????thread1.Start();
????????????PowerClean.Memory();
????????}
????????private?void?Form1_Load()
????????{
????????????chrometabControl1.BeginInvoke(new?Action(()?=>
????????????{
????????????????tabPage1.ImageIndex?=?0;
????????????}));
????????????Web1.BeginInvoke(new?Action(()?=>?{
????????????????Web1.ContextMenuStrip?=?new?NewMenu();
????????????????Web1.Navigated?+=?Web1_Navigated;
????????????????Web1.DocumenttitleChanged?+=?Web1_DocumenttitleChanged;
????????????????Web1.CreateWindow?+=?Web1_CreateWindow;
????????????}));
????????????try
????????????{?}
????????????catch?(ThreadAbortException)
????????????{?}
????????????catch
????????????{
????????????????thread1.Abort();
????????????}
????????}
????????private?void?Web1_Navigated(object?sender?GeckoNavigatedEventArgs?e)
????????{
????????????address.Text?=?e.Url.ToString();
????????}
????????private?void?Web1_DocumenttitleChanged(object?sender?EventArgs?e)
????????{
????????????tabPage1.Text?=?Web1.Documenttitle;
????????}
????????private?void?Web1_CreateWindow(object?sender?GeckoCreateWindowEventArgs?e)
????????{
????????????NewPage();
????????????e.Window?=?(chrometabControl1.SelectedTab.Controls[0]?as?Form2).webView1.Window;
????????????thread2?=?new?Thread(new?ThreadStart(Thread2))
????????????{
????????????????Priority?=?ThreadPriority.AboveNormal
????????????????IsBackground?=?true
????????????};
????????????thread2.Start();
????????????PowerClean.Memory();
????????}
????????private?void?Thread2()
????????{
????????????chrometabControl1.BeginInvoke(new?Action(()?=>
????????????{
???????????????chrometabControl1.SelectedTab.ImageIndex?=?0;
???????????????chr
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-08-13?16:18??LeoTX\
?????文件?????????186??2018-07-22?22:41??LeoTX\App.config
?????文件???????13593??2018-07-25?15:05??LeoTX\Form1.Designer.cs
?????文件????????7944??2018-08-05?19:45??LeoTX\Form1.cs
?????文件?????1638752??2018-07-25?15:05??LeoTX\Form1.resx
?????文件???????10162??2018-07-29?14:05??LeoTX\Form2.Designer.cs
?????文件????????1254??2018-07-29?14:28??LeoTX\Form2.cs
?????文件???????13795??2018-07-29?14:05??LeoTX\Form2.resx
?????文件????????4150??2018-07-30?21:18??LeoTX\Form3.Designer.cs
?????文件?????????228??2018-08-13?16:18??LeoTX\Form3.cs
?????文件??????204222??2018-08-13?16:18??LeoTX\Form3.resx
?????文件????????5978??2018-07-25?17:34??LeoTX\LeoTX.csproj
?????文件?????1081406??2018-07-24?20:08??LeoTX\LeoTX.ico
?????文件????????2453??2018-07-25?17:25??LeoTX\NewMenu.cs
?????文件?????????956??2018-07-25?17:31??LeoTX\PowerClean.cs
?????文件????????3288??2018-07-24?20:46??LeoTX\Program.cs
?????目錄???????????0??2018-08-13?16:15??LeoTX\Properties\
?????文件????????1308??2018-07-22?18:20??LeoTX\Properties\AssemblyInfo.cs
?????文件????????2851??2018-07-22?22:41??LeoTX\Properties\Resources.Designer.cs
?????文件????????5612??2018-07-22?18:20??LeoTX\Properties\Resources.resx
?????文件????????1105??2018-07-22?22:41??LeoTX\Properties\Settings.Designer.cs
?????文件?????????249??2018-07-22?18:20??LeoTX\Properties\Settings.settings
?????文件????????3070??2018-07-22?18:42??LeoTX\app.manifest
?????目錄???????????0??2018-08-13?16:15??LeoTX\bin\
?????目錄???????????0??2018-08-13?16:22??LeoTX\bin\Debug\
?????目錄???????????0??2018-08-13?16:22??LeoTX\bin\Release\
?????目錄???????????0??2018-08-13?16:15??LeoTX\bin\x86\
?????目錄???????????0??2018-08-13?16:15??LeoTX\bin\x86\Debug\
?????目錄???????????0??2018-08-13?16:15??LeoTX\bin\x86\Debug\Gecko52\
?????文件???????19456??2010-01-01?00:00??LeoTX\bin\x86\Debug\Gecko52\AccessibleMarshal.dll
?????文件?????2106216??2010-01-01?00:00??LeoTX\bin\x86\Debug\Gecko52\D3DCompiler_43.dll
............此處省略87個(gè)文件信息
評(píng)論
共有 條評(píng)論