Beispiel #1
0
        private bool AddNewDependency()
        {
            if (string.IsNullOrEmpty(NewDependencyId.Text) &&
                string.IsNullOrEmpty(NewDependencyVersion.Text))
            {
                return(true);
            }

            if (!NewPackageDependencyGroup.UpdateSources())
            {
                return(false);
            }

            ActivePackageDependencySet.Dependencies.Add(_newPackageDependency.AsReadOnly());

            // after dependency is added, clear the textbox
            ClearDependencyTextBox();

            return(true);
        }
Beispiel #2
0
        private void AddDependencyButtonClicked(object sender, System.Windows.RoutedEventArgs e)
        {
            var bindingExpression = NewDependencyId.GetBindingExpression(TextBox.TextProperty);

            if (bindingExpression.HasError)
            {
                return;
            }

            var bindingExpression2 = NewDependencyVersion.GetBindingExpression(TextBox.TextProperty);

            if (bindingExpression2.HasError)
            {
                return;
            }

            _packageDependencies.Add(_newPackageDependency.AsReadOnly());

            // after dependency is added, clear the textbox
            ClearDependencyTextBox();
        }