Eliminate an unnecessary save to the clipboard

Name Working Draft DocVersion "Working Draft"
Add XML files to comparison
This commit is contained in:
Rich 2012-06-13 15:14:28 +00:00
parent dc7ed2ea5c
commit 0046c61c34
3 changed files with 18 additions and 12 deletions

View File

@ -89,15 +89,17 @@ namespace DataLoader
frmMain.AddError(ex, "error in convert curset.dat");
}
}
string titlepath = vb.Path + "\\" + "Title";
FileInfo fi = new FileInfo(titlepath);
string thetitle = vb.Title;
if (File.Exists(titlepath))
{
StreamReader myReader = new StreamReader(titlepath);
thetitle = myReader.ReadLine();
myReader.Close();
}
// *** RHM 20120613 - Fix
// *** This was naming the DocVersion to the folder name
//string titlepath = vb.Path + "\\" + "Title";
//FileInfo fi = new FileInfo(titlepath);
//string thetitle = vb.Title;
//if (File.Exists(titlepath))
//{
// StreamReader myReader = new StreamReader(titlepath);
// thetitle = myReader.ReadLine();
// myReader.Close();
//}
Folder tmpfld = (Folder)parfld;
FormatInfo format = null;
if (defPlantFmt != null && defPlantFmt != "")
@ -108,7 +110,7 @@ namespace DataLoader
format = FormatInfo.Get(1);
DocVersion v;
using(Format fmt = format.Get())
v = DocVersion.MakeDocVersion(tmpfld, (int)DocVersionType(vb.Path.ToLower()), thetitle, vb.Path.ToLower(), null, fmt, fld_cfg == null ? null : fld_cfg.ToString(), DateTime.Now, "Migration");
v = DocVersion.MakeDocVersion(tmpfld, (int)DocVersionType(vb.Path.ToLower()), vb.Title, vb.Path.ToLower(), null, fmt, fld_cfg == null ? null : fld_cfg.ToString(), DateTime.Now, "Migration");
tn.Tag = v;
MigrateDocVersion(v, false);
return (object)v;

View File

@ -742,8 +742,8 @@ namespace DataLoader
mb.Append("Backup Complete");
Status = "Processing Complete";
ProcessComplete = false;
Clipboard.Clear();
Clipboard.SetText(mb.ToString());
//Clipboard.Clear();
//Clipboard.SetText(mb.ToString());
AddInfo(mb.ToString());
MessageBox.Show(mb.ToString(), "Processing Complete", MessageBoxButtons.OK, MessageBoxIcon.Information);
}

View File

@ -131,6 +131,10 @@ namespace Sync
foreach (XmlAttribute xa in xl)
if (xa.Value.ToUpper().EndsWith("DLL"))
retval.Add(xa.Value);
xl = doc.DocumentElement.SelectNodes(@"//ns:Content/@Include", nsmgr);
foreach (XmlAttribute xa in xl)
if (xa.Value.ToUpper().EndsWith("XML"))
retval.Add(xa.Value);
xl = doc.DocumentElement.SelectNodes(@"//ns:EmbeddedResource/@Include", nsmgr);
foreach (XmlAttribute xa in xl)
if (!xa.Value.ToUpper().EndsWith("LICX"))