private void OnSucceedGetProducts(object sender) { if (_products != null) { ProductListBox.ItemsSource = _products; } StatusBar.EndUpdateMessage(); }
private void OnProductChangedUIUpdater() { if (_products != null && _products.Count == 1) { ProductDetails.DataContext = _products[0]; } StatusBar.EndUpdateMessage(); }
private void OnSucceedGetCategories(object sender) { if (Global.ProductCategories != null) { ProductCategoryListBox.ItemsSource = Global.ProductCategories; } StatusBar.EndUpdateMessage(); }
private void OnProductCategoryChangedUIUpdater() { if (_products != null) { ProductsListBox.ItemsSource = _products; } StatusBar.EndUpdateMessage(); }
private void LoadProductCategoriesUIUpdater() { // bind the categories if (Globals.ProductCategories != null) { ProductCategoriesListBox.ItemsSource = Globals.ProductCategories; } StatusBar.EndUpdateMessage(); }
private void OnConnectSiteButtonUIUpdater() { Cursor = Cursors.Arrow; ConnectSiteButton.IsEnabled = true; ConnectSiteButton.Content = "Disconnect from SharePoint Site"; StatusBar.EndUpdateMessage(); // raise event that the connected status changed OnConnectedStatusChanged(new EventArgs()); }
private void OnSucceedGetProductDetails(object sender) { if (_products != null && _products.Count == 1) { ProductDetails.LoadProductDetails(_products[0].Id, _products[0]["Title"].ToString(), _products[0]["Product_x0020_Number"].ToString(), _products[0]["Price"].ToString(), ((FieldLookupValue)_products[0]["Category"]).LookupValue); } StatusBar.EndUpdateMessage(); }
// handles the click event when user connects to a site private void ConnectSiteButton_Click(object sender, System.Windows.RoutedEventArgs e) { if (!this.IsConnected) { // disable UI and show it's working WingtipSiteUrlTextBox.IsEnabled = false; ConnectSiteButton.IsEnabled = false; Cursor = Cursors.Wait; StatusBar.BeginUpdateMessage("Connecting to remote SharePoint site..."); ThreadPool.QueueUserWorkItem(OnConnectSiteButtonWorker, WingtipSiteUrlTextBox.Text); } else { Globals.ClientContext = null; this.IsConnected = false; ConnectSiteButton.Content = "Connect to SharePoint Site"; StatusBar.EndUpdateMessage(); // raise event that the connected status changed OnConnectedStatusChanged(new EventArgs()); } }