I2022-002 added message box and automatic backup zip when restoring all from source safe
This commit is contained in:
parent
bb3b76b0c2
commit
7e0f04207c
@ -83,6 +83,10 @@ namespace Sync
|
|||||||
{
|
{
|
||||||
if (fi.Name.ToLower().EndsWith("scc")) return;
|
if (fi.Name.ToLower().EndsWith("scc")) return;
|
||||||
if (fi.Name.ToLower().EndsWith("sln")) return;
|
if (fi.Name.ToLower().EndsWith("sln")) return;
|
||||||
|
if (fi.Name.ToLower().EndsWith("config")) return; // exclude app.config
|
||||||
|
if (fi.Name.ToLower().EndsWith("dll")) return; // exclude dll's
|
||||||
|
if (fi.Name.ToLower().EndsWith("7z")) return; // exclude 7-zips
|
||||||
|
|
||||||
if (fi.Name.ToLower().EndsWith("csproj"))
|
if (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
|
||||||
@ -214,6 +218,7 @@ namespace Sync
|
|||||||
{
|
{
|
||||||
ClearMailBox();
|
ClearMailBox();
|
||||||
}
|
}
|
||||||
|
// Build mailbox
|
||||||
private void buildToolStripMenuItem_Click(object sender, EventArgs e)
|
private void buildToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
dgv.EndEdit();
|
dgv.EndEdit();
|
||||||
@ -285,17 +290,31 @@ namespace Sync
|
|||||||
private void restoreSelectedToolStripMenuItem_Click(object sender, EventArgs e)
|
private void restoreSelectedToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
dgv.EndEdit();
|
dgv.EndEdit();
|
||||||
foreach (FileCompare fc in _CheckedOut)
|
DialogResult dr = System.Windows.Forms.DialogResult.No;
|
||||||
|
dr = MessageBox.Show("This will WIPE OUT ALL changes you had made to the Selected (To Process) Files\r\n\n Are you sure?", "Restore Selected", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
|
||||||
|
if (dr == DialogResult.Yes)
|
||||||
{
|
{
|
||||||
if (fc.ToProcess) fc.MoveToDevelopment();
|
MessageBox.Show("A Zip of your checked out files will be place in your mailbox folder prior to restoring all of your source code", "Restoring All Your Source Code", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
|
buildToolStripMenuItem_Click(sender, e);
|
||||||
|
foreach (FileCompare fc in _CheckedOut)
|
||||||
|
{
|
||||||
|
if (fc.ToProcess) fc.MoveToDevelopment();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void restoreAllToolStripMenuItem_Click(object sender, EventArgs e)
|
private void restoreAllToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
dgv.EndEdit();
|
dgv.EndEdit();
|
||||||
foreach (FileCompare fc in _CheckedOut)
|
DialogResult dr = System.Windows.Forms.DialogResult.No;
|
||||||
|
dr = MessageBox.Show("This will WIPE OUT ALL changes you had made to your local code!!!\r\n\n Are you sure?", "Restore All Source Code", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
|
||||||
|
if (dr == DialogResult.Yes)
|
||||||
{
|
{
|
||||||
fc.MoveToDevelopment();
|
MessageBox.Show("A Zip of your checked out files will be place in your mailbox folder prior to restoring all of your source code", "Restoring All Your Source Code", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
|
buildToolStripMenuItem_Click(sender, e);
|
||||||
|
foreach (FileCompare fc in _CheckedOut)
|
||||||
|
{
|
||||||
|
fc.MoveToDevelopment();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private List<FileCompare> SelectedList
|
private List<FileCompare> SelectedList
|
||||||
@ -426,6 +445,9 @@ namespace Sync
|
|||||||
if(_ExcludeSolutions ) return;
|
if(_ExcludeSolutions ) return;
|
||||||
}
|
}
|
||||||
if (fi.Name.ToLower().EndsWith("licx")) return;
|
if (fi.Name.ToLower().EndsWith("licx")) return;
|
||||||
|
if (fi.Name.ToLower().EndsWith("config")) return; // exclude app.config
|
||||||
|
if (fi.Name.ToLower().EndsWith("dll")) return; // exclude dll's
|
||||||
|
if (fi.Name.ToLower().EndsWith("7z")) return; // exclude 7-zips
|
||||||
FileInfo fiD = new FileInfo(fi.FullName.Replace(tbSourceSafe.Text, tbDevelopment.Text));
|
FileInfo fiD = new FileInfo(fi.FullName.Replace(tbSourceSafe.Text, tbDevelopment.Text));
|
||||||
FileInfo fiS = fi;
|
FileInfo fiS = fi;
|
||||||
// Only check Read-Only flag, other attributes are unimportant
|
// Only check Read-Only flag, other attributes are unimportant
|
||||||
@ -475,6 +497,7 @@ namespace Sync
|
|||||||
{
|
{
|
||||||
if (fc.ReadOnly) fc.MoveToDevelopment();
|
if (fc.ReadOnly) fc.MoveToDevelopment();
|
||||||
}
|
}
|
||||||
|
differentToolStripMenuItem_Click(sender, e); // do a find different again to reset the list
|
||||||
}
|
}
|
||||||
private void listToClipboardToolStripMenuItem_Click(object sender, EventArgs e)
|
private void listToClipboardToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user