Example #1
0
        public main(SpiderHost host)
            : base(host)
        {
            tmrReload          = new Timer();
            tmrReload.Tick    += tmrReload_Tick;
            tmrReload.Interval = 1000;
            tmrReload.Start();
            this.Spider.LoadFile("testlua.xml");
            OAuthForm oauthForm = new OAuthForm("http://leros.cobresia.webfactional.com/test", "http://home:8080/myproject/oauth2/authorize", "4c5b175ea7cd6e51022cb999da4c0d", "2fa2469afcb2be1ee6133ede33e384");

            if (LerosClient.Properties.Settings.Default.access_token == null)
            {
                if (oauthForm.ShowDialog() == DialogResult.OK)
                {
                    String code = oauthForm.Code;
                }
            }
            WebClient wc = new WebClient();

            wc.DownloadStringCompleted += wc_DownloadStringCompleted;
            wc.DownloadStringAsync(new Uri("http://home:8080/myproject/leros/api/v1/session/?format=json&bearer_token=" + LerosClient.Properties.Settings.Default.access_token));
        }
Example #2
0
 public void Test()
 {
     OAuthForm form = new OAuthForm();
     form.ShowDialog();
 }