private void ApplicationOnCartPriceUpdated(object sender, CartPriceUpdatedArgs args) { CheapestViktoryListBox.DisplayMember = "ProductName"; CheapestViktoryListBox.DataSource = args.ViktoryChipestProducts; ExpensiveViktoryListBox.DisplayMember = "ProductName"; ExpensiveViktoryListBox.DataSource = args.ViktoryExpensiveProducts; CheapestMahsaneiListBox.DisplayMember = "ProductName"; CheapestMahsaneiListBox.DataSource = args.MahsaneyHashookChipestProducts; ExpensiveMahsaneiListBox.DisplayMember = "ProductName"; ExpensiveMahsaneiListBox.DataSource = args.MahsaneyHashookExpensiveProducts; CheapestShookListBox.DisplayMember = "ProductName"; CheapestShookListBox.DataSource = args.ShookHaairChipestProducts; ExpensiveShookListBox.DisplayMember = "ProductName"; ExpensiveShookListBox.DataSource = args.ShookHaairExpensiveProducts; ViktoryCartPriceLabal.Text = args.ViktoryCartPrice.ToString(); ShookHaiirCartPriceLabal.Text = args.ShookHaairCartPrice.ToString(); MahsaneiCartPeiceLabal.Text = args.MahsaneyHashookCartPrice.ToString(); }
private async void AppManagerOnCartPriceUpdated(object sender, CartPriceUpdatedArgs cartPriceUpdatedArgs) { await Task.Run(() => { Tabs[0].CartPrice = cartPriceUpdatedArgs.ViktoryCartPrice; Tabs[0].ExpensiveProducts = cartPriceUpdatedArgs.ViktoryExpensiveProducts; Tabs[0].CheapestProducts = cartPriceUpdatedArgs.ViktoryChipestProducts; Tabs[1].CartPrice = cartPriceUpdatedArgs.ShookHaairCartPrice; Tabs[1].ExpensiveProducts = cartPriceUpdatedArgs.ShookHaairExpensiveProducts; Tabs[1].CheapestProducts = cartPriceUpdatedArgs.ShookHaairChipestProducts; Tabs[2].CartPrice = cartPriceUpdatedArgs.MahsaneyHashookCartPrice; Tabs[2].ExpensiveProducts = cartPriceUpdatedArgs.MahsaneyHashookExpensiveProducts; Tabs[2].CheapestProducts = cartPriceUpdatedArgs.MahsaneyHashookChipestProducts; }); }
private void OnCartPriceUpdated() { var args = new CartPriceUpdatedArgs() { ViktoryChipestProducts = GetCheapestExpensiveProductsChain("1", PriceMode.Cheap), ViktoryExpensiveProducts = GetCheapestExpensiveProductsChain("1", PriceMode.Expensive), ShookHaairChipestProducts = GetCheapestExpensiveProductsChain("2", PriceMode.Cheap), ShookHaairExpensiveProducts = GetCheapestExpensiveProductsChain("2", PriceMode.Expensive), MahsaneyHashookChipestProducts = GetCheapestExpensiveProductsChain("3", PriceMode.Cheap), MahsaneyHashookExpensiveProducts = GetCheapestExpensiveProductsChain("3", PriceMode.Expensive), ViktoryCartPrice = GetPriceCartChain("1"), ShookHaairCartPrice = GetPriceCartChain("2"), MahsaneyHashookCartPrice = GetPriceCartChain("3") }; CartPriceUpdated?.Invoke(this, args); }