本文整理汇总了C#中csExWB类的典型用法代码示例。如果您正苦于以下问题:C# csExWB类的具体用法?C# csExWB怎么用?C# csExWB使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
csExWB类属于命名空间,在下文中一共展示了csExWB类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: cEXWB1_NewWindow3
private void cEXWB1_NewWindow3(object sender, csExWB.NewWindow3EventArgs e)
{
try
{
e.Cancel = true;
}
catch (Exception ee)
{
AllForms.m_frmLog.AppendToLog("frmPopup_cEXWB1_NewWindow3\r\n" + ee.ToString());
}
}
开发者ID:blacklensama,项目名称:earthquake-project-ui,代码行数:11,代码来源:frmPopup.cs
示例2: m_designer_HTMLEditDesigner_PreHandleEvent
void m_designer_HTMLEditDesigner_PreHandleEvent(object sender, csExWB.HTMLEditDesignerArgs e)
{
//Only events that are fired, minimal
if (e.m_EventDispId == HTMLEventDispIds.ID_ONKEYDOWN)
{
if (e.m_pEvtObj != null) //65 A
AllForms.m_frmLog.AppendToLog("ID_ONKEYDOWN_KeyCode ==>" + e.m_pEvtObj.keyCode.ToString());
}
else if (e.m_EventDispId == HTMLEventDispIds.ID_ONKEYUP) //never hits???
{
if (e.m_pEvtObj != null)
AllForms.m_frmLog.AppendToLog("ID_ONKEYUP_KeyCode ==>" + e.m_pEvtObj.keyCode.ToString());
}
//else if (e.m_EventDispId == HTMLEventDispIds.ID_ONKEYPRESS)
//{
// if (e.m_pEvtObj != null) //97 a
// AllForms.m_frmLog.AppendToLog("ID_ONKEYPRESS_KeyCode ==>" + e.m_pEvtObj.keyCode.ToString());
//}
else if (e.m_EventDispId == HTMLEventDispIds.ID_ONMOUSEDOWN)
{
if ((e.m_pEvtObj != null) && (e.m_pEvtObj.SrcElement != null))
AllForms.m_frmLog.AppendToLog("ID_ONMOUSEDOWN_TagName ==>" + e.m_pEvtObj.SrcElement.tagName);
}
else if (e.m_EventDispId == HTMLEventDispIds.ID_ONMOUSEUP)
{
if ((e.m_pEvtObj != null) && (e.m_pEvtObj.SrcElement != null))
AllForms.m_frmLog.AppendToLog("ID_ONMOUSEUP_TagName ==>" + e.m_pEvtObj.SrcElement.tagName);
}
else if (e.m_EventDispId == HTMLEventDispIds.ID_ONMOUSEOVER)
{
AllForms.m_frmLog.AppendToLog("ID_ONMOUSEOVER");
}
else if (e.m_EventDispId == HTMLEventDispIds.ID_ONMOUSEOUT)
{
AllForms.m_frmLog.AppendToLog("ID_ONMOUSEOUT");
}
else if (e.m_EventDispId == HTMLEventDispIds.ID_ONCONTEXTMENU)
{
AllForms.m_frmLog.AppendToLog("ID_ONCONTEXTMENU");
e.Cancel = true;
}
else if (e.m_EventDispId == HTMLEventDispIds.ID_ONMOUSEMOVE)
{
return;
}
else if (e.m_EventDispId == HTMLEventDispIds.ID_IME_EVENT)
{
AllForms.m_frmLog.AppendToLog("ID_IME_EVENT");
}
else
AllForms.m_frmLog.AppendToLog("m_EventDispId ==>" + e.m_EventDispId.ToString());
}
开发者ID:CharlesZHENG,项目名称:csexwb2,代码行数:53,代码来源:frmHTMLEditor2.cs
示例3: cEXWB1_BeforeNavigate2
void cEXWB1_BeforeNavigate2(object sender, csExWB.BeforeNavigate2EventArgs e)
{
try
{
if(e.istoplevel)
m_designer.DeactivateDesigner();
}
catch (Exception ee)
{
AllForms.m_frmLog.AppendToLog(this.Name + "_cEXWB1_DocumentComplete\r\n" + ee.ToString());
}
}
开发者ID:aldoblack,项目名称:webknowledge,代码行数:12,代码来源:frmHTMLEditor2.cs
示例4: cEXWB1_NewWindow2
private void cEXWB1_NewWindow2(object sender, csExWB.NewWindow2EventArgs e)
{
try
{
this.SetupNewForm();
newfrm.AssignBrowserObject(ref e.browser);
//AllForms.m_frmLog.AppendToLog("frmPopup_cEXWB1_NewWindow2");
//e.Cancel = true;
}
catch (Exception ee)
{
AllForms.m_frmLog.AppendToLog("frmPopup_cEXWB1_NewWindow2\r\n" + ee.ToString());
}
}
开发者ID:aldoblack,项目名称:webknowledge,代码行数:14,代码来源:frmPopup.cs
示例5: cEXWB1_WBDragDrop
void cEXWB1_WBDragDrop(object sender, csExWB.WBDropEventArgs e)
{
if (e.dataobject.ContainsText())
AllForms.m_frmLog.AppendToLog("frmPopup_cEXWB1_WBDragDrop\r\n" + e.dataobject.GetText());
else if (e.dataobject.ContainsFileDropList())
{
System.Collections.Specialized.StringCollection files = e.dataobject.GetFileDropList();
if (files.Count > 1)
MessageBox.Show("Can not do multi file drop!");
else
{
this.cEXWB1.Navigate(files[0]);
}
}
}
开发者ID:CharlesZHENG,项目名称:csexwb2,代码行数:15,代码来源:frmPopup.cs
示例6: cEXWB1_DocumentComplete
void cEXWB1_DocumentComplete(object sender, csExWB.DocumentCompleteEventArgs e)
{
try
{
if (e.istoplevel)
{
IHTMLDocument2 pDoc2 = ((IWebBrowser2)e.browser).Document as IHTMLDocument2;
if (pDoc2 != null)
{
m_designer.ActivateDesigner(pDoc2);
}
}
}
catch (Exception ee)
{
AllForms.m_frmLog.AppendToLog(this.Name + "_cEXWB1_DocumentComplete\r\n" + ee.ToString());
}
}
开发者ID:aldoblack,项目名称:webknowledge,代码行数:18,代码来源:frmHTMLEditor2.cs
示例7: DisposeCWB
private static void DisposeCWB(csExWB.cEXWB c)
{
if (m_form.InvokeRequired)
{
log.Debug("Dispose CWB...");
m_form.BeginInvoke(new DisposeCWBDelegator(DisposeCWB), new object[] {c});
}
else
{
try
{
c.Dispose();
}
catch (Exception e)
{
log.Error(e);
}
}
}
开发者ID:JamalAbuDayyeh,项目名称:slowandsteadyparser,代码行数:19,代码来源:CWBPool.cs
示例8: CWBLifeCheck
private static bool CWBLifeCheck(csExWB.cEXWB c)
{
if (m_CWBCOUNTDICT.ContainsKey(c))
{
if (m_CWBCOUNTDICT[c] >= m_CWBLIFECOUNT)
{
m_CWBCOUNTDICT.Remove(c);
return false;
}
else
{
m_CWBCOUNTDICT[c] = m_CWBCOUNTDICT[c] + 1;
return true;
}
}
else
{
log.Error("某浏览器对象的计数器元件未初始化!");
return false;
}
}
开发者ID:JamalAbuDayyeh,项目名称:slowandsteadyparser,代码行数:22,代码来源:CWBPool.cs
示例9: cEXWB1_ProtocolHandlerOperationFailed
//Fired to indicate when download of a resource has failed
void cEXWB1_ProtocolHandlerOperationFailed(object sender, csExWB.ProtocolHandlerOperationFailedEventArgs e)
{
Debug.Print(">>>>>>ProtocolHandlerOperationFailed=> " + e.URL);
}
开发者ID:aldoblack,项目名称:webknowledge,代码行数:5,代码来源:Form1.cs
示例10: cEXWB1_ProtocolHandlerDataFullyRead
//Fired to indicate when a resource has been fully read by the MSHTML
void cEXWB1_ProtocolHandlerDataFullyRead(object sender, csExWB.ProtocolHandlerDataFullyReadEventArgs e)
{
Debug.Print(">>>>>>ProtocolHandlerDataFullyRead=> " + e.URL);
}
开发者ID:aldoblack,项目名称:webknowledge,代码行数:5,代码来源:Form1.cs
示例11: cEXWB1_ProtocolHandlerBeginTransaction
//Fired to indicate when a request for a resource is about to be initiated
void cEXWB1_ProtocolHandlerBeginTransaction(object sender, csExWB.ProtocolHandlerBeginTransactionEventArgs e)
{
Debug.Print(">>>>>>ProtocolHandlerBeginTransaction=> " + e.URL);
//+ "\r\nRequestHeaders >>\r\n" + e.RequestHeaders);
}
开发者ID:aldoblack,项目名称:webknowledge,代码行数:6,代码来源:Form1.cs
示例12: cEXWB1_BeforeNavigate2
void cEXWB1_BeforeNavigate2(object sender, csExWB.BeforeNavigate2EventArgs e)
{
Debug.Print(">>>>>>BeforeNavigate2=>" + e.url);
}
开发者ID:aldoblack,项目名称:webknowledge,代码行数:4,代码来源:Form1.cs
示例13: cEXWB1_WBAuthenticate
private void cEXWB1_WBAuthenticate(object sender, csExWB.AuthenticateEventArgs e)
{
if (m_frmAuth.ShowDialogInternal(this) == DialogResult.OK)
{
//Default value of handled is false
e.handled = true;
//To pass a doamin as in a NTLM authentication scheme,
//use this format: Username = Domain\username
e.username = m_frmAuth.m_Username;
e.password = m_frmAuth.m_Password;
e.retvalue = 0;
//Default value of retValue is 0 or S_OK
}
}
开发者ID:aldoblack,项目名称:webknowledge,代码行数:14,代码来源:frmMain.cs
示例14: cEXWB1_FileDownloadExStart
//A typical file attachment header from hotmail
//HTTP/1.1 200 OK
//Date: Mon, 20 Aug 2007 12:02:06 GMT
//Server: Microsoft-IIS/6.0
//P3P: CP="BUS CUR CONo FIN IVDo ONL OUR PHY SAMo TELo"
//xxn:18
//X-Powered-By: ASP.NET
//Content-Length: 24955
//Content-Disposition: attachment; filename="TabStrip.zip"
//MSNSERVER: H: BAY139-W18 V: 11.10.0.115 D: 2007-07-09T20:51:32
//Set-Cookie: KVC=11.10.0000.0115; domain=.mail.live.com; path=/
//Cache-Control: private
//Content-Type: application/x-zip-compressed
//http://data.unaids.org/pub/GlobalReport/2006/Annex2_Data_en.xls
void cEXWB1_FileDownloadExStart(object sender, csExWB.FileDownloadExEventArgs e)
{
csExWB.cEXWB pWB = (csExWB.cEXWB)sender;
try
{
MessageBox.Show(e.m_FileSize.ToString());
AllForms.m_frmLog.AppendToLog("cEXWB1_FileDownloadExStart\r\n" + e.m_URL +
"\r\n" + e.m_Filename + "\r\n" + e.m_Ext + "\r\n" + e.m_FileSize +
"\r\n" + e.m_ExtraHeaders);
if (!string.IsNullOrEmpty(e.m_FileSize))
m_lFileSize = int.Parse(e.m_FileSize);
else
m_lFileSize = 0;
//Send progress events. default false
e.m_SendProgressEvents = true;
//The initial value of FileDownloadDirectory defaults to MyDocuments dir
e.m_PathToSave = pWB.FileDownloadDirectory + e.m_Filename;
m_frmFileDownload.AddDownloadItem(pWB.Name, e.m_Filename, e.m_URL, e.m_dlUID, e.m_URL, e.m_PathToSave, m_lFileSize);
if (!m_frmFileDownload.Visible)
m_frmFileDownload.Show(this);
}
catch (Exception ee)
{
AllForms.m_frmLog.AppendToLog(pWB.Name + "_FileDownloadExStart" + ee.ToString());
}
}
开发者ID:aldoblack,项目名称:webknowledge,代码行数:40,代码来源:frmMain.cs
示例15: cEXWB1_FileDownloadExProgress
void cEXWB1_FileDownloadExProgress(object sender, csExWB.FileDownloadExProgressEventArgs e)
{
MessageBox.Show(e.m_Progress.ToString());
csExWB.cEXWB pWB = (csExWB.cEXWB)sender;
try
{
m_frmFileDownload.UpdateDownloadItem(pWB.Name, e.m_dlUID, e.m_URL, e.m_Progress, e.m_ProgressMax);
}
catch (Exception ee)
{
AllForms.m_frmLog.AppendToLog(pWB.Name + "_FileDownloadExProgress" + ee.ToString());
}
}
开发者ID:aldoblack,项目名称:webknowledge,代码行数:13,代码来源:frmMain.cs
示例16: cEXWB1_StatusTextChange
private void cEXWB1_StatusTextChange(object sender, csExWB.StatusTextChangeEventArgs e)
{
if (sender != m_CurWB)
return;
//if (e.text.Length > 0) m_Status = e.text;
tsStatus.Text = e.text;
}
开发者ID:aldoblack,项目名称:webknowledge,代码行数:7,代码来源:frmMain.cs
示例17: cEXWB1_TitleChange
private void cEXWB1_TitleChange(object sender, csExWB.TitleChangeEventArgs e)
{
if (sender != m_CurWB)
return;
this.Text = e.title;
}
开发者ID:aldoblack,项目名称:webknowledge,代码行数:6,代码来源:frmMain.cs
示例18: cEXWB1_NavigateComplete2
private void cEXWB1_NavigateComplete2(object sender, csExWB.NavigateComplete2EventArgs e)
{
}
开发者ID:aldoblack,项目名称:webknowledge,代码行数:3,代码来源:frmMain.cs
示例19: cEXWB1_WBContextMenu
private void cEXWB1_WBContextMenu(object sender, csExWB.ContextMenuEventArgs e)
{
try
{
if (e.contextmenutype == WB_CONTEXTMENU_TYPES.CONTEXT_MENU_ANCHOR)
{
e.displaydefault = false;
m_oHTMLCtxMenu = e.dispctxmenuobj;
ctxMnuWB_A.Show(e.pt);
}
else if (e.contextmenutype == WB_CONTEXTMENU_TYPES.CONTEXT_MENU_IMAGE)
{
//If image has a HREF then enable CopyURLText image menu
e.displaydefault = false;
m_oHTMLCtxMenu = e.dispctxmenuobj;
ctxMnuImgCopyUrlText.Enabled = false;
IHTMLElement pelem = (IHTMLElement)m_oHTMLCtxMenu;
if (pelem != null)
{
IHTMLElement pParent = pelem.parentElement;
ctxMnuImgCopyUrlText.Enabled = (pParent.tagName.ToUpper() == "A") ? true : false;
}
ctxMnuImgOpenInBack.Enabled = ctxMnuImgCopyUrlText.Enabled;
ctxMnuImgOpenInFront.Enabled = ctxMnuImgCopyUrlText.Enabled;
ctxMnuWB_Img.Show(e.pt);
}
else if (e.contextmenutype == WB_CONTEXTMENU_TYPES.CONTEXT_MENU_CONTROL)
{
AllForms.m_frmLog.AppendToLog("CONTEXT_MENU_CONTROL");
}
else if (e.contextmenutype == WB_CONTEXTMENU_TYPES.CONTEXT_MENU_TEXTSELECT)
{
AllForms.m_frmLog.AppendToLog("CONTEXT_MENU_TEXTSELECT");
}
else if (e.contextmenutype == WB_CONTEXTMENU_TYPES.CONTEXT_MENU_TABLE)
{
AllForms.m_frmLog.AppendToLog("CONTEXT_MENU_TABLE");
}
AllForms.m_frmLog.AppendToLog("CONTEXT_MENU_TAGNAME = " + e.ctxmenuelem.tagName);
//else if (e.contextmenutype == WB_CONTEXTMENU_TYPES.CONTEXT_MENU_DEFAULT)
//{
// AllForms.m_frmLog.AppendToLog("CONTEXT_MENU_DEFAULT");
//}
//else if (e.contextmenutype == WB_CONTEXTMENU_TYPES.CONTEXT_MENU_IMGART)
//{
// AllForms.m_frmLog.AppendToLog("CONTEXT_MENU_IMGART");
//}
//else if (e.contextmenutype == WB_CONTEXTMENU_TYPES.CONTEXT_MENU_IMGDYNSRC)
//{
// AllForms.m_frmLog.AppendToLog("CONTEXT_MENU_IMGDYNSRC");
//}
//else if (e.contextmenutype == WB_CONTEXTMENU_TYPES.CONTEXT_MENU_UNKNOWN)
//{
// AllForms.m_frmLog.AppendToLog("CONTEXT_MENU_UNKNOWN");
//}
}
catch (Exception ee)
{
AllForms.m_frmLog.AppendToLog("cEXWB1_WBContextMenu\r\n" + ee.ToString());
}
}
开发者ID:aldoblack,项目名称:webknowledge,代码行数:65,代码来源:frmMain.cs
示例20: cEXWB1_NavigateError
//default, cancel = false;
private void cEXWB1_NavigateError(object sender, csExWB.NavigateErrorEventArgs e)
{
//If using internal filedownlod mechanism,
//we get nav errors for file download with status code 200(OK)????
if ((e.statuscode == WinInetErrors.HTTP_STATUS_OK) ||
(e.statuscode == WinInetErrors.HTTP_STATUS_CONTINUE) ||
(e.statuscode == WinInetErrors.HTTP_STATUS_REDIRECT) ||
//(e.statuscode == WinInetErrors.HTTP_STATUS_REQUEST_TIMEOUT) ||
(e.statuscode == WinInetErrors.HTTP_STATUS_ACCEPTED))
{
return; //default handling
}
csExWB.cEXWB pWB = (csExWB.cEXWB)sender;
//if (pWB != null)
//{
// AllForms.m_frmLog.AppendToLog(pWB.Name +
// "_NavigateError\r\nURL\r\n" + HttpUtility.UrlDecode(e.url) +
// "\r\nStatus Code\r\n" + e.statuscode.ToString());
//}
//else
//{
// AllForms.m_frmLog.AppendToLog("cEXWBxx_NavigateError\r\nURL\r\n" + HttpUtility.UrlDecode(e.url) +
// "\r\nStatus Code\r\n" + e.statuscode.ToString());
//}
try
{
object nobj = null;
//<HTML> tag is appended
//Each line 200 chars
string data = "about:<HEAD><title>Page Not Found</title></Head><Body><H3>Unable to load</H3><p>" + e.url + "<br>Reason:<br>" + e.statuscode.ToString() + "</p></Body>";
//No frames, main document
//Do not set e.Cancel to true
//as it stops the navigation of our main document
//resulting in a blank page. Instead, we stop the navigation
//and call our own navigate
if (pWB.FramesCount() == 0)
{
//default
//e.Cancel = false;
pWB.Stop();
pWB.Navigate(data);
return;
}
//If this is a Frame or IFrame then
//we cancel the navigation to this page
//and navigate to our error page.
e.Cancel = true;
//Variaty of ways to display an error page
//Attempt to pass HTML directly to Navigate
((IWebBrowser2)e.browser).Navigate(data, ref nobj, ref nobj, ref nobj, ref nobj);
//Attempt to nav to a page on a server
//http://www.google.com
//((IWebBrowser2)e.browser).Navigate("http://www.google.com", ref nobj, ref nobj, ref nobj, ref nobj);
//Attempt to load a res file
//res://exePath/#220
//Open up the compiled exe using VS and add resources!
//Refer to this article for information
//http://www.codeproject.com/csharp/embedwin32resources.asp
//Display a blank page
//about:blank
//((IWebBrowser2)e.browser).Navigate("about:blank", ref nobj, ref nobj, ref nobj, ref nobj);
//Attempt to load a local file
//file:///E|//Test.htm - using this protocol in IE7 causes a
//StackOverFlowException which means we don't have local file access
}
catch (Exception ee)
{
AllForms.m_frmLog.AppendToLog("cEXWB1_NavigateError\r\n" + ee.ToString());
}
}
开发者ID:aldoblack,项目名称:webknowledge,代码行数:81,代码来源:frmMain.cs
注:本文中的csExWB类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论