本文整理汇总了C#中Sys.UI.DomEvent.PreventDefault方法的典型用法代码示例。如果您正苦于以下问题:C# DomEvent.PreventDefault方法的具体用法?C# DomEvent.PreventDefault怎么用?C# DomEvent.PreventDefault使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sys.UI.DomEvent
的用法示例。
在下文中一共展示了DomEvent.PreventDefault方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: button2Click
public void button2Click(DomEvent e)
{
e.PreventDefault();
FB.api(
F.d("method", "fql.query", "query", "SELECT type, created_time FROM page_fan WHERE page_id=\"18658586341\" AND uid=\"" + CurrentFacebookUID + "\""),
new Response(
delegate(Dictionary likeFqlResponse)
{
debug(U.toString(likeFqlResponse));
//if (U.exists(likeFqlResponse, "/value/type"))
//{
// JQueryAPI.JQuery(View.ConnectDialog).dialog("close");
//}
//else
//{
// changePanel("View.Connect_LikeButtonPanel");
// FB.Event.subscribe(
// "edge.create",
// new Response(
// delegate(Dictionary edgeCreateResponse)
// {
// JQueryAPI.JQuery(View.ConnectDialog).dialog("close");
// }
// )
// );
//}
}
)
);
}
示例2: addTagButtonClick
private void addTagButtonClick(DomEvent e)
{
e.PreventDefault();
addTag(view.uiTagAutoSuggest.Text);
view.uiTagAutoSuggest.Text = "";
}
示例3: OnAddNearbyClick
private void OnAddNearbyClick(DomEvent e)
{
try
{
Service.GetSurroundingPlaces
(
int.ParseInvariant(this.view.uiRadiusPlaceAutoComplete.Value),
int.ParseInvariant(this.view.uiNumberOfSurroundingTownsDropDown.Value),
delegate(PlaceStub[] result, object context, string name)
{
for (int i = 0; i < result.Length; i++)
{
this.view.uiPlacesMultiSelector.AddItem(result[i].name, result[i].k.ToString());
}
this.view.uiRadiusPlaceAutoComplete.Clear();
},
Trace.WebServiceFailure,
null,
5000
);
}catch(Exception)
{
}
e.PreventDefault();
}
示例4: button1Click
public void button1Click(DomEvent e)
{
e.PreventDefault();
debug("click!");
FB.getLoginStatus(
new Response(
delegate(Dictionary statusResponse)
{
updateCurrentFacebookLoginStatus(statusResponse);
}
)
);
FB.Event.subscribe(
"edge.create",
new Response(
delegate(Dictionary edgeCreateResponse)
{
debug("edge.create");
}
)
);
}
示例5: OnKeyDown
private void OnKeyDown(DomEvent e)
{
if ("ABCDEFGHIJKLMNOPQRSTUVWXYZ,.;#[]".IndexOf(String.FromCharCode(e.KeyCode)) > -1)
{
e.PreventDefault();
}
}
示例6: HandleClick
public static void HandleClick(AnchorElement anchor, DomEvent evt, AjaxOptions ajaxOptions) {
evt.PreventDefault();
MvcHelpers.AsyncRequest(anchor.Href,
"post",
"",
anchor,
ajaxOptions);
}
示例7: HandleSubmit
public static void HandleSubmit(FormElement form, DomEvent evt, AjaxOptions ajaxOptions) {
evt.PreventDefault();
string body = MvcHelpers.SerializeForm(form);
MvcHelpers.AsyncRequest(form.Action,
form.Method ?? "post",
body,
form,
ajaxOptions);
}
示例8: KeyDown
protected void KeyDown(DomEvent e)
{
if (e.KeyCode == (int)Key.Right)
{
if (OnArrowKeyPress != null)
OnArrowKeyPress(this, EventArgs.Empty);
if (OnPhotoNextClick != null)
OnPhotoNextClick(this, EventArgs.Empty);
e.PreventDefault();
}
else if (e.KeyCode == (int)Key.Left)
{
if (OnArrowKeyPress != null)
OnArrowKeyPress(this, EventArgs.Empty);
if (OnPhotoPrevClick != null)
OnPhotoPrevClick(this, EventArgs.Empty);
e.PreventDefault();
}
//else if (e.KeyCode == (int)Key.Up)
//{
// if (OnArrowKeyPress != null)
// OnArrowKeyPress(this, EventArgs.Empty);
// if (OnPhotoUpClick != null)
// OnPhotoUpClick(this, EventArgs.Empty);
// e.PreventDefault();
//}
//else if (e.KeyCode == (int)Key.Down)
//{
// if (OnArrowKeyPress != null)
// OnArrowKeyPress(this, EventArgs.Empty);
// if (OnPhotoDownClick != null)
// OnPhotoDownClick(this, EventArgs.Empty);
// e.PreventDefault();
//}
else
{
NonArrowKeyDown(e);
}
}
示例9: OnAddClick
private void OnAddClick(DomEvent e)
{
int[] brands = new int[]{};
if (view.uiBrand.Value.Length > 0)
{
brands[0] = int.ParseInvariant(view.uiBrand.Value);
}
Service.AddEvent(
view.uiCal.GetDate(),
view.uiVenueGetter.GetVenue().k,
view.uiEventName.Text,
view.uiSummary.Value,
brands,
AddEventSuccess,
Trace.WebServiceFailure,
null,
5000);
e.PreventDefault();
}
示例10: photoClick
private void photoClick(DomEvent e)
{
e.PreventDefault();
for (int i = 0; i < cells.Length; i++)
{
// Image Div(?) TableCell
if (cells[i] == (TableCellElement)e.Target.ParentNode.ParentNode)
{
SelectedIndex = i;
break;
}
}
highlightCell();
if (OnChangePhoto != null)
OnChangePhoto(this, new IntEventArgs(SelectedIndex));
}
示例11: HandleSubmit
public static void HandleSubmit(FormElement form, DomEvent evt, AjaxOptions ajaxOptions) {
evt.PreventDefault();
// run validation
ArrayList validationCallbacks = (ArrayList)Type.GetField(form, "validationCallbacks");
if (validationCallbacks != null) {
for (int i = 0; i < validationCallbacks.Length; i++) {
ValidationCallback callback = (ValidationCallback)validationCallbacks[i];
if (!callback()) {
return; // bail out since validation failed
}
}
}
string body = MvcHelpers.SerializeForm(form);
MvcHelpers.AsyncRequest(form.Action,
form.Method ?? "post",
body,
form,
ajaxOptions);
}
示例12: vote1VoteButtonClick
void vote1VoteButtonClick(DomEvent e)
{
debug("vote1VoteButtonClick");
e.PreventDefault();
if (CurrentFacebookLoggedIn && CurrentFacebookConnected)
{
confirmFacebookAccount();
}
else
{
#region login
int asyncOperation = RegisterStartAsyncGeneric("Connecting...", false, false); // Don't set the timer to show the cencel button.
FB.login(
new Response(
delegate(Dictionary loginResponse)
{
if (RegisterEndAsync(asyncOperation))
return;
if (CurrentFacebookConnected)
{
confirmFacebookAccount();
}
else
{
showError("Looks like Facebook had trouble getting you connected.");
}
}
),
F.d("scope", "email,publish_stream")
);
//Check out: http://developers.facebook.com/docs/authentication/permissions
#endregion
}
}
示例13: closeButtonClick
void closeButtonClick(DomEvent e)
{
Area.Remove(this, true, false);
e.PreventDefault();
}
示例14: holderMouseOut
void holderMouseOut(DomEvent e)
{
itemsListCancelMouseOut = false;
Window.SetTimeout(itemsListMouseOutAfterDelay, 0);
e.PreventDefault();
}
示例15: holderMouseOver
void holderMouseOver(DomEvent e)
{
itemsListCancelMouseOut = true;
if (ItemsList != null)
ItemsList.ClassName = "ChatClientPopupItemsList ChatClientPopupItemsListMouseOver";
e.PreventDefault();
}