public MyGazePointService()
        {
            sampleCallbackHandler = SampleCallback;
            eventCallbackHandler  = EventCallback;

            //Disconnect from the myGaze server on shutdown
            Application.Current.Exit += (sender, args) =>
            {
                Log.Info("Disconnecting from the myGaze server.");
                MyGazeNative.PInvoke.Disconnect();
            };
        }
Example #2
0
        public void AddRef()
        {
            cef_base_ref_counted_t *pbrc = (cef_base_ref_counted_t *)Ptr;

#if CACHEPTR
            if (_typed_add_ref == null)
            {
                _typed_add_ref = Marshal.GetDelegateForFunctionPointer <EventCallbackHandler>(pbrc->add_ref);
            }
#else
            var _typed_add_ref = Marshal.GetDelegateForFunctionPointer <EventCallbackHandler>(pbrc->add_ref);
#endif
            _typed_add_ref(Ptr);
        }