<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FC_Sharp_by_API%2FSystem.Windows.Forms%2FErrorProvider</id>
		<title>Csharp/C Sharp by API/System.Windows.Forms/ErrorProvider - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FC_Sharp_by_API%2FSystem.Windows.Forms%2FErrorProvider"/>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp_by_API/System.Windows.Forms/ErrorProvider&amp;action=history"/>
		<updated>2026-04-30T13:44:36Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/C_Sharp_by_API/System.Windows.Forms/ErrorProvider&amp;diff=4144&amp;oldid=prev</id>
		<title> в 15:31, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp_by_API/System.Windows.Forms/ErrorProvider&amp;diff=4144&amp;oldid=prev"/>
				<updated>2010-05-26T15:31:35Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 15:31, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/C_Sharp_by_API/System.Windows.Forms/ErrorProvider&amp;diff=4145&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp_by_API/System.Windows.Forms/ErrorProvider&amp;diff=4145&amp;oldid=prev"/>
				<updated>2010-05-26T12:09:33Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==ErrorProvider.GetError==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
using System;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
using System.Text.RegularExpressions;&lt;br /&gt;
public class TextBoxValidationRegex : Form&lt;br /&gt;
{&lt;br /&gt;
    public TextBoxValidationRegex()&lt;br /&gt;
    {&lt;br /&gt;
        this.ruponents = new System.ruponentModel.Container();&lt;br /&gt;
        this.Button1 = new System.Windows.Forms.Button();&lt;br /&gt;
        this.errProvider = new System.Windows.Forms.ErrorProvider(this.ruponents);&lt;br /&gt;
        this.Label3 = new System.Windows.Forms.Label();&lt;br /&gt;
        this.txtEmail = new System.Windows.Forms.TextBox();&lt;br /&gt;
        ((System.ruponentModel.ISupportInitialize)(this.errProvider)).BeginInit();&lt;br /&gt;
        this.SuspendLayout();&lt;br /&gt;
        this.Button1.Location = new System.Drawing.Point(212, 80);&lt;br /&gt;
        this.Button1.Name = &amp;quot;Button1&amp;quot;;&lt;br /&gt;
        this.Button1.Size = new System.Drawing.Size(76, 24);&lt;br /&gt;
        this.Button1.TabIndex = 12;&lt;br /&gt;
        this.Button1.Text = &amp;quot;OK&amp;quot;;&lt;br /&gt;
        this.Button1.Click += new System.EventHandler(this.Button1_Click);&lt;br /&gt;
        this.errProvider.ContainerControl = this;&lt;br /&gt;
        this.errProvider.DataMember = &amp;quot;&amp;quot;;&lt;br /&gt;
        this.Label3.Location = new System.Drawing.Point(24, 24);&lt;br /&gt;
        this.Label3.Size = new System.Drawing.Size(40, 16);&lt;br /&gt;
        this.Label3.Text = &amp;quot;Email:&amp;quot;;&lt;br /&gt;
        this.txtEmail.Location = new System.Drawing.Point(68, 20);&lt;br /&gt;
        this.txtEmail.Size = new System.Drawing.Size(220, 21);&lt;br /&gt;
        this.txtEmail.Leave += new System.EventHandler(this.txtEmail_Leave);&lt;br /&gt;
        this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);&lt;br /&gt;
        this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;&lt;br /&gt;
        this.ClientSize = new System.Drawing.Size(328, 126);&lt;br /&gt;
        this.Controls.Add(this.Label3);&lt;br /&gt;
        this.Controls.Add(this.txtEmail);&lt;br /&gt;
        this.Controls.Add(this.Button1);&lt;br /&gt;
        this.Font = new System.Drawing.Font(&amp;quot;Tahoma&amp;quot;, 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));&lt;br /&gt;
        ((System.ruponentModel.ISupportInitialize)(this.errProvider)).EndInit();&lt;br /&gt;
        this.ResumeLayout(false);&lt;br /&gt;
        this.PerformLayout();&lt;br /&gt;
    }&lt;br /&gt;
    private void Button1_Click(object sender, EventArgs e)&lt;br /&gt;
    {&lt;br /&gt;
        string errorText = &amp;quot;&amp;quot;;&lt;br /&gt;
        foreach (Control ctrl in this.Controls)&lt;br /&gt;
        {&lt;br /&gt;
            if (errProvider.GetError(ctrl) != &amp;quot;&amp;quot;)&lt;br /&gt;
            {&lt;br /&gt;
                errorText += &amp;quot;   * &amp;quot; + errProvider.GetError(ctrl) + &amp;quot;\n&amp;quot;;&lt;br /&gt;
                &lt;br /&gt;
            }&lt;br /&gt;
            MessageBox.Show(&amp;quot;Errors:&amp;quot; +errorText, &amp;quot;Invalid Input&amp;quot;, MessageBoxButtons.OK, MessageBoxIcon.Warning);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    private void txtEmail_Leave(object sender, EventArgs e)&lt;br /&gt;
    {&lt;br /&gt;
        Regex regex;&lt;br /&gt;
        regex = new Regex(@&amp;quot;^[\w-]+@([\w-]+\.)+[\w-]+$&amp;quot;);&lt;br /&gt;
        Control ctrl = (Control)sender;&lt;br /&gt;
        if (regex.IsMatch(ctrl.Text) || ctrl.Text == &amp;quot;&amp;quot;)&lt;br /&gt;
        {&lt;br /&gt;
            errProvider.SetError(ctrl, &amp;quot;&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            errProvider.SetError(ctrl, &amp;quot;This is not a valid email address.&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    [STAThread]&lt;br /&gt;
    public static void Main(string[] args)&lt;br /&gt;
    {&lt;br /&gt;
        Application.Run(new TextBoxValidationRegex());&lt;br /&gt;
    }&lt;br /&gt;
    private System.Windows.Forms.Button Button1;&lt;br /&gt;
    private System.Windows.Forms.ErrorProvider errProvider;&lt;br /&gt;
    private System.Windows.Forms.Label Label3;&lt;br /&gt;
    private System.Windows.Forms.TextBox txtEmail;&lt;br /&gt;
    private System.ruponentModel.IContainer components = null;&lt;br /&gt;
}&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==ErrorProvider.SetError==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;  &lt;br /&gt;
using System;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Collections;&lt;br /&gt;
using System.ruponentModel;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
using System.Data;&lt;br /&gt;
public class ErrorForm : System.Windows.Forms.Form&lt;br /&gt;
{&lt;br /&gt;
  private System.ruponentModel.Container components = null;&lt;br /&gt;
  private System.Windows.Forms.Label label1;&lt;br /&gt;
  private System.Windows.Forms.Button btnValidate;&lt;br /&gt;
  private System.Windows.Forms.ErrorProvider errorProvider1;&lt;br /&gt;
  private System.Windows.Forms.TextBox txtInput;&lt;br /&gt;
  public ErrorForm()&lt;br /&gt;
  {&lt;br /&gt;
    InitializeComponent();&lt;br /&gt;
  }&lt;br /&gt;
  protected override void Dispose( bool disposing )&lt;br /&gt;
  {&lt;br /&gt;
    if( disposing )&lt;br /&gt;
    {&lt;br /&gt;
      if (components != null) &lt;br /&gt;
      {&lt;br /&gt;
        components.Dispose();&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    base.Dispose( disposing );&lt;br /&gt;
  }&lt;br /&gt;
  private void InitializeComponent()&lt;br /&gt;
  {&lt;br /&gt;
    this.errorProvider1 = new System.Windows.Forms.ErrorProvider();&lt;br /&gt;
    this.label1 = new System.Windows.Forms.Label();&lt;br /&gt;
    this.txtInput = new System.Windows.Forms.TextBox();&lt;br /&gt;
    this.btnValidate = new System.Windows.Forms.Button();&lt;br /&gt;
    this.SuspendLayout();&lt;br /&gt;
    // &lt;br /&gt;
    // errorProvider1&lt;br /&gt;
    // &lt;br /&gt;
    this.errorProvider1.BlinkRate = 500;&lt;br /&gt;
    this.errorProvider1.BlinkStyle = System.Windows.Forms.ErrorBlinkStyle.AlwaysBlink;&lt;br /&gt;
    this.errorProvider1.ContainerControl = this;&lt;br /&gt;
    // &lt;br /&gt;
    // label1&lt;br /&gt;
    // &lt;br /&gt;
    this.label1.Font = new System.Drawing.Font(&amp;quot;Arial Black&amp;quot;, 12F);&lt;br /&gt;
    this.label1.Location = new System.Drawing.Point(8, 8);&lt;br /&gt;
    this.label1.Name = &amp;quot;label1&amp;quot;;&lt;br /&gt;
    this.label1.Size = new System.Drawing.Size(376, 56);&lt;br /&gt;
    this.label1.TabIndex = 2;&lt;br /&gt;
    this.label1.Text = &amp;quot;The following text box only allows 5 characters.  Try to enter more...&amp;quot;;&lt;br /&gt;
    // &lt;br /&gt;
    // txtInput&lt;br /&gt;
    // &lt;br /&gt;
    this.txtInput.Location = new System.Drawing.Point(144, 80);&lt;br /&gt;
    this.txtInput.Name = &amp;quot;txtInput&amp;quot;;&lt;br /&gt;
    this.txtInput.Size = new System.Drawing.Size(120, 20);&lt;br /&gt;
    this.txtInput.TabIndex = 0;&lt;br /&gt;
    this.txtInput.Text = &amp;quot;&amp;quot;;&lt;br /&gt;
    this.txtInput.Validating += new System.ruponentModel.CancelEventHandler(this.txtInput_Validating);&lt;br /&gt;
    // &lt;br /&gt;
    // btnValidate&lt;br /&gt;
    // &lt;br /&gt;
    this.btnValidate.Location = new System.Drawing.Point(16, 72);&lt;br /&gt;
    this.btnValidate.Name = &amp;quot;btnValidate&amp;quot;;&lt;br /&gt;
    this.btnValidate.Size = new System.Drawing.Size(112, 32);&lt;br /&gt;
    this.btnValidate.TabIndex = 1;&lt;br /&gt;
    this.btnValidate.Text = &amp;quot;OK&amp;quot;;&lt;br /&gt;
    // &lt;br /&gt;
    // ErrorForm&lt;br /&gt;
    // &lt;br /&gt;
    this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);&lt;br /&gt;
    this.ClientSize = new System.Drawing.Size(400, 125);&lt;br /&gt;
    this.Controls.Add(this.label1);&lt;br /&gt;
    this.Controls.Add(this.btnValidate);&lt;br /&gt;
    this.Controls.Add(this.txtInput);&lt;br /&gt;
    this.Name = &amp;quot;ErrorForm&amp;quot;;&lt;br /&gt;
    this.Text = &amp;quot;Error Trapper&amp;quot;;&lt;br /&gt;
    this.ResumeLayout(false);&lt;br /&gt;
  }&lt;br /&gt;
  [STAThread]&lt;br /&gt;
  static void Main() &lt;br /&gt;
  {&lt;br /&gt;
    Application.Run(new ErrorForm());&lt;br /&gt;
  }&lt;br /&gt;
  private void txtInput_Validating(object sender, System.ruponentModel.CancelEventArgs e)&lt;br /&gt;
  {&lt;br /&gt;
    // Check if the text length is greater than 5.&lt;br /&gt;
    if(txtInput.Text.Length &amp;gt; 5)&lt;br /&gt;
    {&lt;br /&gt;
      errorProvider1.SetError( txtInput, &amp;quot;Can&amp;quot;t be greater than 5!&amp;quot;);&lt;br /&gt;
    } &lt;br /&gt;
    else&lt;br /&gt;
      errorProvider1.SetError(txtInput, &amp;quot;&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>