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


C# Control.Equals方法代码示例

本文整理汇总了C#中System.Windows.Forms.Control.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# Control.Equals方法的具体用法?C# Control.Equals怎么用?C# Control.Equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Forms.Control的用法示例。


在下文中一共展示了Control.Equals方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetPropertyName

 public string GetPropertyName(Control control)
 {
     foreach(BinderItem item in binders)
     {
         if (control.Equals(item.Control))
             return item.PropertyName;
     }
     throw new InvalidOperationException("Could not find the Entity Type for this control");
 }
开发者ID:martinherr3,项目名称:medusa,代码行数:9,代码来源:ViewValidator.cs

示例2: GetEntityType

 public Type GetEntityType(Control control)
 {
     foreach(BinderItem item in binders)
     {
         if (control.Equals(item.Control))
             return item.Clazz;
     }
     throw new InvalidOperationException("Could not find the Entity Type for this control");
 }
开发者ID:martinherr3,项目名称:medusa,代码行数:9,代码来源:ViewValidator.cs

示例3: AddAllControlGlyphs

 private void AddAllControlGlyphs(Control parent, ArrayList selComps, object primarySelection)
 {
     foreach (Control control in parent.Controls)
     {
         this.AddAllControlGlyphs(control, selComps, primarySelection);
     }
     GlyphSelectionType notSelected = GlyphSelectionType.NotSelected;
     if (selComps.Contains(parent))
     {
         if (parent.Equals(primarySelection))
         {
             notSelected = GlyphSelectionType.SelectedPrimary;
         }
         else
         {
             notSelected = GlyphSelectionType.Selected;
         }
     }
     this.AddControlGlyphs(parent, notSelected);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:20,代码来源:SelectionManager.cs

示例4: if

        /// <summary>
        /// 验证控件绑定非空
        /// </summary>
        /// <param name="con">控件</param>
        bool I_DXErrorProvider.ValidateControl(Control con, Interface_Enum.ValidateEnum ve , string errorText)
        {
            //判断当前对象控件是否已经存在
            var cet = this.l_NEcon.Where(c => con.Equals(c.con)).SingleOrDefault();
            if (cet == null)
            {
                cet = new ConErrText
                {
                    con = con,
                    ve = ve,
                    errText = errorText
                };
                con.Validating += con_Validating;
                this.l_NEcon.Add(cet);
            }
            else
            {
                if (cet.ve != ve)
                    cet.ve = ve;
                else if (cet.errText != errorText)
                    cet.errText = errorText;
            }

            return this.ValidateRun(cet);
        }
开发者ID:sephirothwzc,项目名称:SephirothORM,代码行数:29,代码来源:DC_DXErrorProvider.cs

示例5: CallObjectEquals

		public static object CallObjectEquals(Control c, object[] obj)
		{
			return c.Equals(obj[0]);
		}
开发者ID:HosokawaKenchi,项目名称:powersdr-if-stage,代码行数:4,代码来源:invoke.cs

示例6: CheckControl

 private void CheckControl(Control control)
 {
     foreach (Control control2 in control.Controls)
     {
         this.CheckControl(control2);
     }
     if (!((control is TextBoxMaskBox) || control.Equals(this.textBoxMsg)))
     {
         control.KeyPress += new KeyPressEventHandler(this.control_KeyPress);
     }
 }
开发者ID:micheljung,项目名称:gpgnetfix,代码行数:11,代码来源:FrmPrivateChat.cs

示例7: InsertField

 private void InsertField(Control ctrl, Control holder, Type t)
 {
     bool isChild = !holder.Equals(InfoPane);
     if (t == typeof(Label))
     {
         ctrl.Font = new Font("Segoe UI Light", 15);
         ctrl.BackColor = Color.Transparent;
         ctrl.Left = holder.Padding.Left;
         ctrl.AutoSize = true;
         ctrl.MaximumSize = new Size(FieldMaxWidth, 0);
     }
     else if (t == typeof(MetroCheckBox))
     {
         ctrl.Left = holder.Padding.Left + 6;
     }
     else if (t == typeof(MetroTextBox))
     {
         ctrl.AutoSize = false;
         ctrl.Left = holder.Padding.Left + 6;
     }
     ctrl.Top = isChild ? OffsetYForSlidingPane : FieldsOffsetY;
     holder.Controls.Add(ctrl);
     if (isChild) OffsetYForSlidingPane += ctrl.Height + FieldsPadding;
     else FieldsOffsetY += ctrl.Height + FieldsPadding;
 }
开发者ID:nodegin,项目名称:dhs,代码行数:25,代码来源:CheckoutForm.cs

示例8: InsertFieldHeader

 private void InsertFieldHeader(string name, Control holder)
 {
     Label lbl = new Label();
     lbl.BackColor = Color.Transparent;
     lbl.AutoSize = true;
     lbl.Font = new Font("Segoe UI Light", 12);
     lbl.ForeColor = Color.FromArgb(204, 204, 204);
     lbl.Text = name;
     lbl.Left = holder.Padding.Left;
     if (holder.Equals(InfoPane))
     {
         lbl.Top = FieldsOffsetY;
         holder.Controls.Add(lbl);
         FieldsOffsetY += lbl.Height + FieldHeaderPadding;
     }
     else
     {
         lbl.Top = OffsetYForSlidingPane;
         holder.Controls.Add(lbl);
         OffsetYForSlidingPane += lbl.Height + FieldHeaderPadding;
     }
 }
开发者ID:nodegin,项目名称:dhs,代码行数:22,代码来源:CheckoutForm.cs

示例9: TryGetInteractor

        /// <summary>
        /// Gets the interactor associated with a given control, if there is one.
        /// </summary>
        /// <param name="control">The control.</param>
        /// <param name="interactor">The interactor.</param>
        /// <returns>True if an interactor exists.</returns>
        public bool TryGetInteractor(Control control, out FormsInteractor interactor)
        {
            interactor = _interactors
                .FirstOrDefault(x => control.Equals(x.Control));

            return interactor != null;
        }
开发者ID:osin-vladimir,项目名称:EyeX,代码行数:13,代码来源:BehaviorMap.cs


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