当前位置: 首页>>代码示例>>C#>>正文


C# DomEvent.PreventDefault方法代码示例

本文整理汇总了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");
						//            }
						//        )
						//    );
						//}
					}
				)
			);

			
		}
开发者ID:davelondon,项目名称:dontstayin,代码行数:35,代码来源:Controller.cs

示例2: addTagButtonClick

		private void addTagButtonClick(DomEvent e)
		{
			e.PreventDefault();

			addTag(view.uiTagAutoSuggest.Text);
			view.uiTagAutoSuggest.Text = "";
		}
开发者ID:davelondon,项目名称:dontstayin,代码行数:7,代码来源:Controller.cs

示例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();
		}
开发者ID:davelondon,项目名称:dontstayin,代码行数:27,代码来源:Controller.cs

示例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");
					}
				)
			);

		}
开发者ID:davelondon,项目名称:dontstayin,代码行数:25,代码来源:Controller.cs

示例5: OnKeyDown

		private void OnKeyDown(DomEvent e)
		{
			if ("ABCDEFGHIJKLMNOPQRSTUVWXYZ,.;#[]".IndexOf(String.FromCharCode(e.KeyCode)) > -1)
			{
				e.PreventDefault();
			}
		}
开发者ID:davelondon,项目名称:dontstayin,代码行数:7,代码来源:Controller.cs

示例6: HandleClick

 public static void HandleClick(AnchorElement anchor, DomEvent evt, AjaxOptions ajaxOptions) {
     evt.PreventDefault();
     MvcHelpers.AsyncRequest(anchor.Href,
                             "post",
                             "",
                             anchor,
                             ajaxOptions);
 }
开发者ID:sanyaade-mobiledev,项目名称:ASP.NET-Mvc-2,代码行数:8,代码来源:AsyncHyperlink.cs

示例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);

        }
开发者ID:sanyaade-mobiledev,项目名称:ASP.NET-Mvc-2,代码行数:10,代码来源:AsyncForm.cs

示例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);
			}
		}
开发者ID:davelondon,项目名称:dontstayin,代码行数:39,代码来源:PhotoBrowsingUsingKeysControl.cs

示例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();
		}
开发者ID:davelondon,项目名称:dontstayin,代码行数:19,代码来源:Controller.cs

示例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));

		}
开发者ID:davelondon,项目名称:dontstayin,代码行数:20,代码来源:Controller.cs

示例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);

        }
开发者ID:adrianvallejo,项目名称:MVC3_Source,代码行数:22,代码来源:AsyncForm.cs

示例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
			}


		}
开发者ID:davelondon,项目名称:dontstayin,代码行数:39,代码来源:Controller.cs

示例13: closeButtonClick

		void closeButtonClick(DomEvent e)
		{
			Area.Remove(this, true, false);

			e.PreventDefault();
		}
开发者ID:davelondon,项目名称:dontstayin,代码行数:6,代码来源:Popup.cs

示例14: holderMouseOut

		void holderMouseOut(DomEvent e)
		{
			itemsListCancelMouseOut = false;
			Window.SetTimeout(itemsListMouseOutAfterDelay, 0);
			e.PreventDefault();
		}
开发者ID:davelondon,项目名称:dontstayin,代码行数:6,代码来源:Popup.cs

示例15: holderMouseOver

		void holderMouseOver(DomEvent e)
		{
			itemsListCancelMouseOut = true;
			if (ItemsList != null)
				ItemsList.ClassName = "ChatClientPopupItemsList ChatClientPopupItemsListMouseOver";
			e.PreventDefault();
		}
开发者ID:davelondon,项目名称:dontstayin,代码行数:7,代码来源:Popup.cs


注:本文中的Sys.UI.DomEvent.PreventDefault方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。