BuildBTree() static private method

static private BuildBTree ( ItemIdentifier root ) : dynamic
root ItemIdentifier
return dynamic
Beispiel #1
0
        public static void ShowRevHistCallback(object sender, EventArgs e)
        {
            var srvitems = Utilities.vcext.Explorer.SelectedItems.Select(x => x.SourceServerPath);

            if (srvitems == null || srvitems.Count() != 1)
            {
                MessageBox.Show("Select only one path.", Utilities.AppTitle);
                return;
            }

            IVsWindowFrame frame = Utilities.paneRevhist.Frame as IVsWindowFrame;

            if (frame == null)
            {
                MessageBox.Show("Failed to initialize " + Utilities.AppTitle + ": Frame was null.", Utilities.AppTitle);
                return;
            }

            var data = ShowRevHistPackage.BuildBTree(new ItemIdentifier(srvitems.First()));

            (Utilities.paneRevhist.Content as WpfRevisionHistoryControl).data = data;

            // Bring the tool window to the front and give it focus
            ErrorHandler.ThrowOnFailure(frame.Show());
        }