예제 #1
0
        /// <summary>
        /// Works out any differences betweent the files specified in
        /// the Wix document and the files on the file system and
        /// shows the differences.
        /// </summary>
        public void ShowDiff()
        {
            WixPackageFilesDiff diff = new WixPackageFilesDiff(directoryReader);

            diff.ExcludedFileNames.Add(excludedNames);

            WixDirectoryElementBase directoryElement = view.SelectedElement as WixDirectoryElementBase;

            if (directoryElement == null)
            {
                directoryElement = RootDirectoryElement;
            }

            // Directory element selected?
            if (directoryElement == null)
            {
                view.ShowNoDifferenceFoundMessage();
                return;
            }

            // Show diff results
            WixPackageFilesDiffResult[] diffResults = diff.Compare(directoryElement);
            if (diffResults.Length > 0)
            {
                view.ShowDiffResults(diffResults);
            }
            else
            {
                view.ShowNoDifferenceFoundMessage();
            }
        }
		public void SetUpFixture()
		{
			WixDocument doc = new WixDocument();
			doc.FileName = @"C:\Projects\Setup\Setup.wxs";
			doc.LoadXml(GetWixXml());
			WixPackageFilesDiff diff = new WixPackageFilesDiff(this);
			diffResults = diff.Compare(doc.RootDirectory);
		}
		public void SetUpFixture()
		{
			directories = new List<string>();
			directoryExistsChecks = new List<string>();
			WixDocument doc = new WixDocument();
			doc.FileName = @"C:\Projects\Setup\Setup.wxs";
			doc.LoadXml(GetWixXml());
			WixPackageFilesDiff diff = new WixPackageFilesDiff(this);
			diffResults = diff.Compare(doc.GetRootDirectory());
		}
		/// <summary>
		/// Works out any differences betweent the files specified in 
		/// the Wix document and the files on the file system and
		/// shows the differences.
		/// </summary>
		public void CalculateDiff()
		{
			WixPackageFilesDiff diff = new WixPackageFilesDiff(directoryReader);
			diff.ExcludedFileNames.Add(excludedNames);
			
			WixDirectoryElementBase directoryElement = view.SelectedElement as WixDirectoryElementBase;
			if (directoryElement == null) {
				directoryElement = GetRootDirectoryElement();
			}
			
			// Directory element selected?
			if (directoryElement == null) {
				view.ShowNoDifferenceFoundMessage();
				return;
			}
			
			// Show diff results
			WixPackageFilesDiffResult[] diffResults = diff.Compare(directoryElement);
			if (diffResults.Length > 0) {
				view.ShowDiffResults(diffResults);
			} else {
				view.ShowNoDifferenceFoundMessage();
			}
		}