Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
ValidatorEnabler.cs
Package: WebUserForms.zip [view]
Upload User: husern
Upload Date: 2022-03-24
Package Size: 534k
Code Size: 2k
Category:
Editor
Development Platform:
C#
- // -- FILE ------------------------------------------------------------------
- // name : ValidatorEnabler.cs
- // project : Itenso Web User Forms
- // created : Jani Giannoudis - 2008.10.30
- // language : c#
- // environment: .NET 2.0
- // copyright : (c) 2008 by Itenso GmbH, Switzerland
- // --------------------------------------------------------------------------
- using System;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- namespace Itenso.WebUserForms.Controls
- {
- // ------------------------------------------------------------------------
- public class ValidatorEnabler : UserFormVisitor
- {
- // ----------------------------------------------------------------------
- public ValidatorEnabler( Control startControl, bool enabled )
- : base( startControl )
- {
- this.enabled = enabled;
- } // ValidatorEnabler
- // ----------------------------------------------------------------------
- public bool Enabled
- {
- get { return this.enabled; }
- } // Enabled
- // ----------------------------------------------------------------------
- public void Enable()
- {
- Start();
- } // Enable
- // ----------------------------------------------------------------------
- public static void Enable( Control startControl, bool enabled )
- {
- ValidatorEnabler validatorEnabler = new ValidatorEnabler( startControl, enabled );
- validatorEnabler.Enable();
- } // Enable
- // ----------------------------------------------------------------------
- protected override void VisitControl( Control control )
- {
- BaseValidator baseValidator = control as BaseValidator;
- if ( baseValidator != null )
- {
- baseValidator.Enabled = enabled;
- }
- } // VisitControl
- // ----------------------------------------------------------------------
- // members
- private readonly bool enabled;
- } // class ValidatorEnabler
- } // namespace Itenso.WebUserForms.Controls
- // -- EOF -------------------------------------------------------------------