Added Find Menu Option (DifferentAll) which will include SLN and CSPROJ files. This will be needed to complete the conversion to VS2013.

This commit is contained in:
Rich 2015-04-10 10:06:21 +00:00
parent 052153fbd8
commit 46ae4fe723
2 changed files with 53 additions and 31 deletions

View File

@ -47,6 +47,8 @@ namespace Sync
this.dgv = new System.Windows.Forms.DataGridView(); this.dgv = new System.Windows.Forms.DataGridView();
this.cms = new System.Windows.Forms.ContextMenuStrip(this.components); this.cms = new System.Windows.Forms.ContextMenuStrip(this.components);
this.compareToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.compareToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.compareSourceSafeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.compareMailboxToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.restoreToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.restoreToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.statusStrip1 = new System.Windows.Forms.StatusStrip(); this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.menuStrip1 = new System.Windows.Forms.MenuStrip(); this.menuStrip1 = new System.Windows.Forms.MenuStrip();
@ -68,8 +70,7 @@ namespace Sync
this.restoreAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.restoreAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.restoreReadOnlyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.restoreReadOnlyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.listToClipboardToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.listToClipboardToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.compareSourceSafeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.differentAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.compareMailboxToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgv)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dgv)).BeginInit();
this.cms.SuspendLayout(); this.cms.SuspendLayout();
@ -225,8 +226,8 @@ namespace Sync
this.dgv.Name = "dgv"; this.dgv.Name = "dgv";
this.dgv.Size = new System.Drawing.Size(759, 283); this.dgv.Size = new System.Drawing.Size(759, 283);
this.dgv.TabIndex = 2; this.dgv.TabIndex = 2;
this.dgv.MouseDown += new System.Windows.Forms.MouseEventHandler(this.dgv_MouseDown);
this.dgv.ColumnWidthChanged += new System.Windows.Forms.DataGridViewColumnEventHandler(this.dgv_ColumnWidthChanged); this.dgv.ColumnWidthChanged += new System.Windows.Forms.DataGridViewColumnEventHandler(this.dgv_ColumnWidthChanged);
this.dgv.MouseDown += new System.Windows.Forms.MouseEventHandler(this.dgv_MouseDown);
// //
// cms // cms
// //
@ -236,7 +237,7 @@ namespace Sync
this.compareMailboxToolStripMenuItem, this.compareMailboxToolStripMenuItem,
this.restoreToolStripMenuItem}); this.restoreToolStripMenuItem});
this.cms.Name = "cms"; this.cms.Name = "cms";
this.cms.Size = new System.Drawing.Size(188, 114); this.cms.Size = new System.Drawing.Size(188, 92);
// //
// compareToolStripMenuItem // compareToolStripMenuItem
// //
@ -245,6 +246,20 @@ namespace Sync
this.compareToolStripMenuItem.Text = "Compare"; this.compareToolStripMenuItem.Text = "Compare";
this.compareToolStripMenuItem.Click += new System.EventHandler(this.compareToolStripMenuItem_Click); this.compareToolStripMenuItem.Click += new System.EventHandler(this.compareToolStripMenuItem_Click);
// //
// compareSourceSafeToolStripMenuItem
//
this.compareSourceSafeToolStripMenuItem.Name = "compareSourceSafeToolStripMenuItem";
this.compareSourceSafeToolStripMenuItem.Size = new System.Drawing.Size(187, 22);
this.compareSourceSafeToolStripMenuItem.Text = "Compare Source Safe";
this.compareSourceSafeToolStripMenuItem.Click += new System.EventHandler(this.compareSourceSafeToolStripMenuItem_Click);
//
// compareMailboxToolStripMenuItem
//
this.compareMailboxToolStripMenuItem.Name = "compareMailboxToolStripMenuItem";
this.compareMailboxToolStripMenuItem.Size = new System.Drawing.Size(187, 22);
this.compareMailboxToolStripMenuItem.Text = "Compare Mailbox";
this.compareMailboxToolStripMenuItem.Click += new System.EventHandler(this.compareMailboxToolStripMenuItem_Click);
//
// restoreToolStripMenuItem // restoreToolStripMenuItem
// //
this.restoreToolStripMenuItem.Name = "restoreToolStripMenuItem"; this.restoreToolStripMenuItem.Name = "restoreToolStripMenuItem";
@ -325,14 +340,14 @@ namespace Sync
// clearToolStripMenuItem // clearToolStripMenuItem
// //
this.clearToolStripMenuItem.Name = "clearToolStripMenuItem"; this.clearToolStripMenuItem.Name = "clearToolStripMenuItem";
this.clearToolStripMenuItem.Size = new System.Drawing.Size(101, 22); this.clearToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.clearToolStripMenuItem.Text = "Clear"; this.clearToolStripMenuItem.Text = "Clear";
this.clearToolStripMenuItem.Click += new System.EventHandler(this.clearToolStripMenuItem_Click); this.clearToolStripMenuItem.Click += new System.EventHandler(this.clearToolStripMenuItem_Click);
// //
// buildToolStripMenuItem // buildToolStripMenuItem
// //
this.buildToolStripMenuItem.Name = "buildToolStripMenuItem"; this.buildToolStripMenuItem.Name = "buildToolStripMenuItem";
this.buildToolStripMenuItem.Size = new System.Drawing.Size(101, 22); this.buildToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.buildToolStripMenuItem.Text = "Build"; this.buildToolStripMenuItem.Text = "Build";
this.buildToolStripMenuItem.Click += new System.EventHandler(this.buildToolStripMenuItem_Click); this.buildToolStripMenuItem.Click += new System.EventHandler(this.buildToolStripMenuItem_Click);
// //
@ -341,7 +356,8 @@ namespace Sync
this.findToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.findToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.checkedOutToolStripMenuItem, this.checkedOutToolStripMenuItem,
this.differentToolStripMenuItem, this.differentToolStripMenuItem,
this.contentDifferentToolStripMenuItem}); this.contentDifferentToolStripMenuItem,
this.differentAllToolStripMenuItem});
this.findToolStripMenuItem.Name = "findToolStripMenuItem"; this.findToolStripMenuItem.Name = "findToolStripMenuItem";
this.findToolStripMenuItem.Size = new System.Drawing.Size(42, 20); this.findToolStripMenuItem.Size = new System.Drawing.Size(42, 20);
this.findToolStripMenuItem.Text = "Find"; this.findToolStripMenuItem.Text = "Find";
@ -413,19 +429,12 @@ namespace Sync
this.listToClipboardToolStripMenuItem.Text = "List toClipboard"; this.listToClipboardToolStripMenuItem.Text = "List toClipboard";
this.listToClipboardToolStripMenuItem.Click += new System.EventHandler(this.listToClipboardToolStripMenuItem_Click); this.listToClipboardToolStripMenuItem.Click += new System.EventHandler(this.listToClipboardToolStripMenuItem_Click);
// //
// compareSourceSafeToolStripMenuItem // differentAllToolStripMenuItem
// //
this.compareSourceSafeToolStripMenuItem.Name = "compareSourceSafeToolStripMenuItem"; this.differentAllToolStripMenuItem.Name = "differentAllToolStripMenuItem";
this.compareSourceSafeToolStripMenuItem.Size = new System.Drawing.Size(187, 22); this.differentAllToolStripMenuItem.Size = new System.Drawing.Size(166, 22);
this.compareSourceSafeToolStripMenuItem.Text = "Compare Source Safe"; this.differentAllToolStripMenuItem.Text = "DifferentAll";
this.compareSourceSafeToolStripMenuItem.Click += new System.EventHandler(this.compareSourceSafeToolStripMenuItem_Click); this.differentAllToolStripMenuItem.Click += new System.EventHandler(this.differentAllToolStripMenuItem_Click);
//
// compareMailboxToolStripMenuItem
//
this.compareMailboxToolStripMenuItem.Name = "compareMailboxToolStripMenuItem";
this.compareMailboxToolStripMenuItem.Size = new System.Drawing.Size(187, 22);
this.compareMailboxToolStripMenuItem.Text = "Compare Mailbox";
this.compareMailboxToolStripMenuItem.Click += new System.EventHandler(this.compareMailboxToolStripMenuItem_Click);
// //
// frmSync // frmSync
// //
@ -440,8 +449,8 @@ namespace Sync
this.MainMenuStrip = this.menuStrip1; this.MainMenuStrip = this.menuStrip1;
this.Name = "frmSync"; this.Name = "frmSync";
this.Text = "Volian Sync"; this.Text = "Volian Sync";
this.Load += new System.EventHandler(this.frmSync_Load);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmSync_FormClosing); this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmSync_FormClosing);
this.Load += new System.EventHandler(this.frmSync_Load);
this.LocationChanged += new System.EventHandler(this.frmSync_LocationChanged); this.LocationChanged += new System.EventHandler(this.frmSync_LocationChanged);
this.panel1.ResumeLayout(false); this.panel1.ResumeLayout(false);
this.panel1.PerformLayout(); this.panel1.PerformLayout();
@ -496,6 +505,7 @@ namespace Sync
private System.Windows.Forms.ToolStripMenuItem selectNoneToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem selectNoneToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem compareSourceSafeToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem compareSourceSafeToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem compareMailboxToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem compareMailboxToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem differentAllToolStripMenuItem;
} }
} }

View File

@ -340,6 +340,18 @@ namespace Sync
fc.MoveToDevelopment(); fc.MoveToDevelopment();
} }
} }
private bool _ExcludeSolutions = true;
private void differentAllToolStripMenuItem_Click(object sender, EventArgs e)
{
_ExcludeSolutions = false;
dgv.EndEdit();
ClearResults();
// Walk though Source Safe and check to see if the files in the Development folder are read-only
FindDifferent(new DirectoryInfo(tbSourceSafe.Text));
dgv.DataSource = _CheckedOut;
SetColumnWidth();
_ExcludeSolutions = true;
}
private void differentToolStripMenuItem_Click(object sender, EventArgs e) private void differentToolStripMenuItem_Click(object sender, EventArgs e)
{ {
dgv.EndEdit(); dgv.EndEdit();
@ -393,8 +405,8 @@ namespace Sync
private void FindDifferent(FileInfo fi) private void FindDifferent(FileInfo fi)
{ {
if (fi.Name.ToLower().EndsWith("scc")) return; if (fi.Name.ToLower().EndsWith("scc")) return;
if (fi.Name.ToLower().EndsWith("sln")) return; if (_ExcludeSolutions && fi.Name.ToLower().EndsWith("sln")) return;
if (fi.Name.ToLower().EndsWith("csproj")) if (_ExcludeSolutions && fi.Name.ToLower().EndsWith("csproj"))
{ {
// Find files that have been added to the new Project // Find files that have been added to the new Project
List<string> compileList = GetCompileList(fi.FullName); List<string> compileList = GetCompileList(fi.FullName);
@ -404,7 +416,7 @@ namespace Sync
List<string> compileList1 = GetCompileList(fi1csproj.FullName); List<string> compileList1 = GetCompileList(fi1csproj.FullName);
CompareLists(compileList, compileList1, fi, fi1csproj); CompareLists(compileList, compileList1, fi, fi1csproj);
} }
return; if(_ExcludeSolutions ) return;
} }
if (fi.Name.ToLower().EndsWith("licx")) return; if (fi.Name.ToLower().EndsWith("licx")) return;
FileInfo fiD = new FileInfo(fi.FullName.Replace(tbSourceSafe.Text, tbDevelopment.Text)); FileInfo fiD = new FileInfo(fi.FullName.Replace(tbSourceSafe.Text, tbDevelopment.Text));