Volian.Base.Library & Baseline
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
@@ -10,21 +8,17 @@ namespace Volian.Base.Library
|
||||
{
|
||||
#region Log4Net
|
||||
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
#endregion
|
||||
public static string GetROEditorPath()
|
||||
{
|
||||
string roapp = PROMSExecutableFolderPath() + @"\ROEDITOR.EXE";
|
||||
return roapp;
|
||||
}
|
||||
#endregion
|
||||
public static string GetROEditorPath() => $@"{PROMSExecutableFolderPath()}\ROEDITOR.EXE";
|
||||
|
||||
// returns the path to the executable folder
|
||||
public static string PROMSExecutableFolderPath()
|
||||
// returns the path to the executable folder
|
||||
public static string PROMSExecutableFolderPath()
|
||||
{
|
||||
string pathPROMSexe = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
|
||||
if (pathPROMSexe[7] == ':') // either a local drive or a mapped network drive
|
||||
pathPROMSexe = pathPROMSexe.Substring(6);
|
||||
else
|
||||
pathPROMSexe = @"\" + pathPROMSexe.Substring(5); // non-mapped network drive - need to add extra back slash in front
|
||||
pathPROMSexe = $@"\{pathPROMSexe.Substring(5)}"; // non-mapped network drive - need to add extra back slash in front
|
||||
return pathPROMSexe;
|
||||
}
|
||||
|
||||
@@ -34,7 +28,7 @@ namespace Volian.Base.Library
|
||||
try
|
||||
{
|
||||
// Build the path to the PROMSFixes.sql file located in the PROMS exe folder
|
||||
string pathPROMSFixes = PROMSExecutableFolderPath() + @"\PROMSFixes.sql";
|
||||
string pathPROMSFixes = $@"{PROMSExecutableFolderPath()}\PROMSFixes.sql";
|
||||
|
||||
// open the PROMSFixes.sql file and grab the line of text containing the PROMSFixes RevDate
|
||||
// using Linq to open and read the PROMSFixes file
|
||||
|
||||
Reference in New Issue
Block a user