c# - WoocommerceApiClient not working in another FORM -


i using woocommercesharp woocommerce api tool zacharykeeton/sharpcommerce.

link: enter link description here strange. when use code in program.cs:

            var api = new woocommerceapiclient(storeurl, consumerkey, consumersecret);         var parameters = new dictionary<string, string>();          var _cat = api.products.categories.get().result; 

it returns categories wordpress website , works fine. when want use same code in form not work , freezes @ var _cat = api.products.categories.get().result; line.

i added line in program.cs line:

application.enablevisualstyles(); application.setcompatibletextrenderingdefault(false); application.run(new form2()); 

when use code @ form load event freezes:

var api = new woocommerceapiclient(storeurl, consumerkey, consumersecret); var _cat = api.products.categories.get().result; var parameters = new dictionary();

this freezes call: var _cat = api.products.categories.get().result;


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -