示例#1
0
        private bool TryParse(bool isUpdate)
        {
            if (!IsSolutionValid(SolutionTextBox.Text))
            {
                return(false);
            }

            Program.form.Icon = Resources.tree;
            string solutionSource = SolutionTextBox.Text;
            bool   update         = isUpdate && (Settings.Default.SolutionFile == solutionSource);

            SolutionParser.ParseSolution(solutionSource, update);
            UpdateNodeList();

            // Update settings
            Settings.Default.SolutionFile = SolutionTextBox.Text;
            Settings.Default.Save();

            return(true);
        }
示例#2
0
        private void UpdateNodeList()
        {
            bool showSingleNodes = Settings.Default.ShowSingleNodes;
            bool showChildNodes  = Settings.Default.ShowChildNodes;

            ProjectList.Items.Clear();
            foreach (string rootName in SolutionParser.GetRootNames(showSingleNodes))
            {
                ProjectList.Items.Add(rootName);
                if (showChildNodes)
                {
                    foreach (string projName in SolutionParser.GetDepNames(rootName))
                    {
                        string item = "  " + projName;
                        ProjectList.Items.Add(item);
                    }
                }
            }

            if (ProjectList.Items.Count != 0)
            {
                ProjectList.SelectedIndex = 0;
            }
        }