void OpenNewPackageFilesView(WixProject project)
        {
            PackageFilesView view = factory.Create(project, workbench);

            workbench.ShowView(view);
            view.ShowFiles();
        }
示例#2
0
        public override void Run()
        {
            ICollection <ResourceItem> unusedKeys;

            // Allow the menu to close
            Application.DoEvents();
            using (AsynchronousWaitDialog monitor = AsynchronousWaitDialog.ShowWaitDialog("${res:Hornung.ResourceToolkit.FindUnusedResourceKeys}")) {
                unusedKeys = ResourceRefactoringService.FindUnusedKeys(monitor);
            }

            if (unusedKeys == null)
            {
                return;
            }

            if (unusedKeys.Count == 0)
            {
                MessageService.ShowMessage("${res:Hornung.ResourceToolkit.UnusedResourceKeys.NotFound}");
                return;
            }

            IWorkbench workbench = WorkbenchSingleton.Workbench;

            if (workbench != null)
            {
                UnusedResourceKeysViewContent vc = new UnusedResourceKeysViewContent(unusedKeys);
                workbench.ShowView(vc);
            }
        }
        /// <summary>
        /// Shows the view for the specified project.
        /// </summary>
        public static void Show(WixProject project, IWorkbench workbench)
        {
            PackageFilesView openView = GetOpenPackageFilesView(project, workbench);

            if (openView != null)
            {
                openView.WorkbenchWindow.SelectWindow();
            }
            else
            {
                PackageFilesView newView = new PackageFilesView(project);
                workbench.ShowView(newView);
                newView.ShowFiles();
            }
        }
		/// <summary>
		/// Shows the view for the specified project.
		/// </summary>
		public static void Show(WixProject project, IWorkbench workbench)
		{
			PackageFilesView openView = GetOpenPackageFilesView(project, workbench);
			if (openView != null) {
				openView.WorkbenchWindow.SelectWindow();
			} else {
				PackageFilesView newView = new PackageFilesView(project);
				workbench.ShowView(newView);
				newView.ShowFiles();
			}
		}