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

C# ControlCollection类代码示例

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

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



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

示例1: Control

        public Control()
        {
            if (formSkin == null)
                formSkin = SharedInformation.ContentManager.Load<Texture2D>(@"data\fb\texture\wndskin.png");

            if (gulim8 == null)
                gulim8 = SharedInformation.ContentManager.Load<SpriteFont>(@"fb\Gulim8.xnb");

            if (gulim8B == null)
                gulim8B = SharedInformation.ContentManager.Load<SpriteFont>(@"fb\Gulim8b.xnb");

            if (tingSound == null)
                tingSound = SharedInformation.ContentManager.Load<SoundEffect>(@"data\wav\버튼소리.wav");

            _controls = new ControlCollection(this);
            _handle = GuiManager.Singleton.GetNewHandle();

            _foreColor = Color.Black;
            _backColor = Color.White;

            _text = "";

            _visible = true;
            _enabled = true;
            _tabStop = false;

            _zorder = 0;
            _font = Gulim8;
        }
开发者ID:GodLesZ,项目名称:FimbulwinterClient,代码行数:29,代码来源:Control.cs


示例2: LoadProperties

 protected void LoadProperties(string source)
 {
     XmlDocument document = new XmlDocument();
     document.LoadXml(source);
     XmlNodeList elementsByTagName = document.GetElementsByTagName("Property");
     this.mPropertyDoc = (XmlDocument) document.Clone();
     XmlElement element = this.mPropertyDoc.CreateElement("properties");
     string str = "";
     XmlNode newChild = null;
     foreach (XmlNode node2 in elementsByTagName)
     {
         XmlAttribute namedItem = (XmlAttribute) node2.Attributes.GetNamedItem("control");
         if (str != namedItem.Value)
         {
             newChild = element.OwnerDocument.CreateElement(namedItem.Value);
             element.AppendChild(newChild);
             str = namedItem.Value;
         }
         XmlElement element2 = newChild.OwnerDocument.CreateElement("Property");
         for (int i = 0; i < node2.Attributes.Count; i++)
         {
             element2.SetAttribute(node2.Attributes[i].Name, node2.Attributes[i].Value);
         }
         newChild.AppendChild(element2);
     }
     this.Controls = new ControlCollection(element.ChildNodes);
 }
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:27,代码来源:PropertiesCollection.cs


示例3: RecurseControls

    private void RecurseControls(ControlCollection c)
    {
        // Only one of the passed controls will contain all the questions.
        int i = 0;
        foreach (Control con in c)
        {
            HtmlGenericControl hgc = con as HtmlGenericControl;
            if (hgc != null && hgc.TagName.ToUpperInvariant() == "H3")
            {
                if (hgc.Attributes["class"] == "question")
                {
                    string id = "q" + i.ToString();
                    hgc.Attributes.Add("id", id);

                    // Add to TOC
                    HtmlGenericControl tocItem = new HtmlGenericControl("li");
                    HtmlGenericControl anchor = new HtmlGenericControl("a");
                    anchor.Attributes.Add("href", "#" + id);
                    anchor.InnerText = hgc.InnerText;
                    tocItem.Controls.Add(anchor);
                    toc.Controls.Add(tocItem);

                    i++;
                }
            }

            this.RecurseControls(con.Controls);
        }
    }
开发者ID:tmzu,项目名称:keymapper,代码行数:29,代码来源:faq.aspx.cs


示例4: DisplayData

 protected void DisplayData(ControlCollection controls)
 {        
     foreach (KeyValuePair<string, string> item in (Dictionary<string,string>)ViewState["formData"])
     {            
         Label1.Text += item.Value + " ";
     }
 }
开发者ID:naynishchaughule,项目名称:ASP.NET,代码行数:7,代码来源:ApplicationForm.aspx.cs


示例5: Add

		/// <summary>
		/// Add one ControlCollection to another.  Combines them into one collection.
		/// </summary>
		/// <param name="collection">The collection to merge with this one.</param>
		public void Add(ControlCollection collection)
		{
			foreach(Control control in collection)
			{
				Add(control);
			}
		}
开发者ID:bbriggs,项目名称:wesay,代码行数:11,代码来源:ControlCollection.cs


示例6: ClearInputs

    //this method clears all the textboxes without actually calling all the seperate values
    private void ClearInputs(ControlCollection ctrls)
    {
        foreach (Control ctrl in ctrls)
        {
            if (ctrl is TextBox)
                ((TextBox)ctrl).Text = string.Empty;

            ClearInputs(ctrl.Controls);
        }
    }
开发者ID:scottbeachy,项目名称:SeniorProject,代码行数:11,代码来源:contact.aspx.cs


示例7: SetReadOnly

    private void SetReadOnly(bool isReadOnly, ControlCollection collection)
    {
        foreach (DictionaryEntry dic in DataControlCollection)
        {
            IWebDataControl dc = (IWebDataControl)dic.Value;
            dc.SetReadOnly(isReadOnly);
        }

        TxtVersion.SetReadOnly(true);
    }
开发者ID:HeyWeiPan,项目名称:WarehouseControlSystem,代码行数:10,代码来源:AppInformation.aspx.cs


示例8: ClearControls

 public void ClearControls(ControlCollection ctrl)
 {
    foreach(Control ctl in ctrl)
     {
         if(ctl is TextBox)
         {
             (ctl as TextBox).Text = " ";
         }
         ClearControls(ctl.Controls);
     }
 }
开发者ID:ananth039,项目名称:Anantha-Kumar-.net-Practice-programs,代码行数:11,代码来源:PostArticles.aspx.cs


示例9: CompositeControlBase

 protected CompositeControlBase()
 {
     _controls = new ControlCollection(this);
     _controls.ControlAdded += (sender, args) => ChangeControl(args.Control, true);
     _controls.ControlRemoved += (sender, args) => ChangeControl(args.Control, false);
     _controls.ControlsReset += (sender, args) =>
         {
             args.OldControls.ForEach(c => ChangeControl(c, false));
             args.NewControls.ForEach(c => ChangeControl(c, true));
         };
 }
开发者ID:jam40jeff,项目名称:CsJs,代码行数:11,代码来源:CompositeControlBase.cs


示例10: Control

 /// <summary>
 /// Initializes a new instance of the <see cref="Control"/> class.
 /// </summary>
 protected Control()
 {
     this.Name = this.DefaultName;
     if (this.CanContainAttributes)
     {
         this.attributes = new ControlAttributeCollection();
     }
     if (this.CanContainControls)
     {
         this.controls = new ControlCollection();
     }
 }
开发者ID:cathode,项目名称:Serenity,代码行数:15,代码来源:Control.cs


示例11: ClearInputs

    private void ClearInputs(ControlCollection ctrls)
    {
        foreach (Control ctrl in ctrls)
        {
            if (ctrl is TextBox)
                ((TextBox)ctrl).Text = string.Empty;
            else if (ctrl is DropDownList)
                ((DropDownList)ctrl).ClearSelection();

            ClearInputs(ctrl.Controls);
        }
    }
开发者ID:neonmax,项目名称:sims,代码行数:12,代码来源:AppointmentLogReport.aspx.cs


示例12: AttachVisibilityBindings

        public void AttachVisibilityBindings(ControlCollection controls)
        {
            for (int i = 0; (i < controls.Count); i = (i + 1))
            {
                if ((controls[i].DataBindings["Visible"] != null))
                {
                    // Attach event handlers to auto-hide controls.
                    controls[i].DataBindings["Visible"].Format += new System.Windows.Forms.ConvertEventHandler(this.Visibility_Format);
                    controls[i].DataBindings["Visible"].DataSourceUpdateMode = System.Windows.Forms.DataSourceUpdateMode.Never;
                }
            }

        }
开发者ID:Jevaan,项目名称:Strandmollen,代码行数:13,代码来源:BarcodesSummaryViewDialog.Designer.cs


示例13: SetControlPermission

    private void SetControlPermission(ControlCollection controlCollection)
    {

        //new TextBox().Attributes[]
        foreach (Control chilControl in controlCollection)
        {
            if ((chilControl as WebControl) != null)
                (chilControl as WebControl).Attributes["permissionRequired"] = "Service";
            if (chilControl.HasControls())
                SetControlPermission(chilControl.Controls);
        }

    }
开发者ID:sidneylimafilho,项目名称:InfoControl,代码行数:13,代码来源:Service.aspx.cs


示例14: ClearTextboxes

 public static void ClearTextboxes(ControlCollection cc)
 {
     foreach (Control ctrl in cc)
     {
         TextBox tb = ctrl as TextBox;
         if (tb != null)
         {
             tb.Text = "";
         }
         else
             ClearTextboxes(ctrl.Controls);
     }
 }
开发者ID:abramlimpin,项目名称:TaskTracker,代码行数:13,代码来源:Helper.cs


示例15: ClearControlsData

    //if clear the  values in form controls
    private void ClearControlsData(ControlCollection ctrl)
    {
        foreach (Control ctr in ctrl)
        {
            if (ctr is TextBox)
                (ctr as TextBox).Text = " ";
            if (ctr is DropDownList)
                (ctr as DropDownList).SelectedIndex = 0;
            ClearControlsData(ctr.Controls);

        }


    }
开发者ID:ananth039,项目名称:Anantha-Kumar-.net-Practice-programs,代码行数:15,代码来源:ForgetPassword.aspx.cs


示例16: SetTabEnabled

 private void SetTabEnabled(bool isEnabled, ControlCollection collection)
 {
     foreach (Control c in collection)
     {
         if (c is UcHyperLink)
         {
             UcHyperLink obj = c as UcHyperLink;
             obj.Enabled = isEnabled;
         }
         if (c.HasControls())
         {
             SetTabEnabled(isEnabled, c.Controls);
         }
     }
 }
开发者ID:HeyWeiPan,项目名称:WarehouseControlSystem,代码行数:15,代码来源:UcAppInformationTabs.ascx.cs


示例17: SetControlsReadOnly

 private void SetControlsReadOnly(ControlCollection cl, bool b)
 {
     foreach (Control c in cl)
     {
         if (c is IWebDataControl)
         {
             IWebDataControl dc = (IWebDataControl)c;
             dc.RequiredField = false;
             dc.ReadOnlyWhenInsert = true;
             dc.ReadOnlyWhenUpdate = true;
             dc.AllowUpdate = false;
             dc.AllowInsert = false;
         }
     }
 }
开发者ID:HeyWeiPan,项目名称:WarehouseControlSystem,代码行数:15,代码来源:UcUserPay.ascx.cs


示例18: DeselectAllTab

 private void DeselectAllTab(ControlCollection collection)
 {
     foreach (Control c in collection)
     {
         if (c is UcHyperLink)
         {
             UcHyperLink obj = c as UcHyperLink;
             obj.ShowStyle = EnumHyperLinkShowStyle.TabWhite;
         }
         if (c.HasControls())
         {
             DeselectAllTab(c.Controls);
         }
     }
 }
开发者ID:HeyWeiPan,项目名称:WarehouseControlSystem,代码行数:15,代码来源:UcAppInformationTabs.ascx.cs


示例19: ClearControls

 public void ClearControls(ControlCollection ctrl)
 {
     foreach (Control ctl in ctrl)
     {
         if (ctl is TextBox)
         {
             (ctl as TextBox).Text = "";
         }
         if (ctl is DropDownList)
         {
             (ctl as DropDownList).SelectedIndex = 0;
         }
         ClearControls(ctl.Controls);
     }
 }
开发者ID:ananth039,项目名称:Anantha-Kumar-.net-Practice-programs,代码行数:15,代码来源:UserRegisteration.aspx.cs


示例20: SaveAllText

	private void SaveAllText(ControlCollection controls, bool saveNested)
	{
		foreach (Control control in controls)
		{
			if (control is TextBox)
			{
				// Add the text to a collection.
				textToSave.Add(control.ID, ((TextBox)control).Text);
			}
			if ((control.Controls != null) && saveNested)
			{
				SaveAllText(control.Controls, true);
			}
		}
	}
开发者ID:Helen1987,项目名称:edu,代码行数:15,代码来源:ViewStateObjects.aspx.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# ControlCopyFlags类代码示例发布时间:2022-05-24
下一篇:
C# Control类代码示例发布时间: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