Beispiel #1
0
        private void OnSucceedGetProducts(object sender)
        {
            if (_products != null)
            {
                ProductListBox.ItemsSource = _products;
            }

            StatusBar.EndUpdateMessage();
        }
Beispiel #2
0
        private void OnProductChangedUIUpdater()
        {
            if (_products != null && _products.Count == 1)
            {
                ProductDetails.DataContext = _products[0];
            }

            StatusBar.EndUpdateMessage();
        }
Beispiel #3
0
        private void OnSucceedGetCategories(object sender)
        {
            if (Global.ProductCategories != null)
            {
                ProductCategoryListBox.ItemsSource = Global.ProductCategories;
            }

            StatusBar.EndUpdateMessage();
        }
Beispiel #4
0
        private void OnProductCategoryChangedUIUpdater()
        {
            if (_products != null)
            {
                ProductsListBox.ItemsSource = _products;
            }

            StatusBar.EndUpdateMessage();
        }
Beispiel #5
0
        private void LoadProductCategoriesUIUpdater()
        {
            // bind the categories
            if (Globals.ProductCategories != null)
            {
                ProductCategoriesListBox.ItemsSource = Globals.ProductCategories;
            }

            StatusBar.EndUpdateMessage();
        }
Beispiel #6
0
        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());
        }
Beispiel #7
0
        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();
        }
Beispiel #8
0
        // 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());
            }
        }