Пример #1
0
        private void ShowCookiecutterPage()
        {
            Debug.Assert(_cookiecutterPage == null);

            var outputWindow = OutputWindowRedirector.GetGeneral(this);

            Debug.Assert(outputWindow != null);

            ReportPrereqsEvent(true);

            string feedUrl = CookiecutterPackage.Instance.RecommendedFeed;

            if (string.IsNullOrEmpty(feedUrl))
            {
                feedUrl = UrlConstants.DefaultRecommendedFeed;
            }

            object commonIdeFolderPath;
            var    shell = (IVsShell)GetService(typeof(SVsShell));

            ErrorHandler.ThrowOnFailure(shell.GetProperty((int)__VSSPROPID.VSSPROPID_InstallDirectory, out commonIdeFolderPath));

            var gitClient = GitClientProvider.Create(outputWindow, commonIdeFolderPath as string);

            _cookiecutterPage = new CookiecutterContainerPage(outputWindow, CookiecutterTelemetry.Current, gitClient, new Uri(feedUrl), OpenGeneratedFolder, UpdateCommandUI);
            _cookiecutterPage.ContextMenuRequested += OnContextMenuRequested;
            _cookiecutterPage.InitializeAsync(CookiecutterPackage.Instance.CheckForTemplateUpdate).HandleAllExceptions(this, GetType()).DoNotWait();

            ((Frame)Content).Content = _cookiecutterPage;
        }
Пример #2
0
        private void ShowCookiecutterPage()
        {
            Debug.Assert(_cookiecutterPage == null);

            var outputWindow = OutputWindowRedirector.GetGeneral(this);

            Debug.Assert(outputWindow != null);

            ReportPrereqsEvent(true);

            string feedUrl = CookiecutterPackage.Instance.RecommendedFeed;

            if (string.IsNullOrEmpty(feedUrl))
            {
                feedUrl = UrlConstants.DefaultRecommendedFeed;
            }

            _cookiecutterPage = new CookiecutterContainerPage(outputWindow, CookiecutterTelemetry.Current, new Uri(feedUrl), OpenGeneratedFolder, UpdateCommandUI);
            _cookiecutterPage.ContextMenuRequested += OnContextMenuRequested;
            _cookiecutterPage.InitializeAsync(CookiecutterPackage.Instance.CheckForTemplateUpdate).HandleAllExceptions(this, GetType()).DoNotWait();

            ((Frame)Content).Content = _cookiecutterPage;
        }