private async void PopulateCatagories() { IEnumerable <String> categories = await ChuckNorrisClient.GetCategories(); CboCategory.DataSource = categories; CboCategory.DisplayMember = nameof(categories); }
private async void Form1_Load(object sender, EventArgs e) { string[] choice = (string[])await ChuckNorrisClient.GetCategories(); categoriesCbox.Items.AddRange(choice); categoriesCbox.SelectedIndex = 0; }
private async void PopulateCategoriesAsync() { var categories = await ChuckNorrisClient.GetCategories(); foreach (var category in categories) { filterCbx.Items.Add(category); } }
private async void frmGetJoke_LoadAsync(object sender, EventArgs e) { IEnumerable <string> categories = await ChuckNorrisClient.GetCategories(); foreach (var cat in categories) { cbxCategories.Items.Add(cat); } }
public async void GetCategoryList() { IEnumerable <string> categories = await ChuckNorrisClient.GetCategories(); foreach (string c in categories) { cboxCategories.Items.Add(c); } }
private async void PopCats() { IEnumerable <string> catagoryList = await ChuckNorrisClient.GetCategories(); foreach (var cata in catagoryList) { CmbxCategories.Items.Add(cata); } }
private async void ChuckNorrisForm_Load(object sender, EventArgs e) { IEnumerable <string> getJokeCategories = await ChuckNorrisClient.GetCategories(); foreach (string category in getJokeCategories) { jokeComboBox.Items.Add(category); } }
private async void getCategories() { IEnumerable <String> categories = await ChuckNorrisClient.GetCategories(); foreach (var category in categories) { CategoryBox.Items.Add(category); } }
private async void Get_Categories() { IEnumerable <string> categories = await ChuckNorrisClient.GetCategories(); foreach (var cat in categories) { CmbCategories.Items.Add(cat); } }
/// <summary> /// Populate the Combo Box with the joke categories /// </summary> private async void PopulateComboBox() { IEnumerable <string> categories = await ChuckNorrisClient.GetCategories(); foreach (string category in categories) { CategoryCBox.Items.Add(category); } }
public async void PopulateComboBox() { var c = await ChuckNorrisClient.GetCategories(); foreach (var categories in c) { cmbCategories.Items.Add(categories); } }
private async void Form1_Load(object sender, EventArgs e) { IEnumerable <string> categories = await ChuckNorrisClient.GetCategories(); foreach (string category in categories) { categoriesCbx.Items.Add(category); } }
/// <summary> /// Populates comboBox with categories supplied /// by ChuckNorrisClientClasses /// </summary> private async void PopulateCategoriesList() { IEnumerable <string> categoryString = await ChuckNorrisClient.GetCategories(); foreach (var s in categoryString) { cmbxCategories.Items.Add(s); } }
public async Task populateCategories() { IEnumerable <string> categories = await ChuckNorrisClient.GetCategories(); foreach (var list in categories) { categoriesTxt.Items.Add(list); } }
private async void Form1_Load(object sender, EventArgs e) { IEnumerable <string> category = await ChuckNorrisClient.GetCategories(); foreach (var c in category) { cboGetCategory.Items.Add(c); } }
private async void Form1_Load(object sender, EventArgs e) { var categories = await ChuckNorrisClient.GetCategories(); foreach (var c in categories) { categorieCmbBox.Items.Add(c); } }
private async void populateForm() { IEnumerable <string> categories = await ChuckNorrisClient.GetCategories(); foreach (var cat in categories) { cboCatagoies.Items.Add(cat); } }
private async void PopulateCategories() { IEnumerable <string> list = await ChuckNorrisClient.GetCategories(); foreach (string s in list) { cateBox.Items.Add(s); } }
public Form1() { IEnumerable <string> categories = Task.Run(() => ChuckNorrisClient.GetCategories()).Result; InitializeComponent(); foreach (var cat in categories) { cBoxTypes.Items.Add(cat); } cBoxTypes.SelectedIndex = 0; }
private async void PopulateCategories() { ddlCategories.Items.Add("Any"); IEnumerable <string> categories = await ChuckNorrisClient.GetCategories(); foreach (string str in categories) { ddlCategories.Items.Add(str); } ddlCategories.SelectedIndex = 0; }
private static async Task Run() { //get random joke test WriteLine("Getting a single joke**********************"); Joke j = await ChuckNorrisClient.GetRandomJoke(); WriteLine($"{j.Id}:{j.JokeText}\n\n{string.Join(", ", j.Categories)}"); //get categories WriteLine("Getting categories****************************"); IEnumerable <string> categories = await ChuckNorrisClient.GetCategories(); foreach (var cat in categories) { WriteLine(cat); } //print specific joke WriteLine("Getting specific joke***************************"); Joke j2 = await ChuckNorrisClient.GetJokeById(2); WriteLine(j2.JokeText); //retrieve joke that doesn't exist WriteLine("Retrieving non-existent joke********************"); try { Joke j3 = await ChuckNorrisClient.GetJokeById(20000000); } catch (NoSuchQuoteException) { WriteLine("There is no joke/quote with that id"); } ReadKey(); }
private async void Form1_Load(object sender, EventArgs e) { string[] Categories = (await ChuckNorrisClient.GetCategories()).ToArray(); listBox1.Items.AddRange(Categories); }
private async void PopulateCategoriesAsync() { cboCategories.DataSource = await ChuckNorrisClient.GetCategories(); }
private async void Form1_Load(object sender, EventArgs e) { IEnumerable <string> categories = await ChuckNorrisClient.GetCategories(); jokeCategoriesCmbBox.DataSource = categories; }
private IEnumerable <string> GetCategories() { return(ChuckNorrisClient.GetCategories().Result); }
private async static Task <IEnumerable <string> > GetCategories() { return(await ChuckNorrisClient.GetCategories()); }
private async void JokeForm_LoadAsync(object sender, EventArgs e) { IEnumerable <string> categories = await ChuckNorrisClient.GetCategories(); categoriesComboBox.DataSource = categories; }
private async void PopulateCategoriesList() { IEnumerable <string> categories = await ChuckNorrisClient.GetCategories(); cboCategories.DataSource = categories.ToList(); }
public Form1() { InitializeComponent(); comboBox1.Items.Add(ChuckNorrisClient.GetCategories()); }
private async void Form1_Load(object sender, EventArgs e) { var list = await ChuckNorrisClient.GetCategories(); comboBox1.DataSource = list; }