//------------------------------------------------------------------------------------------ static --
        private static void GenericBinder(IMRBPattern <M, VM> mrb, string methodPropertyName, string eventType)
        {
            var onChangeItems = mrb.jF2("[" + methodPropertyName + "]");

            for (int i = 0; i < onChangeItems.length; i++)
            {
                var    item   = onChangeItems[i];
                string method = J(item).attr(methodPropertyName);
                Evt.Attach_ToElement(eventType, mrb, item, method, null);
            }
        }
Ejemplo n.º 2
0
        //----------------------------------------------------------------------------------------------------
        private void ConnectEvents_Sub()
        {
            Evt.Attach_ToElement("mousedown", this, jRoot[0], "OnMouseDown", null);
            Evt.Attach_ToElement("mouseup", this, jRoot[0], "OnMouseUp", null);
            //Evt.Attach_ToElement("mouseleave", this, jRoot[0], "OnMouseUp", null);

            Evt.Attach_ToElement("blur", this, jF2(".Txt_ColumnPosition")[0], "ColumnPosition_Blur", null);
            Evt.Attach_ToElement("blur", this, jF2(".Txt_ColumnName")[0], "ColumnName_Blur", null);
            Evt.Attach_ToElement("focus", this, jF2(".Txt_DataType")[0], "Txt_DataType_Focus", null);
            Evt.Attach_ToElement("blur", this, jF2(".Txt_DataType")[0], "Txt_DataType_Blur", null);
            Evt.Attach_ToElement("blur", this, jF2(".CheckBox_AllowNulls")[0], "AnyField_Blur", null);
            Evt.Attach_ToElement("click", this, jF2(".CheckBox_AllowNulls")[0], "AnyField_Blur", null);
            Evt.Attach_ToElement("blur", this, jF2(".Txt_DefaultValue")[0], "AnyField_Blur", null);

            var thisObj  = this;
            var jRootObj = this.jRoot;

            eval("jRootObj.find('.Txt_ColumnPosition').keydown(function(event) { thisObj.OnKeyDown_Generic(event, '.Txt_ColumnPosition') });");
            eval("jRootObj.find('.Txt_ColumnName').keydown(function(event) { thisObj.OnKeyDown_Generic(event, '.Txt_ColumnName') });");
            eval("jRootObj.find('.Txt_DataType').keydown(function(event) { thisObj.OnKeyDown_Generic(event, '.Txt_DataType'); thisObj.Txt_DataType_Changed(); });");
            //eval("jRootObj.find('.CheckBox_AllowNulls').keydown(function(event) { thisObj.OnKeyDown_Generic(event, '.CheckBox_AllowNulls') });");
            eval("jRootObj.find('.Txt_DefaultValue').keydown(function(event) { thisObj.OnKeyDown_Generic(event, '.Txt_DefaultValue') });");
        }