﻿/// <reference name="MicrosoftAjax.js" />
// Register Namespace
Type.registerNamespace('Bluestar.Common.Controls');

//**********************************************************************
// CasinoSearch Class
//**********************************************************************
// CasinoSearch - Constructor
Bluestar.Common.Controls.CasinoSearch = function () {
    // Call Base Method
    Bluestar.Common.Controls.CasinoSearch.initializeBase(this);
    // Member Variables
    this._msgs = {};

    // Associate delegates to single member variable dictionary,
    // to make it easy to dispose.
    this._delegates = {
        _onLoadDelegate: Function.createDelegate(this, this._onLoad),
        _onPropChangedDelegate: Function.createDelegate(this, this._onPropChanged)
    };
    // Event Hookup:
    Sys.Application.add_load(this._delegates._onLoadDelegate);
};
// CasinoSearch - Prototype
Bluestar.Common.Controls.CasinoSearch.prototype = {
    // Properties
    get_ns: function() { return this.get_id() + '_'; },
    get_msgs: function() { return this._msgs; },
    set_msgs: function(value) { this._msgs = value; },
    // ASP.NET AXAX Events
    initialize: function() {
        // Call Base Method
        Bluestar.Common.Controls.CasinoSearch.callBaseMethod(this, 'initialize');
    },
    dispose: function() {
        this._delegates = null;
        Bluestar.Common.Controls.CasinoSearch.callBaseMethod(this, 'dispose');
    },
    // Public Methods
    getMessage: function(key, def) {
        if (this._msgs[key]) {
            return this._msgs[key];
        } else {
            return def;
        }
    },
    // Control Events
    _onLoad: function(src, arg) {
    
    },
    _onPropChanged: function(src, args) {
        
    }
};
// Register class and inherit from Sys.Component
Bluestar.Common.Controls.CasinoSearch.registerClass("Bluestar.Common.Controls.CasinoSearch", Sys.Component);
