Fixed indenting (tabs versus spaces). No code change - verified through ultra compare

This commit is contained in:
Kathy Ruffing 2019-01-18 14:53:46 +00:00
parent bcfeab9aca
commit 6593bb5877

View File

@ -16,7 +16,7 @@ using System.Text.RegularExpressions;
namespace VEPROMS
{
public partial class dlgExportImport : Form
{
{
#region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
#endregion
@ -155,7 +155,7 @@ namespace VEPROMS
{
//Database.SelectedDatabase
//sfd.FileName = string.Format("{0}.expx", MyFolder.Name);
sfd.FileName = string.Format("{0}-{1}.expx",Database.ActiveDatabase, MyFolder.Name);
sfd.FileName = string.Format("{0}-{1}.expx", Database.ActiveDatabase, MyFolder.Name);
if (sfd.ShowDialog(this) == DialogResult.OK)
{
if (sfd.FileName != string.Empty)
@ -170,7 +170,7 @@ namespace VEPROMS
}
else if (MyProcedure != null)
{
txtExport.Text = string.Format(@"{0}\{1}.pxml", PEIPath, MyProcedure.DisplayNumber.Replace("/", "_").Replace("\\","_"));
txtExport.Text = string.Format(@"{0}\{1}.pxml", PEIPath, MyProcedure.DisplayNumber.Replace("/", "_").Replace("\\", "_"));
}
}
private void txtExport_TextChanged(object sender, EventArgs e)
@ -359,8 +359,8 @@ namespace VEPROMS
string msg = string.Format("Finished Importing:\n\n{0}", txtImport.Text.Substring(txtImport.Text.LastIndexOf("\\") + 1));
if (_DidConvertTransitionsToText || _DidConvertROsToText)
{
string msg1 = (_DidConvertTransitionsToText && _DidConvertROsToText)?"Transitions and Referenced Objects":(_DidConvertTransitionsToText)?"Transitions":"Referenced Objects";
msg += string.Format("\n\n{0} converted to text.\n\nThe locations can be found by doing a Global Search for the \"Link Converted To Text\" annotation type",msg1);
string msg1 = (_DidConvertTransitionsToText && _DidConvertROsToText) ? "Transitions and Referenced Objects" : (_DidConvertTransitionsToText) ? "Transitions" : "Referenced Objects";
msg += string.Format("\n\n{0} converted to text.\n\nThe locations can be found by doing a Global Search for the \"Link Converted To Text\" annotation type", msg1);
}
else if (!_DidProcessTransitions && !_DidProcessROs) // B2017-076 Approved import file does not have ROs nor Transitions
{
@ -372,7 +372,7 @@ namespace VEPROMS
}
if (canceledPressed)
{
MessageBox.Show(string.Format("Canceling the import of:\n\n{0}",txtImport.Text.Substring(txtImport.Text.LastIndexOf("\\")+1)),"Import",MessageBoxButtons.OK,MessageBoxIcon.Information);
MessageBox.Show(string.Format("Canceling the import of:\n\n{0}", txtImport.Text.Substring(txtImport.Text.LastIndexOf("\\") + 1)), "Import", MessageBoxButtons.OK, MessageBoxIcon.Information);
btnCloseImport.PerformClick();
}
}
@ -631,7 +631,7 @@ namespace VEPROMS
ImportProcedureNew(xd);
isImported = true;
}
if (isImported && UCFImportCase==E_UCFImportOptions.LoadForSetOnly) UpdateFormatForUCFInSet();
if (isImported && UCFImportCase == E_UCFImportOptions.LoadForSetOnly) UpdateFormatForUCFInSet();
return true;// Import Suceeded
}
private void UpdateFormatForUCFInSet()
@ -738,7 +738,7 @@ namespace VEPROMS
{
floatFoldout = new Dictionary<int, int>();
importedFormat = new Dictionary<int, string>();
existingFormat = new Dictionary<string, int>( );
existingFormat = new Dictionary<string, int>();
FormatInfoList fil = FormatInfoList.Get();
foreach (FormatInfo fi in fil)
{
@ -764,7 +764,7 @@ namespace VEPROMS
Item.DeleteItemAndChildren(pi);
TurnChangeManagerOff.Execute(); // Assure that the Change Manager is off
}
catch(Exception ex)
catch (Exception ex)
{
// C2018-020: cannot overwrite the procedure because transitions point to this. Show dialog listing transitions and then
// return false to flag that import was not successful.
@ -1389,7 +1389,7 @@ namespace VEPROMS
{
foreach (XmlNode nd in PendingTransitions.DocumentElement.ChildNodes)
{
if(nd.InnerText == "")
if (nd.InnerText == "")
xd.DocumentElement.AppendChild(xd.ImportNode(nd, true));
}
}
@ -1682,7 +1682,7 @@ namespace VEPROMS
if (fi.Name.IndexOf("-") > 0)
dn = fi.Name.Substring(0, fi.Name.IndexOf("-"));
else
dn = fi.Name.Substring(0,fi.Name.IndexOf("."));
dn = fi.Name.Substring(0, fi.Name.IndexOf("."));
txtImport.Text = ofd.FileName;
ReadOptions ro = new ReadOptions();
ro.Encoding = Encoding.UTF8;
@ -1769,7 +1769,7 @@ namespace VEPROMS
*/
lblExportStatus.Text = "Exporting Folder...";
Application.DoEvents();
string formatFileName = (fi.MyFormat != null)? fi.MyFormat.Name:"";
string formatFileName = (fi.MyFormat != null) ? fi.MyFormat.Name : "";
FromFolderName = fi.Name;
XmlElement xe = xd.CreateElement(nodename);
xe.Attributes.SetNamedItem(AddAttribute(xd, "folderid", fi.FolderID.ToString()));
@ -1783,7 +1783,7 @@ namespace VEPROMS
xe.Attributes.SetNamedItem(AddAttribute(xd, "config", fi.Config));
xe.Attributes.SetNamedItem(AddAttribute(xd, "dts", fi.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")));
xe.Attributes.SetNamedItem(AddAttribute(xd, "usrid", fi.UsrID.ToString()));
xe.Attributes.SetNamedItem(AddAttribute(xd, "formatfilename",formatFileName));
xe.Attributes.SetNamedItem(AddAttribute(xd, "formatfilename", formatFileName));
xd.AppendChild(xe);
ExportAnnotationTypes(xe, "annotationtypes");
ExportFormats(FormatInfoList.GetFormatInfoListUsed(), xe, "formats", true);
@ -1805,7 +1805,7 @@ namespace VEPROMS
XmlElement xe = xn.OwnerDocument.CreateElement(nodename);
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "formatid", fi.FormatID.ToString()));
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "name", fi.Name));
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "pname", fi.MyParent==null?"null":fi.MyParent.Name));
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "pname", fi.MyParent == null ? "null" : fi.MyParent.Name));
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "description", fi.Description));
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "dts", fi.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")));
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "userid", fi.UserID));
@ -2100,7 +2100,7 @@ namespace VEPROMS
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "userid", figure.UserID));
xe.AppendChild(xee);
// B2018-031 Output figure names as they are exported to provide more constant feedback
lblExportStatus.Text = string.Format("Exporting Figure...{0}",figure.MyROImage.FileName);
lblExportStatus.Text = string.Format("Exporting Figure...{0}", figure.MyROImage.FileName);
Application.DoEvents();
ExportROImage(xee, figure.MyROImage);
}
@ -2203,7 +2203,7 @@ namespace VEPROMS
pbExportSection.Maximum = pbExportSection.Value;
pbExportStep.Value = 0;
pbExportStep.Maximum = pbExportStep.Value;
if(ii.Sections != null)
if (ii.Sections != null)
pbExportSection.Maximum = ii.Sections.Count;
else
{
@ -2364,7 +2364,7 @@ namespace VEPROMS
*/
XmlElement xe = xn.OwnerDocument.CreateElement(nodename);
// strip the link information if we are convertingthe RO and Transitions to text
string ciText = (_ConvertROsAndTransitionsToText)?ItemInfo.StripLinks(ci.Text):ci.Text;
string ciText = (_ConvertROsAndTransitionsToText) ? ItemInfo.StripLinks(ci.Text) : ci.Text;
string formatFileName = (ci.MyFormat != null) ? ci.MyFormat.Name : "";
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "contentid", ci.ContentID.ToString()));
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "number", ci.Number));
@ -2721,7 +2721,7 @@ namespace VEPROMS
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "auditid", audit.AuditID.ToString()));
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "docid", audit.DocID.ToString()));
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "libtitle", audit.LibTitle));
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "doccontent",Convert.ToBase64String(audit.DocContent)));
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "doccontent", Convert.ToBase64String(audit.DocContent)));
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "docascii", audit.DocAscii));
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "config", audit.Config));
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "dts", audit.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")));
@ -3341,7 +3341,7 @@ namespace VEPROMS
string formatid = xd.DocumentElement.Attributes.GetNamedItem("formatid").InnerText;
XmlNode fnNode = xd.DocumentElement.Attributes.GetNamedItem("formatfilename"); //Bug fix B2016-103 the formatid in an Export file may not match the formatid where you are importing to
string formatfilename = (fnNode != null) ? fnNode.InnerText : "";
Format format = formatid == string.Empty ? null : OldToNewFormat(int.Parse(formatid),formatfilename);
Format format = formatid == string.Empty ? null : OldToNewFormat(int.Parse(formatid), formatfilename);
if (Folder.GetByParentID_Name(p.FolderID, name) != null)
return null;
Folder f = Folder.MakeFolder(p, p.MyConnection, name, title, shortname, format, null, dts, usrid);
@ -3375,7 +3375,7 @@ namespace VEPROMS
DateTime dts = DateTime.Parse(xr.GetAttribute("dts"));
string formatid = xr.GetAttribute("formatid");
string formatfilename = xr.GetAttribute("formatfilename"); //Bug fix B2016-103 the formatid in an Export file may not match the formatid where you are importing to
Format format = formatid == string.Empty ? null : OldToNewFormat(int.Parse(formatid),formatfilename);
Format format = formatid == string.Empty ? null : OldToNewFormat(int.Parse(formatid), formatfilename);
DocVersion dv = DocVersion.MakeDocVersion(f, versiontype, name, null, null, format, config, dts, userid);
return dv;
}
@ -3403,7 +3403,7 @@ namespace VEPROMS
string formatid = xe.Attributes.GetNamedItem("formatid").InnerText;
XmlNode fnNode = xe.Attributes.GetNamedItem("formatfilename"); //Bug fix B2016-103 the formatid in an Export file may not match the formatid where you are importing to
string formatfilename = (fnNode != null) ? fnNode.InnerText : "";
Format format = formatid == string.Empty ? null : OldToNewFormat(int.Parse(formatid),formatfilename);
Format format = formatid == string.Empty ? null : OldToNewFormat(int.Parse(formatid), formatfilename);
DocVersion dv = DocVersion.MakeDocVersion(f, versiontype, name, null, null, format, config, dts, userid);
XmlNode xassoc = xe.SelectSingleNode("association");
if (xassoc != null)
@ -3462,7 +3462,7 @@ namespace VEPROMS
foreach (RODbInfo roinfo in rodblst)
{
rv = ROFst.GetByRODbID_DTS(roinfo.RODbID, dts);
if (rv != null && Same(rv.ROLookup,rolookup)) return rv;
if (rv != null && Same(rv.ROLookup, rolookup)) return rv;
}
rv = ROFst.MakeROFst(MyRODb, rolookup, config, dts, userid);
XmlNode xfigures = xrofst.SelectSingleNode("figures");
@ -3505,7 +3505,7 @@ namespace VEPROMS
dts = DateTime.Parse(nd.Attributes.GetNamedItem("dts").InnerText);
userid = nd.Attributes.GetNamedItem("userid").InnerText;
// Dispose when done
using(Figure fig = Figure.MakeFigure(rofst, roimage, config, dts, userid)){;}
using (Figure fig = Figure.MakeFigure(rofst, roimage, config, dts, userid)) { ;}
}
}
else
@ -3514,7 +3514,7 @@ namespace VEPROMS
dts = DateTime.Parse(nd.Attributes.GetNamedItem("dts").InnerText);
userid = nd.Attributes.GetNamedItem("userid").InnerText;
// Dispose when done
using(Figure fig = Figure.MakeFigure(rofst, roimage, config, dts, userid)){;}
using (Figure fig = Figure.MakeFigure(rofst, roimage, config, dts, userid)) { ;}
}
}
}
@ -3567,7 +3567,7 @@ namespace VEPROMS
// if the ROname we are importing is the same as one already in the database
// and the ROpaths are different, then rename the one we are importing
while (roDbNameList.Contains(roNameNew))
roNameNew = string.Format("{0}_{1}",roname,(++cnt).ToString());
roNameNew = string.Format("{0}_{1}", roname, (++cnt).ToString());
rv = RODb.MakeRODb(roNameNew, folderpath, dbconnectionstring, config, dts, userid);
}
newRODbID = rv.RODbID;
@ -3771,7 +3771,7 @@ namespace VEPROMS
txtRO = txtRO.Replace(@"\u8209?", "-"); // dash
txtRO = txtRO.Replace(@"\u9586?", @"\\"); // backslash
txtRO = txtRO.Replace(@"\'b0", "\xb0"); //degree
txtRO = txtRO.Replace(@"\u160?"," "); //hard space
txtRO = txtRO.Replace(@"\u160?", " "); //hard space
txtRO = txtRO.Replace(@"\u916?", "\x7F"); // delta
txtRO = txtRO.Replace(@"\u8805?", "\xF2"); //greater than or equal
txtRO = txtRO.Replace(@"\u8804?", "\xF3"); // less than or equal