﻿Type.registerNamespace("CorvusCMS.UI");



/*--------------   CorvusCMS.UI.PageIndexChangedArgs     --------------------*/


CorvusCMS.UI.PageIndexChangedArgs = function(previousPage, newPage, succededFunction,
failFunction, itemsPerPage, webRequestManager) {
    CorvusCMS.UI.PageIndexChangedArgs.initializeBase(this);

    this._previousPage = previousPage;
    this._newPage = newPage;
    this.succededFunction = succededFunction;
    this.failFunction = failFunction;
    this._itemsPerPage = itemsPerPage;
    this._customArgument = null;
    this._webRequestManager = webRequestManager;
}

CorvusCMS.UI.PageIndexChangedArgs.prototype = {
    get_previousPage: function() {
        return this._previousPage;
    },

    get_newPage: function() {
        return this._newPage;
    },

    set_newPage: function(value) {
        if (this._newPage !== value) {
            this._newPage = value;
        }
    },

    get_itemsPerPage: function() {
        return this._itemsPerPage;
    },

    set_webRequestManager: function(value) {
        return this._webRequestManager(value);
    },

    get_customArgument: function() {
        return this._customArgument;
    },

    set_customArgument: function(value) {
        if (this._customArgument !== value) {
            this._customArgument = value;
        }
    }
}

CorvusCMS.UI.PageIndexChangedArgs.registerClass('CorvusCMS.UI.PageIndexChangedArgs', Sys.EventArgs);




/*-----------       CorvusCMS.UI.ItemDataBoundArgs          ----------------*/



CorvusCMS.UI.ItemDataBoundArgs = function(controlId, item, index, templateType, container) {
    CorvusCMS.UI.ItemDataBoundArgs.initializeBase(this);

    this._controlId = controlId;
    this._item = item;
    this._index = index;
    this._itemType = templateType;
}

CorvusCMS.UI.ItemDataBoundArgs.prototype = {

    get_item: function() {
        return this._item;
    },

    get_index: function() {
        return this._index;
    },

    get_itemType: function() {
        return this._itemType;
    },

    findControl: function(id) {

        return $get(this._controlId + "_" + id + "_" + this._index);
    }
}
CorvusCMS.UI.ItemDataBoundArgs.registerClass('CorvusCMS.UI.ItemDataBoundArgs', Sys.EventArgs);




/*-----------    CorvusCMS.UI.CommandArgs    --------------*/




CorvusCMS.UI.CommandArgs = function(targetElement, commandName, commandArgument) {
    CorvusCMS.UI.CommandArgs.initializeBase(this);

    this._targetElement = targetElement;
    this._commandName = commandName;
    this._commandArgument = commandArgument;
}

CorvusCMS.UI.CommandArgs.prototype = {


    get_commandName: function() {
        return this._commandName;
    },

    get_commandArgument: function() {
        return this._commandArgument;
    },

    get_targetElement: function() {
        return this._targetElement;
    }
}
CorvusCMS.UI.CommandArgs.registerClass('CorvusCMS.UI.CommandArgs', Sys.EventArgs);


if (typeof (Sys) !== 'undefined') Sys.Application.notifyScriptLoaded();
if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();