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


C# IButtonControl类代码示例

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


IButtonControl类属于命名空间,在下文中一共展示了IButtonControl类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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;未经允许,请勿转载。