本文整理汇总了C#中csExWB类的典型用法代码示例。如果您正苦于以下问题:C# csExWB类的具体用法?C# csExWB怎么用?C# csExWB使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
csExWB类属于命名空间,在下文中一共展示了csExWB类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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());
}
}
示例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());
}
示例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());
}
}
示例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());
}
}
示例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]);
}
}
}
示例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());
}
}
示例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);
}
}
}
示例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;
}
}
示例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);
}
示例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);
}
示例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);
}
示例12: cEXWB1_BeforeNavigate2
void cEXWB1_BeforeNavigate2(object sender, csExWB.BeforeNavigate2EventArgs e)
{
Debug.Print(">>>>>>BeforeNavigate2=>" + e.url);
}
示例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
}
}
示例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());
}
}
示例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());
}
}