Volian.Base.Library & Baseline

This commit is contained in:
2026-08-11 07:33:32 -04:00
parent 6d7d127b63
commit b1427f4997
26 changed files with 389 additions and 1239 deletions
+6 -12
View File
@@ -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