コード例 #1
0
        private void FilterSolutionPad()
        {
            var SolutionPad = (SolutionFilterPad)IdeApp.Workbench.Pads.Find((p) => p.Id == Constants.SolutionFilterPadId).Content;

            if (SolutionPad != null)
            {
                SolutionPad.Window.IsWorking = true;
            }

            var ctx = IdeApp.Workbench.StatusBar.CreateContext();

            using (ctx)
            {
                ctx.AutoPulse = true;
                ctx.ShowMessage("Filtering...");
                ctx.Pulse();

                EssentialProperties.SolutionFilter = filterEntry.Text;

                if (string.IsNullOrEmpty(filterEntry.Text))
                {
                    ExpandOnlyCSharpProjects();
                    return;
                }

                var pad = (SolutionPad)IdeApp.Workbench.Pads.SolutionPad.Content;
                if (pad == null)
                {
                    return;
                }

                EssentialProperties.IsRefreshingTree = true;
                pad.CollapseTree();
                var root = pad.GetRootNode();
                if (root != null)
                {
                    root.Expanded = false;
                    pad.GetTreeView().RefreshNode(root);
                    root.Expanded = true;
                    SolutionTreeExtensions.ExpandAll(root);
                }
                EssentialProperties.IsRefreshingTree = false;
            }
            IdeApp.Workbench.StatusBar.ShowReady();
            //if (SolutionPad != null)
            //   SolutionPad.Window.IsWorking = false;
        }
コード例 #2
0
        protected void collapseButton_Clicked(object sender, EventArgs e)
        {
            var pad = (SolutionPad)IdeApp.Workbench.Pads.SolutionPad.Content;

            if (pad != null)
            {
                EssentialProperties.IsRefreshingTree = true;
                pad.CollapseTree();
                var root = pad.GetRootNode();
                if (root != null)
                {
                    root.Expanded = false;
                    pad.GetTreeView().RefreshNode(root);
                    root.Expanded = true;
                    SolutionTreeExtensions.ExpandAll(root);
                }
                EssentialProperties.IsRefreshingTree = false;
            }
            ExpandOnlyCSharpProjects();
        }
コード例 #3
0
        private void ExpandOnlyCSharpProjects()
        {
            EssentialProperties.ExpandFilter = collapseEntry.Text;

            var pad = (SolutionPad)IdeApp.Workbench.Pads.SolutionPad.Content;

            if (pad == null)
            {
                return;
            }

            EssentialProperties.IsRefreshingTree = true;
            pad.CollapseTree();
            var root = pad.GetRootNode();

            if (root != null)
            {
                root.Expanded = false;
                pad.GetTreeView().RefreshNode(root);
                root.Expanded = true;
                SolutionTreeExtensions.ExpandOnlyCSharpProjects(root);
            }
            EssentialProperties.IsRefreshingTree = false;
        }