• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# IButtonControl类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IButtonControl的典型用法代码示例。如果您正苦于以下问题:C# IButtonControl类的具体用法?C# IButtonControl怎么用?C# IButtonControl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IButtonControl类属于命名空间,在下文中一共展示了IButtonControl类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: OnLoad

        protected override void OnLoad(EventArgs e)
        {
            SubmitButton = (IButtonControl)Page.FindControl(this.SubmitButtonID);
            SubmitButton.Click += new EventHandler(CreateCustomerButtonClick);

            ErrorButton = (IButtonControl)Page.FindControl(this.ErrorButtonID);
            ErrorButton.Click += new EventHandler(CustomerErrorButtonClick);
        }
开发者ID:IdeaFortune,项目名称:Monaco,代码行数:8,代码来源:CustomerForm.cs


示例2: SetPostBackUrl

        private static void SetPostBackUrl(IButtonControl button, bool redirectToOriginalPath)
        {
            if (button == null)
                throw new ArgumentNullException("button");

            var backUrl = PortalContext.Current.RequestedUri.PathAndQuery;
            backUrl = redirectToOriginalPath ? PortalContext.Current.BackUrl : Uri.EscapeDataString(backUrl);
            var postBackUrl = String.IsNullOrEmpty(backUrl) ? "/UploadProxy.ashx" : String.Concat("/UploadProxy.ashx", "?back=", backUrl);
            button.PostBackUrl = postBackUrl;
        }
开发者ID:maxpavlov,项目名称:FlexNet,代码行数:10,代码来源:SimpleUpload.cs


示例3: OnLoad

        protected override void OnLoad(EventArgs e)
        {
            SubmitButton = (IButtonControl)Page.FindControl(this.SubmitButtonID);
            SubmitButton.Click += new EventHandler(SubmitButton_Click);

            ErrorButton = (IButtonControl)Page.FindControl(this.ErrorButtonID);
            ErrorButton.Click += new EventHandler(ErrorButton_Click);

            if (!Page.IsPostBack)
                DataBind();
        }
开发者ID:IdeaFortune,项目名称:Monaco,代码行数:11,代码来源:OrderForm.cs


示例4: GetCallbackScript

        public string GetCallbackScript(IButtonControl buttonControl, string argument)
        {
            ClientScriptManager cm = Page.ClientScript;
            string callBackArg = string.Format("'{0}'", DataSource.ToString());

            string js = String.Format("javascript:{0};{1};{2}; return false;",
            "__theFormPostData = ''",
            "WebForm_InitCallback()",
            cm.GetCallbackEventReference(this, callBackArg,
            clientCallBackFunctionName, "null"));

            return js;
        }
开发者ID:jacekmlynek,项目名称:Presentation,代码行数:13,代码来源:CallBackCalenarPriceCell.ascx.cs


示例5: SetCommandName

        public void SetCommandName(IButtonControl control, string value)
        {
            if (value != null)
            {
                if (!_controlMappings.ContainsKey(control))
                    RegisterClick(control);

                _controlMappings[control] = value;
            }
            else if (_controlMappings.ContainsKey(control))
            {
                UnregisterClick(control);
                _controlMappings.Remove(control);
            }
        }
开发者ID:kevinmmccormick,项目名称:POGS,代码行数:15,代码来源:CommandManager.cs


示例6: UpdateDefaultButton

	protected override void UpdateDefaultButton()
			{
				// Find the bottom active control.
				ContainerControl c = this;
				while (true)
				{
					ContainerControl nextActive = c.ActiveControl as ContainerControl;
					if (nextActive == null)
					{
						break;
					}
					c = nextActive;
				}

				IButtonControl newDefaultButton = c as IButtonControl;
				if (c == null)
				{
					newDefaultButton = acceptButton;
				}

				if (newDefaultButton != defaultButton)
				{
					// Notify the previous button that it is not the default.
					if (defaultButton != null)
					{
						defaultButton.NotifyDefault(false);
					}
					defaultButton = newDefaultButton;
					if (defaultButton != null)
					{
						defaultButton.NotifyDefault(true);
					}
				}
			} 
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:34,代码来源:Form.cs


示例7: GetCallbackScript

		protected virtual string GetCallbackScript (IButtonControl control, string argument)
		{
			if (EnableSortingAndPagingCallbacks) {
				Page page = Page;
				if (page != null)
					page.ClientScript.RegisterForEventValidation (UniqueID, argument);
				return "javascript:GridView_ClientEvent (\"" + ClientID + "\",\"" + control.CommandName + "$" + control.CommandArgument + "\"); return false;";
			} else
				return null;
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:10,代码来源:GridView.cs


示例8: ApplyButtonStyleInternal

 protected void ApplyButtonStyleInternal(IButtonControl control, Style buttonStyle) {
     WebControl webCtrl = control as WebControl;
     if (webCtrl != null) {
         webCtrl.ApplyStyle(buttonStyle);
         webCtrl.ControlStyle.MergeWith(Owner.NavigationButtonStyle);
     }
 }
开发者ID:uQr,项目名称:referencesource,代码行数:7,代码来源:Wizard.cs


示例9: NavigationTemplate

            private NavigationTemplate(Wizard wizard, WizardTemplateType templateType, bool button1CausesValidation,
                String label1ID, String label2ID, String label3ID) {

                _wizard = wizard;
                _button1ID = label1ID;
                _button2ID = label2ID;
                _button3ID = label3ID;

                _templateType = templateType;

                _buttons = new IButtonControl[3][];
                _buttons[0] = new IButtonControl[3];
                _buttons[1] = new IButtonControl[3];
                _buttons[2] = new IButtonControl[3];

                _button1CausesValidation = button1CausesValidation;
            }
开发者ID:uQr,项目名称:referencesource,代码行数:17,代码来源:Wizard.cs


示例10: RegisterCommandEvents

		protected internal void RegisterCommandEvents (IButtonControl button)
		{
			button.Command += ProcessCommand;
		}
开发者ID:Profit0004,项目名称:mono,代码行数:4,代码来源:Wizard.cs


示例11: SetDefaultButton

 private void SetDefaultButton(IButtonControl button)
 {
     IButtonControl control = (IButtonControl) base.Properties.GetObject(PropDefaultButton);
     if (control != button)
     {
         if (control != null)
         {
             control.NotifyDefault(false);
         }
         base.Properties.SetObject(PropDefaultButton, button);
         if (button != null)
         {
             button.NotifyDefault(true);
         }
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:16,代码来源:Form.cs


示例12: ApplyButtonProperties

 private static void ApplyButtonProperties(IButtonControl button, string text, string imageUrl) {
     ApplyButtonProperties(button, text, imageUrl, true);
 }
开发者ID:uQr,项目名称:referencesource,代码行数:3,代码来源:Wizard.cs


示例13: GetCallbackScript

      public string GetCallbackScript(IButtonControl buttonControl, string argument)
      {
          return Page.ClientScript.GetCallbackEventReference(
this, "", "RefreshPanel", "null");
      }
开发者ID:Helen1987,项目名称:edu,代码行数:5,代码来源:DynamicPanel.cs


示例14: CreateButtonControl

            private void CreateButtonControl(IButtonControl[] buttons, String id, bool causesValidation, string commandName) {
                LinkButton linkButton = new LinkButton();
                linkButton.CausesValidation = causesValidation;
                linkButton.ID = id + "LinkButton";
                linkButton.Visible = false;
                linkButton.CommandName = commandName;
                linkButton.TabIndex = _wizard.TabIndex;
                _wizard.RegisterCommandEvents(linkButton);
                buttons[0] = linkButton;

                ImageButton imageButton = new ImageButton();
                imageButton.CausesValidation = causesValidation;
                imageButton.ID = id + "ImageButton";
                imageButton.Visible = true;
                imageButton.CommandName = commandName;
                imageButton.TabIndex = _wizard.TabIndex;
                _wizard.RegisterCommandEvents(imageButton);
                imageButton.PreRender += new EventHandler(OnPreRender);
                buttons[1] = imageButton;

                Button button = new Button();
                button.CausesValidation = causesValidation;
                button.ID = id + "Button";
                button.Visible = false;
                button.CommandName = commandName;
                button.TabIndex = _wizard.TabIndex;
                _wizard.RegisterCommandEvents(button);
                buttons[2] = button;

                TableCell tableCell = new TableCell();
                tableCell.HorizontalAlign = HorizontalAlign.Right;
                _row.Cells.Add(tableCell);

                tableCell.Controls.Add(linkButton);
                tableCell.Controls.Add(imageButton);
                tableCell.Controls.Add(button);
            }
开发者ID:uQr,项目名称:referencesource,代码行数:37,代码来源:Wizard.cs


示例15: ArgumentNullException

		PostBackOptions IPostBackContainer.GetPostBackOptions (IButtonControl control)
		{
			if (control == null)
				throw new ArgumentNullException ("control");
			
			if (control.CausesValidation)
				throw new InvalidOperationException ("A button that causes validation in GridView '" + ID + "' is attempting to use the container GridView as the post back target.  The button should either turn off validation or use itself as the post back container.");
			
			PostBackOptions options = new PostBackOptions (this);
			options.Argument = control.CommandName + "$" + control.CommandArgument;
			options.RequiresJavaScriptProtocol = true;

			return options;
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:14,代码来源:GridView.cs


示例16: SetDefaultButton

        /// <devdoc>
        ///     Sets the defaultButton for the form. The defaultButton is "clicked" when
        ///     the user presses Enter.
        /// </devdoc>
        private void SetDefaultButton(IButtonControl button) {
            IButtonControl defaultButton = (IButtonControl)Properties.GetObject(PropDefaultButton);

            if (defaultButton != button) {
                if (defaultButton != null) defaultButton.NotifyDefault(false);
                Properties.SetObject(PropDefaultButton, button);
                if (button != null) button.NotifyDefault(true);
            }
        }
开发者ID:mind0n,项目名称:hive,代码行数:13,代码来源:Form.cs


示例17: DoGetCallbackScript

			public string DoGetCallbackScript (IButtonControl buttonControl, string argument)
			{
				return GetCallbackScript (buttonControl, argument);
			}
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:4,代码来源:DetailsViewTest.cs


示例18: OnCommand

 private void OnCommand(object sender, CommandEventArgs e) {
     Debug.Assert(_commandSender == null);
     _commandSender = sender as IButtonControl;
 }
开发者ID:uQr,项目名称:referencesource,代码行数:4,代码来源:Wizard.cs


示例19: RegisterCommandEvents

 protected internal void RegisterCommandEvents(IButtonControl button) {
     if (button != null && button.CausesValidation) {
         button.Command += new CommandEventHandler(this.OnCommand);
     }
 }
开发者ID:uQr,项目名称:referencesource,代码行数:5,代码来源:Wizard.cs


示例20: FromEnter

 private void FromEnter( object sender, EventArgs e )
 {
     if ( LicenseManager.UsageMode != LicenseUsageMode.Designtime && DoubleClickSupport && listBoxFrom != null )
     {
         Form f = listBoxFrom.FindForm();
         previousButton = f.AcceptButton;
         f.AcceptButton = button;
     }
 }
开发者ID:Wi150nZ,项目名称:lioneditor,代码行数:9,代码来源:DualList.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IByteBuffer类代码示例发布时间:2022-05-24
下一篇:
C# IButton类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap