Ejemplo n.º 1
0
        /// <summary>
        /// Gets a link type from the list of link types
        /// </summary>
        /// <param name="link">The name of the link end</param>
        /// <returns>The link type</returns>
        private TempLinkType GetLinkType(string link)
        {
            TempLinkType result = _selectedLinks.Find(
                delegate(TempLinkType s)
            {
                return(s.LinkType == link);
            }
                );

            return(result);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Performs a number of operations based on whether a dependency analysis
        /// will be performed or not
        /// </summary>
        private void ProcessDependencyAnalysisCheckbox()
        {
            bool isChecked = ProcessCheckbox(chkDependencyAnalysis);

            //Check to see if the link types have been loaded. If they haven't it means
            //that the user hasn't select a team project yet.
            if (lstLinkTypes.Items.Count > 0)
            {
                //Find the underlying link type for a changesest
                TempLinkType result = _selectedLinks.Find(
                    delegate(TempLinkType s)
                {
                    return(s.LinkType == "Changesets");
                }
                    );

                //Set the underlying link type to checked  if the dependency
                //analysis is selected and disable it so the user can't uncheck it
                result.Selected = isChecked;
                result.Enabled  = !isChecked;

                //*****NOT READY TO BE IMPLEMENTED YET*******
                //If it is checked, show the hide intervening links checkbox
                //if (isChecked)
                //{
                //    chkHideInterveningLinks.Visibility = System.Windows.Visibility.Visible;
                //}
                //else
                //{
                //    //Otherwise, hide it and uncheck it
                //    chkHideInterveningLinks.Visibility = System.Windows.Visibility.Hidden;
                //    chkHideInterveningLinks.IsChecked = false;
                //}

                //Refresh the links so they pick up the underlying data changes
                lstLinkTypes.Items.Refresh();
            }
            else
            {
                //This if is in here to handle the situation where the user could uncheck the dependency
                //analysis checkbox and the method is still triggered
                if (isChecked)
                {
                    MessageBox.Show("Please select a Team Project first.", "No Team Project Selected", MessageBoxButton.OK, MessageBoxImage.Exclamation);
                    chkDependencyAnalysis.IsChecked = false;
                }
            }
        }