private async void LoadStrategiesToCombo() { metroComboStratagies.Items.Clear(); MakeLoadPanelVisible(metroPanelMatch); Strategy[] strategies = await Task.Run(() => service.StrategyList()); foreach (Strategy strategy in strategies) { strategyList.Add(strategy.Id, strategy.Description); metroComboStratagies.Items.Add(strategy.Id); } MakeLoadPanelHide(metroPanelMatch); }
public static void StrategyList( [Optional("", Description = "The url of the proxy server to use for http requests")] string proxy, [Optional("", Description = "The user name to use when the connecting to a proxy server that requires authentication")] string proxyusername, [Optional("", Description = "The password to use when the connecting to a proxy server that requires authentication")] string proxypassword, [Optional("", Description = "The domain to use when the connecting to a proxy server that requires authentication")] string proxydomain ) { try { DictService svc = new DictService(); SetupProxyServer(svc, proxy, proxyusername, proxypassword, proxydomain); Strategy[] strats = svc.StrategyList(); foreach (Strategy s in strats) { Console.WriteLine("{0} : {1}", s.Id, s.Description); } } catch (System.Exception e) { Console.WriteLine("Error: {0}", e.Message); } }