TextWithDHTML;
// Template property fields
private ITemplate headerTemplate;
private ITemplate statusTemplate;
private ITemplate itemTemplate;
private ITemplate alternatingItemTemplate;
private ITemplate separatorTemplate;
private ITemplate footerTemplate;
private bool searchConducted;
private SearchResponse dataSource;
private Collection
items = new Collection();
#if LICENSED
private License license;
#endif
///
/// Default constructor for Result control
///
public Result()
{
#if LICENSED
// initiate license validation
license =
LicenseManager.Validate(typeof(Search), this);
#endif
}
///
/// Override bases Result control on div HTML tag
///
protected override HtmlTextWriterTag TagKey
{
622 CHAPTER 12 ?– B U ILDING A COMPLEX CONTROL
get
{
return HtmlTextWriterTag.Div;
}
}
#region Dispose pattern
#if LICENSED
private bool _disposed;
///
/// Override Dispose to clean up resources.
///
public sealed override void Dispose()
{
//Dispose of any unmanaged resources
Dispose(true);
GC.SuppressFinalize(this);
}
///
/// You must override Dispose for controls derived from the License clsas
///
protected virtual void Dispose(bool disposing)
{
if (!_disposed)
{
if (disposing)
{
//Dispose of additional unmanaged resources here
if (license != null)
license.
Pages:
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815