diff --git a/src/LessMsi.Core/LessMsi.Core.csproj b/src/LessMsi.Core/LessMsi.Core.csproj index c85a442..451f224 100644 --- a/src/LessMsi.Core/LessMsi.Core.csproj +++ b/src/LessMsi.Core/LessMsi.Core.csproj @@ -55,6 +55,7 @@ + diff --git a/src/LessMsi.Core/Msi/ExternalCabNotFoundException.cs b/src/LessMsi.Core/Msi/ExternalCabNotFoundException.cs new file mode 100644 index 0000000..1985e25 --- /dev/null +++ b/src/LessMsi.Core/Msi/ExternalCabNotFoundException.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace LessMsi.Msi +{ + /// + /// Thrown when the msi file indicates there should be an external .cab file (i.e. not embedded inside the MSI, but saved along side it) but that cab file does not exist. + /// + public class ExternalCabNotFoundException : Exception + { + public static ExternalCabNotFoundException CreateFromCabPath(string cabFileName, string expectedLocation) + { + var msg = string.Format("This msi file references a CAB file that is not embedded inside of the msi file itself. The msi file is named {0} and was expected to be in the following folder: {1}", cabFileName, expectedLocation); + return new ExternalCabNotFoundException(msg); + } + + public ExternalCabNotFoundException() + { + } + + public ExternalCabNotFoundException(string message) + : base(message) + { + } + + public ExternalCabNotFoundException(string message, Exception inner) + : base(message, inner) + { + } + } +} diff --git a/src/LessMsi.Core/Msi/Wixtracts.cs b/src/LessMsi.Core/Msi/Wixtracts.cs index a1bf3ee..c284788 100644 --- a/src/LessMsi.Core/Msi/Wixtracts.cs +++ b/src/LessMsi.Core/Msi/Wixtracts.cs @@ -487,7 +487,8 @@ private static List CabsFromMsiToDisk(Path msi, Database msidb, string if (!string.IsNullOrEmpty(cabSourceName)) { bool extract = false; - if (cabSourceName.StartsWith("#")) + // NOTE: If the cabinet name is preceded by the number sign, the cabinet is stored as a data stream inside the package. https://docs.microsoft.com/en-us/windows/win32/msi/cabinet + if (cabSourceName.StartsWith("#")) { extract = true; cabSourceName = cabSourceName.Substring(1); @@ -501,6 +502,10 @@ private static List CabsFromMsiToDisk(Path msi, Database msidb, string else { Path originalCabFile = Path.Combine(msi.Parent, cabSourceName); + if (!originalCabFile.Exists) + { + throw ExternalCabNotFoundException.CreateFromCabPath(cabSourceName, msi.Parent.FullPathString); + } FileSystem.Copy(originalCabFile, localCabFile); } /* http://code.google.com/p/lessmsi/issues/detail?id=1 diff --git a/src/LessMsi.Gui/LessMsi.Gui.csproj b/src/LessMsi.Gui/LessMsi.Gui.csproj index 12fb9cd..b3a0343 100644 --- a/src/LessMsi.Gui/LessMsi.Gui.csproj +++ b/src/LessMsi.Gui/LessMsi.Gui.csproj @@ -99,6 +99,12 @@ Component + + Form + + + ErrorDialog.cs + UserControl @@ -115,6 +121,9 @@ PreferencesForm.cs + + ErrorDialog.cs + SearchPanel.cs diff --git a/src/LessMsi.Gui/MainForm.cs b/src/LessMsi.Gui/MainForm.cs index 0ee5f8f..716ef55 100644 --- a/src/LessMsi.Gui/MainForm.cs +++ b/src/LessMsi.Gui/MainForm.cs @@ -273,556 +273,558 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); - this.txtMsiFileName = new System.Windows.Forms.TextBox(); - this.label1 = new System.Windows.Forms.Label(); - this.btnBrowse = new System.Windows.Forms.Button(); - this.tabs = new System.Windows.Forms.TabControl(); - this.tabExtractFiles = new System.Windows.Forms.TabPage(); - this.fileGrid = new System.Windows.Forms.DataGridView(); - this.panel2 = new System.Windows.Forms.Panel(); - this.btnSelectAll = new System.Windows.Forms.Button(); - this.btnUnselectAll = new System.Windows.Forms.Button(); - this.btnExtract = new System.Windows.Forms.Button(); - this.tabTableView = new System.Windows.Forms.TabPage(); - this.panel3 = new System.Windows.Forms.Panel(); - this.label2 = new System.Windows.Forms.Label(); - this.cboTable = new System.Windows.Forms.ComboBox(); - this.msiTableGrid = new System.Windows.Forms.DataGridView(); - this.tabSummary = new System.Windows.Forms.TabPage(); - this.msiPropertyGrid = new System.Windows.Forms.DataGridView(); - this.grpDescription = new System.Windows.Forms.GroupBox(); - this.txtSummaryDescription = new System.Windows.Forms.TextBox(); - this.tabStreams = new System.Windows.Forms.TabPage(); - this.lstStreamFiles = new System.Windows.Forms.ListBox(); - this.pnlStreamsBottom = new System.Windows.Forms.Panel(); - this.btnExtractStreamFiles = new System.Windows.Forms.Button(); - this.panel4 = new System.Windows.Forms.Panel(); - this.lblStream = new System.Windows.Forms.Label(); - this.cboStream = new System.Windows.Forms.ComboBox(); - this.panel1 = new System.Windows.Forms.Panel(); - this.folderBrowser = new System.Windows.Forms.FolderBrowserDialog(); - this.openMsiDialog = new System.Windows.Forms.OpenFileDialog(); - this.statusBar1 = new System.Windows.Forms.StatusBar(); - this.statusPanelDefault = new System.Windows.Forms.StatusBarPanel(); - this.statusPanelFileCount = new System.Windows.Forms.StatusBarPanel(); - this.menuStrip1 = new System.Windows.Forms.MenuStrip(); - this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); - this.mruPlaceHolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); - this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.copyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); - this.preferencesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.searchFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.tabs.SuspendLayout(); - this.tabExtractFiles.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.fileGrid)).BeginInit(); - this.panel2.SuspendLayout(); - this.tabTableView.SuspendLayout(); - this.panel3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.msiTableGrid)).BeginInit(); - this.tabSummary.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.msiPropertyGrid)).BeginInit(); - this.grpDescription.SuspendLayout(); - this.tabStreams.SuspendLayout(); - this.pnlStreamsBottom.SuspendLayout(); - this.panel4.SuspendLayout(); - this.panel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.statusPanelDefault)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.statusPanelFileCount)).BeginInit(); - this.menuStrip1.SuspendLayout(); - this.SuspendLayout(); - // - // txtMsiFileName - // - this.txtMsiFileName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + this.txtMsiFileName = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.btnBrowse = new System.Windows.Forms.Button(); + this.tabs = new System.Windows.Forms.TabControl(); + this.tabExtractFiles = new System.Windows.Forms.TabPage(); + this.fileGrid = new System.Windows.Forms.DataGridView(); + this.panel2 = new System.Windows.Forms.Panel(); + this.btnSelectAll = new System.Windows.Forms.Button(); + this.btnUnselectAll = new System.Windows.Forms.Button(); + this.btnExtract = new System.Windows.Forms.Button(); + this.tabTableView = new System.Windows.Forms.TabPage(); + this.panel3 = new System.Windows.Forms.Panel(); + this.label2 = new System.Windows.Forms.Label(); + this.cboTable = new System.Windows.Forms.ComboBox(); + this.msiTableGrid = new System.Windows.Forms.DataGridView(); + this.tabSummary = new System.Windows.Forms.TabPage(); + this.msiPropertyGrid = new System.Windows.Forms.DataGridView(); + this.grpDescription = new System.Windows.Forms.GroupBox(); + this.txtSummaryDescription = new System.Windows.Forms.TextBox(); + this.tabStreams = new System.Windows.Forms.TabPage(); + this.lstStreamFiles = new System.Windows.Forms.ListBox(); + this.pnlStreamsBottom = new System.Windows.Forms.Panel(); + this.btnExtractStreamFiles = new System.Windows.Forms.Button(); + this.panel4 = new System.Windows.Forms.Panel(); + this.lblStream = new System.Windows.Forms.Label(); + this.cboStream = new System.Windows.Forms.ComboBox(); + this.panel1 = new System.Windows.Forms.Panel(); + this.folderBrowser = new System.Windows.Forms.FolderBrowserDialog(); + this.openMsiDialog = new System.Windows.Forms.OpenFileDialog(); + this.statusBar1 = new System.Windows.Forms.StatusBar(); + this.statusPanelDefault = new System.Windows.Forms.StatusBarPanel(); + this.statusPanelFileCount = new System.Windows.Forms.StatusBarPanel(); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); + this.mruPlaceHolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); + this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.copyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.preferencesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.searchFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.tabs.SuspendLayout(); + this.tabExtractFiles.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.fileGrid)).BeginInit(); + this.panel2.SuspendLayout(); + this.tabTableView.SuspendLayout(); + this.panel3.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.msiTableGrid)).BeginInit(); + this.tabSummary.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.msiPropertyGrid)).BeginInit(); + this.grpDescription.SuspendLayout(); + this.tabStreams.SuspendLayout(); + this.pnlStreamsBottom.SuspendLayout(); + this.panel4.SuspendLayout(); + this.panel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.statusPanelDefault)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.statusPanelFileCount)).BeginInit(); + this.menuStrip1.SuspendLayout(); + this.SuspendLayout(); + // + // txtMsiFileName + // + this.txtMsiFileName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.txtMsiFileName.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; - this.txtMsiFileName.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.FileSystem; - this.txtMsiFileName.Location = new System.Drawing.Point(55, 5); - this.txtMsiFileName.Name = "txtMsiFileName"; - this.txtMsiFileName.Size = new System.Drawing.Size(367, 20); - this.txtMsiFileName.TabIndex = 0; - this.txtMsiFileName.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ReloadCurrentUIOnEnterKeyDown); - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(12, 8); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(26, 13); - this.label1.TabIndex = 1; - this.label1.Text = "File:"; - // - // btnBrowse - // - this.btnBrowse.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnBrowse.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.btnBrowse.Location = new System.Drawing.Point(428, 7); - this.btnBrowse.Name = "btnBrowse"; - this.btnBrowse.Size = new System.Drawing.Size(24, 19); - this.btnBrowse.TabIndex = 1; - this.btnBrowse.Text = "..."; - this.btnBrowse.Click += new System.EventHandler(this.btnBrowse_Click); - // - // tabs - // - this.tabs.Controls.Add(this.tabExtractFiles); - this.tabs.Controls.Add(this.tabTableView); - this.tabs.Controls.Add(this.tabSummary); - this.tabs.Controls.Add(this.tabStreams); - this.tabs.Dock = System.Windows.Forms.DockStyle.Fill; - this.tabs.Location = new System.Drawing.Point(0, 55); - this.tabs.Name = "tabs"; - this.tabs.SelectedIndex = 0; - this.tabs.Size = new System.Drawing.Size(464, 441); - this.tabs.TabIndex = 0; - this.tabs.TabStop = false; - // - // tabExtractFiles - // - this.tabExtractFiles.Controls.Add(this.fileGrid); - this.tabExtractFiles.Controls.Add(this.panel2); - this.tabExtractFiles.Location = new System.Drawing.Point(4, 22); - this.tabExtractFiles.Name = "tabExtractFiles"; - this.tabExtractFiles.Padding = new System.Windows.Forms.Padding(5); - this.tabExtractFiles.Size = new System.Drawing.Size(456, 415); - this.tabExtractFiles.TabIndex = 0; - this.tabExtractFiles.Text = "Extract Files"; - // - // fileGrid - // - this.fileGrid.AllowUserToAddRows = false; - this.fileGrid.AllowUserToDeleteRows = false; - this.fileGrid.AllowUserToOrderColumns = true; - dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke; - this.fileGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; - this.fileGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.fileGrid.Dock = System.Windows.Forms.DockStyle.Fill; - this.fileGrid.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnKeystroke; - this.fileGrid.Location = new System.Drawing.Point(5, 5); - this.fileGrid.Name = "fileGrid"; - this.fileGrid.ReadOnly = true; - this.fileGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.fileGrid.Size = new System.Drawing.Size(446, 368); - this.fileGrid.TabIndex = 5; - this.fileGrid.KeyDown += new System.Windows.Forms.KeyEventHandler(this.fileGrid_KeyDown); - this.fileGrid.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.fileGrid_KeyPress); - // - // panel2 - // - this.panel2.Controls.Add(this.btnSelectAll); - this.panel2.Controls.Add(this.btnUnselectAll); - this.panel2.Controls.Add(this.btnExtract); - this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom; - this.panel2.Location = new System.Drawing.Point(5, 373); - this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(446, 37); - this.panel2.TabIndex = 4; - // - // btnSelectAll - // - this.btnSelectAll.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.btnSelectAll.Location = new System.Drawing.Point(0, 9); - this.btnSelectAll.Name = "btnSelectAll"; - this.btnSelectAll.Size = new System.Drawing.Size(90, 27); - this.btnSelectAll.TabIndex = 1; - this.btnSelectAll.Text = "Select &All"; - this.btnSelectAll.Click += new System.EventHandler(this.btnSelectAll_Click); - // - // btnUnselectAll - // - this.btnUnselectAll.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.btnUnselectAll.Location = new System.Drawing.Point(106, 9); - this.btnUnselectAll.Name = "btnUnselectAll"; - this.btnUnselectAll.Size = new System.Drawing.Size(90, 27); - this.btnUnselectAll.TabIndex = 2; - this.btnUnselectAll.Text = "&Unselect All"; - this.btnUnselectAll.Click += new System.EventHandler(this.btnUnselectAll_Click); - // - // btnExtract - // - this.btnExtract.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnExtract.Enabled = false; - this.btnExtract.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.btnExtract.Location = new System.Drawing.Point(354, 9); - this.btnExtract.Name = "btnExtract"; - this.btnExtract.Size = new System.Drawing.Size(90, 27); - this.btnExtract.TabIndex = 3; - this.btnExtract.Text = "E&xtract"; - this.btnExtract.Click += new System.EventHandler(this.btnExtract_Click); - // - // tabTableView - // - this.tabTableView.Controls.Add(this.panel3); - this.tabTableView.Controls.Add(this.msiTableGrid); - this.tabTableView.Location = new System.Drawing.Point(4, 22); - this.tabTableView.Name = "tabTableView"; - this.tabTableView.Size = new System.Drawing.Size(456, 415); - this.tabTableView.TabIndex = 1; - this.tabTableView.Text = "Table View"; - // - // panel3 - // - this.panel3.Controls.Add(this.label2); - this.panel3.Controls.Add(this.cboTable); - this.panel3.Dock = System.Windows.Forms.DockStyle.Top; - this.panel3.Location = new System.Drawing.Point(0, 0); - this.panel3.Name = "panel3"; - this.panel3.Size = new System.Drawing.Size(456, 28); - this.panel3.TabIndex = 11; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(4, 7); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(34, 13); - this.label2.TabIndex = 9; - this.label2.Text = "&Table"; - // - // cboTable - // - this.cboTable.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + this.txtMsiFileName.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + this.txtMsiFileName.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.FileSystem; + this.txtMsiFileName.Location = new System.Drawing.Point(55, 5); + this.txtMsiFileName.Name = "txtMsiFileName"; + this.txtMsiFileName.Size = new System.Drawing.Size(367, 23); + this.txtMsiFileName.TabIndex = 0; + this.txtMsiFileName.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ReloadCurrentUIOnEnterKeyDown); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(12, 8); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(28, 15); + this.label1.TabIndex = 1; + this.label1.Text = "File:"; + // + // btnBrowse + // + this.btnBrowse.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnBrowse.FlatStyle = System.Windows.Forms.FlatStyle.System; + this.btnBrowse.Location = new System.Drawing.Point(428, 7); + this.btnBrowse.Name = "btnBrowse"; + this.btnBrowse.Size = new System.Drawing.Size(24, 19); + this.btnBrowse.TabIndex = 1; + this.btnBrowse.Text = "..."; + this.btnBrowse.Click += new System.EventHandler(this.btnBrowse_Click); + // + // tabs + // + this.tabs.Controls.Add(this.tabExtractFiles); + this.tabs.Controls.Add(this.tabTableView); + this.tabs.Controls.Add(this.tabSummary); + this.tabs.Controls.Add(this.tabStreams); + this.tabs.Dock = System.Windows.Forms.DockStyle.Fill; + this.tabs.Location = new System.Drawing.Point(0, 55); + this.tabs.Name = "tabs"; + this.tabs.SelectedIndex = 0; + this.tabs.Size = new System.Drawing.Size(464, 441); + this.tabs.TabIndex = 0; + this.tabs.TabStop = false; + // + // tabExtractFiles + // + this.tabExtractFiles.Controls.Add(this.fileGrid); + this.tabExtractFiles.Controls.Add(this.panel2); + this.tabExtractFiles.Location = new System.Drawing.Point(4, 24); + this.tabExtractFiles.Name = "tabExtractFiles"; + this.tabExtractFiles.Padding = new System.Windows.Forms.Padding(5); + this.tabExtractFiles.Size = new System.Drawing.Size(456, 413); + this.tabExtractFiles.TabIndex = 0; + this.tabExtractFiles.Text = "Extract Files"; + // + // fileGrid + // + this.fileGrid.AllowUserToAddRows = false; + this.fileGrid.AllowUserToDeleteRows = false; + this.fileGrid.AllowUserToOrderColumns = true; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke; + this.fileGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this.fileGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.fileGrid.Dock = System.Windows.Forms.DockStyle.Fill; + this.fileGrid.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnKeystroke; + this.fileGrid.Location = new System.Drawing.Point(5, 5); + this.fileGrid.Name = "fileGrid"; + this.fileGrid.ReadOnly = true; + this.fileGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.fileGrid.Size = new System.Drawing.Size(446, 366); + this.fileGrid.TabIndex = 5; + this.fileGrid.KeyDown += new System.Windows.Forms.KeyEventHandler(this.fileGrid_KeyDown); + this.fileGrid.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.fileGrid_KeyPress); + // + // panel2 + // + this.panel2.Controls.Add(this.btnSelectAll); + this.panel2.Controls.Add(this.btnUnselectAll); + this.panel2.Controls.Add(this.btnExtract); + this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom; + this.panel2.Location = new System.Drawing.Point(5, 371); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(446, 37); + this.panel2.TabIndex = 4; + // + // btnSelectAll + // + this.btnSelectAll.FlatStyle = System.Windows.Forms.FlatStyle.System; + this.btnSelectAll.Location = new System.Drawing.Point(0, 9); + this.btnSelectAll.Name = "btnSelectAll"; + this.btnSelectAll.Size = new System.Drawing.Size(90, 27); + this.btnSelectAll.TabIndex = 1; + this.btnSelectAll.Text = "Select &All"; + this.btnSelectAll.Click += new System.EventHandler(this.btnSelectAll_Click); + // + // btnUnselectAll + // + this.btnUnselectAll.FlatStyle = System.Windows.Forms.FlatStyle.System; + this.btnUnselectAll.Location = new System.Drawing.Point(106, 9); + this.btnUnselectAll.Name = "btnUnselectAll"; + this.btnUnselectAll.Size = new System.Drawing.Size(90, 27); + this.btnUnselectAll.TabIndex = 2; + this.btnUnselectAll.Text = "&Unselect All"; + this.btnUnselectAll.Click += new System.EventHandler(this.btnUnselectAll_Click); + // + // btnExtract + // + this.btnExtract.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnExtract.Enabled = false; + this.btnExtract.FlatStyle = System.Windows.Forms.FlatStyle.System; + this.btnExtract.Location = new System.Drawing.Point(354, 9); + this.btnExtract.Name = "btnExtract"; + this.btnExtract.Size = new System.Drawing.Size(90, 27); + this.btnExtract.TabIndex = 3; + this.btnExtract.Text = "E&xtract"; + this.btnExtract.Click += new System.EventHandler(this.btnExtract_Click); + // + // tabTableView + // + this.tabTableView.Controls.Add(this.panel3); + this.tabTableView.Controls.Add(this.msiTableGrid); + this.tabTableView.Location = new System.Drawing.Point(4, 22); + this.tabTableView.Name = "tabTableView"; + this.tabTableView.Size = new System.Drawing.Size(456, 415); + this.tabTableView.TabIndex = 1; + this.tabTableView.Text = "Table View"; + // + // panel3 + // + this.panel3.Controls.Add(this.label2); + this.panel3.Controls.Add(this.cboTable); + this.panel3.Dock = System.Windows.Forms.DockStyle.Top; + this.panel3.Location = new System.Drawing.Point(0, 0); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(456, 28); + this.panel3.TabIndex = 11; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(4, 7); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(34, 15); + this.label2.TabIndex = 9; + this.label2.Text = "&Table"; + // + // cboTable + // + this.cboTable.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.cboTable.Enabled = false; - this.cboTable.Location = new System.Drawing.Point(50, 5); - this.cboTable.Name = "cboTable"; - this.cboTable.Size = new System.Drawing.Size(323, 21); - this.cboTable.TabIndex = 8; - this.cboTable.Text = "table"; - this.cboTable.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged); - // - // msiTableGrid - // - this.msiTableGrid.AllowUserToAddRows = false; - this.msiTableGrid.AllowUserToDeleteRows = false; - dataGridViewCellStyle2.BackColor = System.Drawing.Color.WhiteSmoke; - this.msiTableGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle2; - this.msiTableGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + this.cboTable.Enabled = false; + this.cboTable.Location = new System.Drawing.Point(50, 5); + this.cboTable.Name = "cboTable"; + this.cboTable.Size = new System.Drawing.Size(323, 23); + this.cboTable.TabIndex = 8; + this.cboTable.Text = "table"; + this.cboTable.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged); + // + // msiTableGrid + // + this.msiTableGrid.AllowUserToAddRows = false; + this.msiTableGrid.AllowUserToDeleteRows = false; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.WhiteSmoke; + this.msiTableGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle2; + this.msiTableGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.msiTableGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.msiTableGrid.Location = new System.Drawing.Point(0, 35); - this.msiTableGrid.Name = "msiTableGrid"; - this.msiTableGrid.ReadOnly = true; - this.msiTableGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.msiTableGrid.Size = new System.Drawing.Size(453, 370); - this.msiTableGrid.TabIndex = 10; - // - // tabSummary - // - this.tabSummary.Controls.Add(this.msiPropertyGrid); - this.tabSummary.Controls.Add(this.grpDescription); - this.tabSummary.Location = new System.Drawing.Point(4, 22); - this.tabSummary.Name = "tabSummary"; - this.tabSummary.Padding = new System.Windows.Forms.Padding(5); - this.tabSummary.Size = new System.Drawing.Size(456, 415); - this.tabSummary.TabIndex = 2; - this.tabSummary.Text = "Summary"; - // - // msiPropertyGrid - // - this.msiPropertyGrid.AllowUserToAddRows = false; - this.msiPropertyGrid.AllowUserToDeleteRows = false; - dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke; - this.msiPropertyGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; - this.msiPropertyGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.msiPropertyGrid.Dock = System.Windows.Forms.DockStyle.Fill; - this.msiPropertyGrid.Location = new System.Drawing.Point(5, 5); - this.msiPropertyGrid.Name = "msiPropertyGrid"; - this.msiPropertyGrid.ReadOnly = true; - this.msiPropertyGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.msiPropertyGrid.Size = new System.Drawing.Size(446, 299); - this.msiPropertyGrid.TabIndex = 3; - this.msiPropertyGrid.SelectionChanged += new System.EventHandler(this.msiPropertyGrid_SelectionChanged); - // - // grpDescription - // - this.grpDescription.Controls.Add(this.txtSummaryDescription); - this.grpDescription.Dock = System.Windows.Forms.DockStyle.Bottom; - this.grpDescription.Location = new System.Drawing.Point(5, 304); - this.grpDescription.Name = "grpDescription"; - this.grpDescription.Size = new System.Drawing.Size(446, 106); - this.grpDescription.TabIndex = 2; - this.grpDescription.TabStop = false; - this.grpDescription.Text = "Description:"; - // - // txtSummaryDescription - // - this.txtSummaryDescription.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.txtSummaryDescription.Dock = System.Windows.Forms.DockStyle.Fill; - this.txtSummaryDescription.Location = new System.Drawing.Point(3, 16); - this.txtSummaryDescription.Multiline = true; - this.txtSummaryDescription.Name = "txtSummaryDescription"; - this.txtSummaryDescription.ReadOnly = true; - this.txtSummaryDescription.Size = new System.Drawing.Size(440, 87); - this.txtSummaryDescription.TabIndex = 1; - // - // tabStreams - // - this.tabStreams.Controls.Add(this.lstStreamFiles); - this.tabStreams.Controls.Add(this.pnlStreamsBottom); - this.tabStreams.Controls.Add(this.panel4); - this.tabStreams.Location = new System.Drawing.Point(4, 22); - this.tabStreams.Name = "tabStreams"; - this.tabStreams.Size = new System.Drawing.Size(456, 415); - this.tabStreams.TabIndex = 3; - this.tabStreams.Text = "Streams"; - this.tabStreams.UseVisualStyleBackColor = true; - // - // lstStreamFiles - // - this.lstStreamFiles.Dock = System.Windows.Forms.DockStyle.Fill; - this.lstStreamFiles.FormattingEnabled = true; - this.lstStreamFiles.Location = new System.Drawing.Point(0, 28); - this.lstStreamFiles.Name = "lstStreamFiles"; - this.lstStreamFiles.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended; - this.lstStreamFiles.Size = new System.Drawing.Size(456, 351); - this.lstStreamFiles.TabIndex = 2; - // - // pnlStreamsBottom - // - this.pnlStreamsBottom.BackColor = System.Drawing.SystemColors.Control; - this.pnlStreamsBottom.Controls.Add(this.btnExtractStreamFiles); - this.pnlStreamsBottom.Dock = System.Windows.Forms.DockStyle.Bottom; - this.pnlStreamsBottom.Location = new System.Drawing.Point(0, 379); - this.pnlStreamsBottom.Name = "pnlStreamsBottom"; - this.pnlStreamsBottom.Size = new System.Drawing.Size(456, 36); - this.pnlStreamsBottom.TabIndex = 1; - // - // btnExtractStreamFiles - // - this.btnExtractStreamFiles.Enabled = false; - this.btnExtractStreamFiles.Location = new System.Drawing.Point(319, 6); - this.btnExtractStreamFiles.Name = "btnExtractStreamFiles"; - this.btnExtractStreamFiles.Size = new System.Drawing.Size(129, 23); - this.btnExtractStreamFiles.TabIndex = 0; - this.btnExtractStreamFiles.Text = "Extract Stream Files..."; - this.btnExtractStreamFiles.UseVisualStyleBackColor = true; - // - // panel4 - // - this.panel4.BackColor = System.Drawing.SystemColors.Control; - this.panel4.Controls.Add(this.lblStream); - this.panel4.Controls.Add(this.cboStream); - this.panel4.Dock = System.Windows.Forms.DockStyle.Top; - this.panel4.Location = new System.Drawing.Point(0, 0); - this.panel4.Name = "panel4"; - this.panel4.Size = new System.Drawing.Size(456, 28); - this.panel4.TabIndex = 0; - // - // lblStream - // - this.lblStream.AutoSize = true; - this.lblStream.Location = new System.Drawing.Point(4, 7); - this.lblStream.Name = "lblStream"; - this.lblStream.Size = new System.Drawing.Size(40, 13); - this.lblStream.TabIndex = 11; - this.lblStream.Text = "Stream"; - // - // cboStream - // - this.cboStream.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + this.msiTableGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.msiTableGrid.Location = new System.Drawing.Point(0, 35); + this.msiTableGrid.Name = "msiTableGrid"; + this.msiTableGrid.ReadOnly = true; + this.msiTableGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.msiTableGrid.Size = new System.Drawing.Size(453, 370); + this.msiTableGrid.TabIndex = 10; + // + // tabSummary + // + this.tabSummary.Controls.Add(this.msiPropertyGrid); + this.tabSummary.Controls.Add(this.grpDescription); + this.tabSummary.Location = new System.Drawing.Point(4, 22); + this.tabSummary.Name = "tabSummary"; + this.tabSummary.Padding = new System.Windows.Forms.Padding(5); + this.tabSummary.Size = new System.Drawing.Size(456, 415); + this.tabSummary.TabIndex = 2; + this.tabSummary.Text = "Summary"; + // + // msiPropertyGrid + // + this.msiPropertyGrid.AllowUserToAddRows = false; + this.msiPropertyGrid.AllowUserToDeleteRows = false; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke; + this.msiPropertyGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + this.msiPropertyGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.msiPropertyGrid.Dock = System.Windows.Forms.DockStyle.Fill; + this.msiPropertyGrid.Location = new System.Drawing.Point(5, 5); + this.msiPropertyGrid.Name = "msiPropertyGrid"; + this.msiPropertyGrid.ReadOnly = true; + this.msiPropertyGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.msiPropertyGrid.Size = new System.Drawing.Size(446, 299); + this.msiPropertyGrid.TabIndex = 3; + this.msiPropertyGrid.SelectionChanged += new System.EventHandler(this.msiPropertyGrid_SelectionChanged); + // + // grpDescription + // + this.grpDescription.Controls.Add(this.txtSummaryDescription); + this.grpDescription.Dock = System.Windows.Forms.DockStyle.Bottom; + this.grpDescription.Location = new System.Drawing.Point(5, 304); + this.grpDescription.Name = "grpDescription"; + this.grpDescription.Size = new System.Drawing.Size(446, 106); + this.grpDescription.TabIndex = 2; + this.grpDescription.TabStop = false; + this.grpDescription.Text = "Description:"; + // + // txtSummaryDescription + // + this.txtSummaryDescription.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.txtSummaryDescription.Dock = System.Windows.Forms.DockStyle.Fill; + this.txtSummaryDescription.Location = new System.Drawing.Point(3, 19); + this.txtSummaryDescription.Multiline = true; + this.txtSummaryDescription.Name = "txtSummaryDescription"; + this.txtSummaryDescription.ReadOnly = true; + this.txtSummaryDescription.Size = new System.Drawing.Size(440, 84); + this.txtSummaryDescription.TabIndex = 1; + // + // tabStreams + // + this.tabStreams.Controls.Add(this.lstStreamFiles); + this.tabStreams.Controls.Add(this.pnlStreamsBottom); + this.tabStreams.Controls.Add(this.panel4); + this.tabStreams.Location = new System.Drawing.Point(4, 22); + this.tabStreams.Name = "tabStreams"; + this.tabStreams.Size = new System.Drawing.Size(456, 415); + this.tabStreams.TabIndex = 3; + this.tabStreams.Text = "Streams"; + this.tabStreams.UseVisualStyleBackColor = true; + // + // lstStreamFiles + // + this.lstStreamFiles.Dock = System.Windows.Forms.DockStyle.Fill; + this.lstStreamFiles.FormattingEnabled = true; + this.lstStreamFiles.ItemHeight = 15; + this.lstStreamFiles.Location = new System.Drawing.Point(0, 28); + this.lstStreamFiles.Name = "lstStreamFiles"; + this.lstStreamFiles.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended; + this.lstStreamFiles.Size = new System.Drawing.Size(456, 351); + this.lstStreamFiles.TabIndex = 2; + // + // pnlStreamsBottom + // + this.pnlStreamsBottom.BackColor = System.Drawing.SystemColors.Control; + this.pnlStreamsBottom.Controls.Add(this.btnExtractStreamFiles); + this.pnlStreamsBottom.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pnlStreamsBottom.Location = new System.Drawing.Point(0, 379); + this.pnlStreamsBottom.Name = "pnlStreamsBottom"; + this.pnlStreamsBottom.Size = new System.Drawing.Size(456, 36); + this.pnlStreamsBottom.TabIndex = 1; + // + // btnExtractStreamFiles + // + this.btnExtractStreamFiles.Enabled = false; + this.btnExtractStreamFiles.Location = new System.Drawing.Point(319, 6); + this.btnExtractStreamFiles.Name = "btnExtractStreamFiles"; + this.btnExtractStreamFiles.Size = new System.Drawing.Size(129, 23); + this.btnExtractStreamFiles.TabIndex = 0; + this.btnExtractStreamFiles.Text = "Extract Stream Files..."; + this.btnExtractStreamFiles.UseVisualStyleBackColor = true; + // + // panel4 + // + this.panel4.BackColor = System.Drawing.SystemColors.Control; + this.panel4.Controls.Add(this.lblStream); + this.panel4.Controls.Add(this.cboStream); + this.panel4.Dock = System.Windows.Forms.DockStyle.Top; + this.panel4.Location = new System.Drawing.Point(0, 0); + this.panel4.Name = "panel4"; + this.panel4.Size = new System.Drawing.Size(456, 28); + this.panel4.TabIndex = 0; + // + // lblStream + // + this.lblStream.AutoSize = true; + this.lblStream.Location = new System.Drawing.Point(4, 7); + this.lblStream.Name = "lblStream"; + this.lblStream.Size = new System.Drawing.Size(44, 15); + this.lblStream.TabIndex = 11; + this.lblStream.Text = "Stream"; + // + // cboStream + // + this.cboStream.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.cboStream.Enabled = false; - this.cboStream.Location = new System.Drawing.Point(50, 5); - this.cboStream.Name = "cboStream"; - this.cboStream.Size = new System.Drawing.Size(323, 21); - this.cboStream.TabIndex = 10; - this.cboStream.Text = "streamInfo"; - this.cboStream.SelectedValueChanged += new System.EventHandler(this.cboStream_SelectedValueChanged); - // - // panel1 - // - this.panel1.Controls.Add(this.txtMsiFileName); - this.panel1.Controls.Add(this.label1); - this.panel1.Controls.Add(this.btnBrowse); - this.panel1.Dock = System.Windows.Forms.DockStyle.Top; - this.panel1.Location = new System.Drawing.Point(0, 24); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(464, 31); - this.panel1.TabIndex = 0; - // - // openMsiDialog - // - this.openMsiDialog.DefaultExt = "msi"; - this.openMsiDialog.Filter = "msierablefiles|*.msi|All Files|*.*"; - // - // statusBar1 - // - this.statusBar1.Location = new System.Drawing.Point(0, 496); - this.statusBar1.Name = "statusBar1"; - this.statusBar1.Panels.AddRange(new System.Windows.Forms.StatusBarPanel[] { + this.cboStream.Enabled = false; + this.cboStream.Location = new System.Drawing.Point(50, 5); + this.cboStream.Name = "cboStream"; + this.cboStream.Size = new System.Drawing.Size(323, 23); + this.cboStream.TabIndex = 10; + this.cboStream.Text = "streamInfo"; + this.cboStream.SelectedValueChanged += new System.EventHandler(this.cboStream_SelectedValueChanged); + // + // panel1 + // + this.panel1.Controls.Add(this.txtMsiFileName); + this.panel1.Controls.Add(this.label1); + this.panel1.Controls.Add(this.btnBrowse); + this.panel1.Dock = System.Windows.Forms.DockStyle.Top; + this.panel1.Location = new System.Drawing.Point(0, 24); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(464, 31); + this.panel1.TabIndex = 0; + // + // openMsiDialog + // + this.openMsiDialog.DefaultExt = "msi"; + this.openMsiDialog.Filter = "msierablefiles|*.msi|All Files|*.*"; + // + // statusBar1 + // + this.statusBar1.Location = new System.Drawing.Point(0, 496); + this.statusBar1.Name = "statusBar1"; + this.statusBar1.Panels.AddRange(new System.Windows.Forms.StatusBarPanel[] { this.statusPanelDefault, this.statusPanelFileCount}); - this.statusBar1.ShowPanels = true; - this.statusBar1.Size = new System.Drawing.Size(464, 16); - this.statusBar1.TabIndex = 2; - // - // statusPanelDefault - // - this.statusPanelDefault.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Spring; - this.statusPanelDefault.Name = "statusPanelDefault"; - this.statusPanelDefault.Width = 337; - // - // statusPanelFileCount - // - this.statusPanelFileCount.Name = "statusPanelFileCount"; - this.statusPanelFileCount.Width = 110; - // - // menuStrip1 - // - this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.statusBar1.ShowPanels = true; + this.statusBar1.Size = new System.Drawing.Size(464, 16); + this.statusBar1.TabIndex = 2; + // + // statusPanelDefault + // + this.statusPanelDefault.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Spring; + this.statusPanelDefault.Name = "statusPanelDefault"; + this.statusPanelDefault.Width = 337; + // + // statusPanelFileCount + // + this.statusPanelFileCount.Name = "statusPanelFileCount"; + this.statusPanelFileCount.Width = 110; + // + // menuStrip1 + // + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.fileToolStripMenuItem, this.editToolStripMenuItem, this.aboutToolStripMenuItem}); - this.menuStrip1.Location = new System.Drawing.Point(0, 0); - this.menuStrip1.Name = "menuStrip1"; - this.menuStrip1.Size = new System.Drawing.Size(464, 24); - this.menuStrip1.TabIndex = 3; - this.menuStrip1.Text = "menuStrip1"; - // - // fileToolStripMenuItem - // - this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Size = new System.Drawing.Size(464, 24); + this.menuStrip1.TabIndex = 3; + this.menuStrip1.Text = "menuStrip1"; + // + // fileToolStripMenuItem + // + this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.openToolStripMenuItem, this.toolStripSeparator2, this.mruPlaceHolderToolStripMenuItem, this.toolStripSeparator3, this.exitToolStripMenuItem}); - this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; - this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20); - this.fileToolStripMenuItem.Text = "&File"; - // - // openToolStripMenuItem - // - this.openToolStripMenuItem.Name = "openToolStripMenuItem"; - this.openToolStripMenuItem.Size = new System.Drawing.Size(152, 22); - this.openToolStripMenuItem.Text = "&Open"; - this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click); - // - // toolStripSeparator2 - // - this.toolStripSeparator2.Name = "toolStripSeparator2"; - this.toolStripSeparator2.Size = new System.Drawing.Size(149, 6); - // - // mruPlaceHolderToolStripMenuItem - // - this.mruPlaceHolderToolStripMenuItem.Enabled = false; - this.mruPlaceHolderToolStripMenuItem.Name = "mruPlaceHolderToolStripMenuItem"; - this.mruPlaceHolderToolStripMenuItem.Size = new System.Drawing.Size(152, 22); - this.mruPlaceHolderToolStripMenuItem.Text = ""; - // - // toolStripSeparator3 - // - this.toolStripSeparator3.Name = "toolStripSeparator3"; - this.toolStripSeparator3.Size = new System.Drawing.Size(149, 6); - // - // exitToolStripMenuItem - // - this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; - this.exitToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4))); - this.exitToolStripMenuItem.Size = new System.Drawing.Size(152, 22); - this.exitToolStripMenuItem.Text = "E&xit"; - this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); - // - // editToolStripMenuItem - // - this.editToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; + this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20); + this.fileToolStripMenuItem.Text = "&File"; + // + // openToolStripMenuItem + // + this.openToolStripMenuItem.Name = "openToolStripMenuItem"; + this.openToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.openToolStripMenuItem.Text = "&Open"; + this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click); + // + // toolStripSeparator2 + // + this.toolStripSeparator2.Name = "toolStripSeparator2"; + this.toolStripSeparator2.Size = new System.Drawing.Size(149, 6); + // + // mruPlaceHolderToolStripMenuItem + // + this.mruPlaceHolderToolStripMenuItem.Enabled = false; + this.mruPlaceHolderToolStripMenuItem.Name = "mruPlaceHolderToolStripMenuItem"; + this.mruPlaceHolderToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.mruPlaceHolderToolStripMenuItem.Text = ""; + // + // toolStripSeparator3 + // + this.toolStripSeparator3.Name = "toolStripSeparator3"; + this.toolStripSeparator3.Size = new System.Drawing.Size(149, 6); + // + // exitToolStripMenuItem + // + this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; + this.exitToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4))); + this.exitToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.exitToolStripMenuItem.Text = "E&xit"; + this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); + // + // editToolStripMenuItem + // + this.editToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.copyToolStripMenuItem, this.toolStripSeparator1, this.preferencesToolStripMenuItem, this.searchFileToolStripMenuItem}); - this.editToolStripMenuItem.Name = "editToolStripMenuItem"; - this.editToolStripMenuItem.Size = new System.Drawing.Size(39, 20); - this.editToolStripMenuItem.Text = "&Edit"; - // - // copyToolStripMenuItem - // - this.copyToolStripMenuItem.Name = "copyToolStripMenuItem"; - this.copyToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C))); - this.copyToolStripMenuItem.Size = new System.Drawing.Size(170, 22); - this.copyToolStripMenuItem.Text = "&Copy"; - this.copyToolStripMenuItem.Click += new System.EventHandler(this.copyToolStripMenuItem_Click); - // - // toolStripSeparator1 - // - this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(167, 6); - // - // preferencesToolStripMenuItem - // - this.preferencesToolStripMenuItem.Name = "preferencesToolStripMenuItem"; - this.preferencesToolStripMenuItem.Size = new System.Drawing.Size(170, 22); - this.preferencesToolStripMenuItem.Text = "&Preferences"; - this.preferencesToolStripMenuItem.Click += new System.EventHandler(this.preferencesToolStripMenuItem_Click); - // - // searchFileToolStripMenuItem - // - this.searchFileToolStripMenuItem.Name = "searchFileToolStripMenuItem"; - this.searchFileToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+F"; - this.searchFileToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F))); - this.searchFileToolStripMenuItem.Size = new System.Drawing.Size(170, 22); - this.searchFileToolStripMenuItem.Text = "Search File"; - this.searchFileToolStripMenuItem.Click += new System.EventHandler(this.searchFileToolStripMenuItem_Click); - // - // aboutToolStripMenuItem - // - this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem"; - this.aboutToolStripMenuItem.Size = new System.Drawing.Size(52, 20); - this.aboutToolStripMenuItem.Text = "About"; - this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click); - // - // MainForm - // - this.AllowDrop = true; - this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); - this.ClientSize = new System.Drawing.Size(464, 512); - this.Controls.Add(this.tabs); - this.Controls.Add(this.statusBar1); - this.Controls.Add(this.panel1); - this.Controls.Add(this.menuStrip1); - this.MainMenuStrip = this.menuStrip1; - this.MinimumSize = new System.Drawing.Size(352, 404); - this.Name = "MainForm"; - this.Text = "Less MSIérables"; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing); - this.DragDrop += new System.Windows.Forms.DragEventHandler(this.MainForm_DragDrop); - this.DragEnter += new System.Windows.Forms.DragEventHandler(this.MainForm_DragEnter); - this.tabs.ResumeLayout(false); - this.tabExtractFiles.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.fileGrid)).EndInit(); - this.panel2.ResumeLayout(false); - this.tabTableView.ResumeLayout(false); - this.panel3.ResumeLayout(false); - this.panel3.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.msiTableGrid)).EndInit(); - this.tabSummary.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.msiPropertyGrid)).EndInit(); - this.grpDescription.ResumeLayout(false); - this.grpDescription.PerformLayout(); - this.tabStreams.ResumeLayout(false); - this.pnlStreamsBottom.ResumeLayout(false); - this.panel4.ResumeLayout(false); - this.panel4.PerformLayout(); - this.panel1.ResumeLayout(false); - this.panel1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.statusPanelDefault)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.statusPanelFileCount)).EndInit(); - this.menuStrip1.ResumeLayout(false); - this.menuStrip1.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); + this.editToolStripMenuItem.Name = "editToolStripMenuItem"; + this.editToolStripMenuItem.Size = new System.Drawing.Size(39, 20); + this.editToolStripMenuItem.Text = "&Edit"; + // + // copyToolStripMenuItem + // + this.copyToolStripMenuItem.Name = "copyToolStripMenuItem"; + this.copyToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C))); + this.copyToolStripMenuItem.Size = new System.Drawing.Size(170, 22); + this.copyToolStripMenuItem.Text = "&Copy"; + this.copyToolStripMenuItem.Click += new System.EventHandler(this.copyToolStripMenuItem_Click); + // + // toolStripSeparator1 + // + this.toolStripSeparator1.Name = "toolStripSeparator1"; + this.toolStripSeparator1.Size = new System.Drawing.Size(167, 6); + // + // preferencesToolStripMenuItem + // + this.preferencesToolStripMenuItem.Name = "preferencesToolStripMenuItem"; + this.preferencesToolStripMenuItem.Size = new System.Drawing.Size(170, 22); + this.preferencesToolStripMenuItem.Text = "&Preferences"; + this.preferencesToolStripMenuItem.Click += new System.EventHandler(this.preferencesToolStripMenuItem_Click); + // + // searchFileToolStripMenuItem + // + this.searchFileToolStripMenuItem.Name = "searchFileToolStripMenuItem"; + this.searchFileToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+F"; + this.searchFileToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F))); + this.searchFileToolStripMenuItem.Size = new System.Drawing.Size(170, 22); + this.searchFileToolStripMenuItem.Text = "Search File"; + this.searchFileToolStripMenuItem.Click += new System.EventHandler(this.searchFileToolStripMenuItem_Click); + // + // aboutToolStripMenuItem + // + this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem"; + this.aboutToolStripMenuItem.Size = new System.Drawing.Size(52, 20); + this.aboutToolStripMenuItem.Text = "About"; + this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click); + // + // MainForm + // + this.AllowDrop = true; + this.AutoScaleBaseSize = new System.Drawing.Size(6, 16); + this.ClientSize = new System.Drawing.Size(464, 512); + this.Controls.Add(this.tabs); + this.Controls.Add(this.statusBar1); + this.Controls.Add(this.panel1); + this.Controls.Add(this.menuStrip1); + this.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.MainMenuStrip = this.menuStrip1; + this.MinimumSize = new System.Drawing.Size(352, 404); + this.Name = "MainForm"; + this.Text = "Less MSIérables"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing); + this.DragDrop += new System.Windows.Forms.DragEventHandler(this.MainForm_DragDrop); + this.DragEnter += new System.Windows.Forms.DragEventHandler(this.MainForm_DragEnter); + this.tabs.ResumeLayout(false); + this.tabExtractFiles.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.fileGrid)).EndInit(); + this.panel2.ResumeLayout(false); + this.tabTableView.ResumeLayout(false); + this.panel3.ResumeLayout(false); + this.panel3.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.msiTableGrid)).EndInit(); + this.tabSummary.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.msiPropertyGrid)).EndInit(); + this.grpDescription.ResumeLayout(false); + this.grpDescription.PerformLayout(); + this.tabStreams.ResumeLayout(false); + this.pnlStreamsBottom.ResumeLayout(false); + this.panel4.ResumeLayout(false); + this.panel4.PerformLayout(); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.statusPanelDefault)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.statusPanelFileCount)).EndInit(); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); } @@ -925,11 +927,9 @@ private void btnExtract_Click(object sender, EventArgs e) } catch (Exception err) { - MessageBox.Show(this, - "Please report this error at https://github.com/activescott/lessmsi/issues . Include the exact error message and how to get a copy of the msi you're working with.\r\n" + - "The following error occured extracting the MSI: " + err.ToString(), "MSI Error!", - MessageBoxButtons.OK, MessageBoxIcon.Error - ); + // close progress dialog because it can appear on top of the error dialog + progressDialog.Close(); + ErrorDialog.ShowError(this, err.Message, err.StackTrace); } } btnExtract.Enabled = true; diff --git a/src/LessMsi.Gui/Windows.Forms/ErrorDialog.Designer.cs b/src/LessMsi.Gui/Windows.Forms/ErrorDialog.Designer.cs new file mode 100644 index 0000000..d1d5573 --- /dev/null +++ b/src/LessMsi.Gui/Windows.Forms/ErrorDialog.Designer.cs @@ -0,0 +1,156 @@ +namespace LessMsi.Gui.Windows.Forms +{ + partial class ErrorDialog + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ErrorDialog)); + this.panel1 = new System.Windows.Forms.Panel(); + this.btnOk = new System.Windows.Forms.Button(); + this.lblErrorIntro = new System.Windows.Forms.Label(); + this.flowTop = new System.Windows.Forms.FlowLayoutPanel(); + this.lblPleaseReportLink = new System.Windows.Forms.LinkLabel(); + this.grpErrorDetail = new System.Windows.Forms.GroupBox(); + this.txtErrorDetail = new System.Windows.Forms.TextBox(); + this.panel1.SuspendLayout(); + this.flowTop.SuspendLayout(); + this.grpErrorDetail.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.Controls.Add(this.btnOk); + this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom; + this.panel1.Location = new System.Drawing.Point(0, 371); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(540, 52); + this.panel1.TabIndex = 0; + // + // btnOk + // + this.btnOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnOk.DialogResult = System.Windows.Forms.DialogResult.OK; + this.btnOk.Location = new System.Drawing.Point(439, 12); + this.btnOk.Name = "btnOk"; + this.btnOk.Size = new System.Drawing.Size(87, 27); + this.btnOk.TabIndex = 0; + this.btnOk.Text = "OK"; + this.btnOk.UseVisualStyleBackColor = true; + // + // lblErrorIntro + // + this.lblErrorIntro.AutoSize = true; + this.lblErrorIntro.Location = new System.Drawing.Point(3, 0); + this.lblErrorIntro.Name = "lblErrorIntro"; + this.lblErrorIntro.Size = new System.Drawing.Size(0, 15); + this.lblErrorIntro.TabIndex = 2; + // + // flowTop + // + this.flowTop.Controls.Add(this.lblErrorIntro); + this.flowTop.Controls.Add(this.lblPleaseReportLink); + this.flowTop.Dock = System.Windows.Forms.DockStyle.Top; + this.flowTop.Location = new System.Drawing.Point(0, 0); + this.flowTop.Name = "flowTop"; + this.flowTop.Size = new System.Drawing.Size(540, 100); + this.flowTop.TabIndex = 2; + // + // lblPleaseReportLink + // + this.lblPleaseReportLink.AutoSize = true; + this.lblPleaseReportLink.Dock = System.Windows.Forms.DockStyle.Fill; + this.lblPleaseReportLink.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblPleaseReportLink.LinkArea = new System.Windows.Forms.LinkArea(243, 46); + this.lblPleaseReportLink.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline; + this.lblPleaseReportLink.Location = new System.Drawing.Point(3, 15); + this.lblPleaseReportLink.Name = "lblPleaseReportLink"; + this.lblPleaseReportLink.Size = new System.Drawing.Size(534, 69); + this.lblPleaseReportLink.TabIndex = 3; + this.lblPleaseReportLink.TabStop = true; + this.lblPleaseReportLink.Text = resources.GetString("lblPleaseReportLink.Text"); + this.lblPleaseReportLink.UseCompatibleTextRendering = true; + this.lblPleaseReportLink.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lblPleaseReportLink_LinkClicked); + // + // grpErrorDetail + // + this.grpErrorDetail.Controls.Add(this.txtErrorDetail); + this.grpErrorDetail.Dock = System.Windows.Forms.DockStyle.Fill; + this.grpErrorDetail.Location = new System.Drawing.Point(0, 100); + this.grpErrorDetail.Name = "grpErrorDetail"; + this.grpErrorDetail.Size = new System.Drawing.Size(540, 271); + this.grpErrorDetail.TabIndex = 3; + this.grpErrorDetail.TabStop = false; + this.grpErrorDetail.Text = "Error Detail:"; + // + // txtErrorDetail + // + this.txtErrorDetail.Dock = System.Windows.Forms.DockStyle.Fill; + this.txtErrorDetail.Location = new System.Drawing.Point(3, 19); + this.txtErrorDetail.Multiline = true; + this.txtErrorDetail.Name = "txtErrorDetail"; + this.txtErrorDetail.ReadOnly = true; + this.txtErrorDetail.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.txtErrorDetail.Size = new System.Drawing.Size(534, 249); + this.txtErrorDetail.TabIndex = 0; + // + // ErrorDialog + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(540, 423); + this.ControlBox = false; + this.Controls.Add(this.grpErrorDetail); + this.Controls.Add(this.flowTop); + this.Controls.Add(this.panel1); + this.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.Name = "ErrorDialog"; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Error!"; + this.TopMost = true; + this.panel1.ResumeLayout(false); + this.flowTop.ResumeLayout(false); + this.flowTop.PerformLayout(); + this.grpErrorDetail.ResumeLayout(false); + this.grpErrorDetail.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button btnOk; + private System.Windows.Forms.Label lblErrorIntro; + private System.Windows.Forms.FlowLayoutPanel flowTop; + private System.Windows.Forms.LinkLabel lblPleaseReportLink; + private System.Windows.Forms.GroupBox grpErrorDetail; + private System.Windows.Forms.TextBox txtErrorDetail; + } +} \ No newline at end of file diff --git a/src/LessMsi.Gui/Windows.Forms/ErrorDialog.cs b/src/LessMsi.Gui/Windows.Forms/ErrorDialog.cs new file mode 100644 index 0000000..2112165 --- /dev/null +++ b/src/LessMsi.Gui/Windows.Forms/ErrorDialog.cs @@ -0,0 +1,25 @@ +using System.Windows.Forms; + +namespace LessMsi.Gui.Windows.Forms +{ + public partial class ErrorDialog : Form + { + public ErrorDialog() + { + InitializeComponent(); + } + + public static void ShowError(IWin32Window owner, string message, string technicalDetails) + { + var dlg = new ErrorDialog(); + dlg.txtErrorDetail.Text = string.Format("{0}\r\n\r\nTechnical Detail:\r\n\r\n{1}", message, technicalDetails); + dlg.ShowDialog(owner); + } + + private void lblPleaseReportLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + var target = "https://github.com/activescott/lessmsi/issues/"; + System.Diagnostics.Process.Start(target); + } + } +} diff --git a/src/LessMsi.Gui/Windows.Forms/ErrorDialog.resx b/src/LessMsi.Gui/Windows.Forms/ErrorDialog.resx new file mode 100644 index 0000000..04cc2a9 --- /dev/null +++ b/src/LessMsi.Gui/Windows.Forms/ErrorDialog.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + An error has occurred. This may be a problem with the msi file or it may be a problem with this application. If you think this might be an error this application please report it, along with the error details below, at the following location: https://github.com/activescott/lessmsi/issues/ + + \ No newline at end of file