Exemplo n.º 1
0
        private void Object_PropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            string pn = e.PropertyName;

            PropertyInfo propertyInfo = sender.GetType().GetProperty(pn, BindingFlags.Public | BindingFlags.Instance);

            if (propertyInfo == null)
            {
                return;
            }

            JSGenericObject currentfather = _FromCSharp[sender] as JSGenericObject;

            object    nv = propertyInfo.GetValue(sender, null);
            IJSCSGlue oldbridgedchild = currentfather.Attributes[pn];

            if (Object.Equals(nv, oldbridgedchild.CValue))
            {
                return;
            }

            IJSCSGlue newbridgedchild = _JSObjectBuilder.Map(nv);

            RegisterAndDo(newbridgedchild, () => currentfather.Reroot(pn, newbridgedchild));
        }
Exemplo n.º 2
0
        internal BidirectionalMapper(object iRoot, IWebView iwebview, IDispatcher UIDispatcher, JavascriptBindingMode iMode, object iadd)
        {
            _IWebView = iwebview;
            _JSObjectBuilder = new CSharpToJavascriptMapper(iwebview,UIDispatcher, this);
            _Root = _JSObjectBuilder.Map(iRoot, iadd);
            _UnrootedEntities = new List<IJSCSGlue>();
            _BindingMode = iMode;

            IJavascriptListener JavascriptObjecChanges = null;
            if (iMode == JavascriptBindingMode.TwoWay)
                JavascriptObjecChanges = this;


            _SessionInjector = new JavascriptSessionInjector(iwebview, JavascriptObjecChanges);
        }
Exemplo n.º 3
0
        internal BidirectionalMapper(object iRoot, IWebView iwebview, IDispatcher UIDispatcher, JavascriptBindingMode iMode, object iadd)
        {
            _IWebView         = iwebview;
            _JSObjectBuilder  = new CSharpToJavascriptMapper(iwebview, UIDispatcher, this);
            _Root             = _JSObjectBuilder.Map(iRoot, iadd);
            _UnrootedEntities = new List <IJSCSGlue>();
            _BindingMode      = iMode;

            IJavascriptListener JavascriptObjecChanges = null;

            if (iMode == JavascriptBindingMode.TwoWay)
            {
                JavascriptObjecChanges = this;
            }


            _SessionInjector = new JavascriptSessionInjector(iwebview, JavascriptObjecChanges);
        }