Inheritance: System.Windows.Forms.Form
示例#1
0
        public CookieContainer GetCookies(string url)
        {
            ManualResetEvent ready = new ManualResetEvent(false);
            CookieContainer  cc    = null;

            RunSTAThreaded(
                () =>
            {
                var wnd = new BrowserWindow {
                    NavigateUrl = url
                };

                Application.Run(wnd);
                cc = wnd.CookieContainer;
                ready.Set();
            });

            ready.WaitOne(10000);
            return(cc);
        }
        public CookieContainer GetCookies(string url)
        {
            ManualResetEvent ready = new ManualResetEvent(false);
            CookieContainer cc = null;
            RunSTAThreaded(
                () =>
                {
                    var wnd = new BrowserWindow { NavigateUrl = url };
                    Application.Run(wnd);
                    cc = wnd.CookieContainer;
                    ready.Set();
                });

            ready.WaitOne(10000);
            return cc;
        }