internal static void on_load_start(IntPtr gcHandlePtr, IntPtr browser, IntPtr frame, int transition_type)
        {
            var self = (CfxLoadHandler)System.Runtime.InteropServices.GCHandle.FromIntPtr(gcHandlePtr).Target;

            if (self == null || self.CallbacksDisabled)
            {
                return;
            }
            var e            = new CfxOnLoadStartEventArgs(browser, frame, transition_type);
            var eventHandler = self.m_OnLoadStart;

            if (eventHandler != null)
            {
                eventHandler(self, e);
            }
            e.m_isInvalid = true;
            if (e.m_browser_wrapped == null)
            {
                CfxApi.cfx_release(e.m_browser);
            }
            if (e.m_frame_wrapped == null)
            {
                CfxApi.cfx_release(e.m_frame);
            }
        }
Example #2
0
        internal static void EventCall(object sender, CfxOnLoadStartEventArgs e)
        {
            var call = new CfxOnLoadStartBrowserProcessCall();

            call.sender      = RemoteProxy.Wrap((CfxBase)sender);
            call.eventArgsId = AddEventArgs(e);
            call.RequestExecution(RemoteClient.connection);
            RemoveEventArgs(call.eventArgsId);
        }
Example #3
0
        internal static void on_load_start(IntPtr gcHandlePtr, IntPtr browser, out int browser_release, IntPtr frame, out int frame_release, int transition_type)
        {
            var self = (CfxLoadHandler)System.Runtime.InteropServices.GCHandle.FromIntPtr(gcHandlePtr).Target;

            if (self == null || self.CallbacksDisabled)
            {
                browser_release = 1;
                frame_release   = 1;
                return;
            }
            var e = new CfxOnLoadStartEventArgs(browser, frame, transition_type);

            self.m_OnLoadStart?.Invoke(self, e);
            e.m_isInvalid   = true;
            browser_release = e.m_browser_wrapped == null? 1 : 0;
            frame_release   = e.m_frame_wrapped == null? 1 : 0;
        }
Example #4
0
        private void LoadHandler_OnLoadStart(object sender, CfxOnLoadStartEventArgs e)
        {
            //base.Chromium.ShowDevTools();
            //var connString = "Host=192.168.152.129;Port=5432;Username=root123456;Password=123456;Database=test;";
            //var s = connString.Substring(connString.IndexOf("Username="******";Password="******"Username="******"OK");
            //    var s =PostgreSqlHelper.QueryTableInfo(connString, "SELECT * FROM \"TB_Test\" WHERE 1=2").Result;
            //}
            //else
            //{
            //    MessageBox.Show("Error");
            //}
        }
 internal static void EventCall(object sender, CfxOnLoadStartEventArgs e)
 {
     var call = new CfxOnLoadStartBrowserProcessCall();
     call.sender = RemoteProxy.Wrap((CfxBase)sender);
     call.eventArgsId = AddEventArgs(e);
     call.RequestExecution(RemoteClient.connection);
     RemoveEventArgs(call.eventArgsId);
 }