Пример #1
0
        public HTMLComponent(string html)
        {
            _domElement = ProteusContext.JSInvoke <IJSObjectReference>(
                "Proteus.htmlToElement", html);
            _objRefFromJS = DotNetObjectReference.Create(this);
            float[] sza = ProteusContext.JSInvoke <float[]>(
                "Proteus.getElementSize", _domElement);
            Size size = new Size(sza[0], sza[1]);

            ProteusContext.Log(html);
            ProteusContext.Log("html size=" + size.ToString());
            NaturalSize = size;
            MinSize     = NaturalSize;
            ProteusContext.JSInvokeVoid("Proteus.setMouseCallbacks", _domElement,
                                        _objRefFromJS, "DoJSMouseDown", "DoJSMouseUp", "DoJSMouseMove");
        }
Пример #2
0
 public HTMLContainerWrapper(AbstractUIContainer <TInfo> layout)
 {
     _wrapped = layout;
     _div     = ProteusContext.JSInvoke <IJSObjectReference>(
         "Proteus.htmlToElement", "<div></div>");
 }