示例#1
0
        private void compareToToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var sourcePackagePath = this.openFileDialog1.FileName;
            var sourceDiffPath    = this.FolderBrowserDialog.SelectedPath;

            var sourcePath = sourcePackagePath ?? sourceDiffPath;

            Assert.IsNotNull(sourcePath, "source path");

            string initialDirectory = sourcePath;

            if (File.Exists(sourcePath))
            {
                var fileInfo = new FileInfo(sourcePath);
                initialDirectory = fileInfo.DirectoryName;
            }
            else
            {
                initialDirectory = sourcePath;
            }

            this.openFileDialog2.InitialDirectory = initialDirectory;
            DialogResult result = this.openFileDialog2.ShowDialog();

            if (result == DialogResult.OK)
            {
                string targetPackagePath = this.openFileDialog2.FileName;
                Assert.IsNotNull(targetPackagePath, "target package");

                var editorDialog = new PackageComparer(sourcePath, targetPackagePath);
                editorDialog.ShowDialog();
            }
        }
示例#2
0
        private void testToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var editorDialog = new PackageComparer(@"D:\Temp\Update package for Sitecore CMS 7.2 rev. 150402\Sitecore 7.2 rev. 150402.update", @"D:\Temp\Update package for Sitecore CMS 7.2 rev. 150402\Sitecore 7.2 rev. 141226.update");

            editorDialog.ShowDialog();
        }